javax.swing.plaf.basic
Class BasicLabelUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.LabelUI sample code for javax.swing.plaf.LabelUI definition code for javax.swing.plaf.LabelUI 
          extended by javax.swing.plaf.basic.BasicLabelUI
All Implemented Interfaces:
PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener , EventListener sample code for java.util.EventListener definition code for java.util.EventListener
Direct Known Subclasses:
MetalLabelUI sample code for javax.swing.plaf.metal.MetalLabelUI definition code for javax.swing.plaf.metal.MetalLabelUI

public class BasicLabelUI
extends LabelUI sample code for javax.swing.plaf.LabelUI definition code for javax.swing.plaf.LabelUI
implements PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener

A Windows L&F implementation of LabelUI. This implementation is completely static, i.e. there's only one UIView implementation that's shared by all JLabel objects.


Field Summary
protected static BasicLabelUI sample code for javax.swing.plaf.basic.BasicLabelUI definition code for javax.swing.plaf.basic.BasicLabelUI labelUI sample code for javax.swing.plaf.basic.BasicLabelUI.labelUI definition code for javax.swing.plaf.basic.BasicLabelUI.labelUI
           
 
Constructor Summary
BasicLabelUI sample code for javax.swing.plaf.basic.BasicLabelUI.BasicLabelUI() definition code for javax.swing.plaf.basic.BasicLabelUI.BasicLabelUI() ()
           
 
Method Summary
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicLabelUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for javax.swing.plaf.basic.BasicLabelUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getMaximumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's maximum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicLabelUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's minimum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's preferred size appropriate for the look and feel.
protected  void installComponents sample code for javax.swing.plaf.basic.BasicLabelUI.installComponents(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installComponents(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicLabelUI.installDefaults(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installDefaults(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicLabelUI.installKeyboardActions(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installKeyboardActions(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l)
           
protected  void installListeners sample code for javax.swing.plaf.basic.BasicLabelUI.installListeners(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installListeners(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
 void installUI sample code for javax.swing.plaf.basic.BasicLabelUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Configures the specified component appropriate for the look and feel.
protected  String sample code for java.lang.String definition code for java.lang.String layoutCL sample code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  label, FontMetrics sample code for java.awt.FontMetrics definition code for java.awt.FontMetrics  fontMetrics, String sample code for java.lang.String definition code for java.lang.String  text, Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  icon, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  viewR, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconR, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textR)
          Forwards the call to SwingUtilities.layoutCompoundLabel().
 void paint sample code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
protected  void paintDisabledText sample code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l, Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, String sample code for java.lang.String definition code for java.lang.String  s, int textX, int textY)
          Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
protected  void paintEnabledText sample code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l, Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, String sample code for java.lang.String definition code for java.lang.String  s, int textX, int textY)
          Paint clippedText at textX, textY with the labels foreground color.
 void propertyChange sample code for javax.swing.plaf.basic.BasicLabelUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicLabelUI.propertyChange(java.beans.PropertyChangeEvent) (PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  e)
          This method gets called when a bound property is changed.
protected  void uninstallComponents sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallComponents(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallComponents(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallDefaults(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallDefaults(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallKeyboardActions(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallKeyboardActions(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallListeners(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallListeners(javax.swing.JLabel) (JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)
           
 void uninstallUI sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Reverses configuration which was done on the specified component during installUI.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

labelUI sample code for javax.swing.plaf.basic.BasicLabelUI.labelUI

protected static BasicLabelUI sample code for javax.swing.plaf.basic.BasicLabelUI definition code for javax.swing.plaf.basic.BasicLabelUI  labelUI
Constructor Detail

BasicLabelUI sample code for javax.swing.plaf.basic.BasicLabelUI() definition code for javax.swing.plaf.basic.BasicLabelUI()

public BasicLabelUI()
Method Detail

layoutCL sample code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)

protected String sample code for java.lang.String definition code for java.lang.String  layoutCL(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  label,
                          FontMetrics sample code for java.awt.FontMetrics definition code for java.awt.FontMetrics  fontMetrics,
                          String sample code for java.lang.String definition code for java.lang.String  text,
                          Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  icon,
                          Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  viewR,
                          Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconR,
                          Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textR)
Forwards the call to SwingUtilities.layoutCompoundLabel(). This method is here so that a subclass could do Label specific layout and to shorten the method name a little.

See Also:
SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int) sample code for javax.swing.SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int) definition code for javax.swing.SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int)

paintEnabledText sample code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

protected void paintEnabledText(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l,
                                Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                String sample code for java.lang.String definition code for java.lang.String  s,
                                int textX,
                                int textY)
Paint clippedText at textX, textY with the labels foreground color.

See Also:
paint(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) , paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) sample code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

paintDisabledText sample code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

protected void paintDisabledText(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l,
                                 Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                 String sample code for java.lang.String definition code for java.lang.String  s,
                                 int textX,
                                 int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().

See Also:
paint(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) , paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) sample code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

paint sample code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color. The Label text is drawn by paintEnabledText() or paintDisabledText(). The locations of the label parts are computed by layoutCL.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) sample code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) , paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) sample code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) definition code for javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int) , layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) sample code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicLabelUI.layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)

getPreferredSize sample code for javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)
Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

getMinimumSize sample code for javax.swing.plaf.basic.BasicLabelUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getMinimumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent)
Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
getPreferredSize(c)
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)

getMaximumSize sample code for javax.swing.plaf.basic.BasicLabelUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.getMaximumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent)
Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
getPreferredSize(c)
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)

installUI sample code for javax.swing.plaf.basic.BasicLabelUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

uninstallUI sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installDefaults sample code for javax.swing.plaf.basic.BasicLabelUI.installDefaults(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installDefaults(javax.swing.JLabel)

protected void installDefaults(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

installListeners sample code for javax.swing.plaf.basic.BasicLabelUI.installListeners(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installListeners(javax.swing.JLabel)

protected void installListeners(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

installComponents sample code for javax.swing.plaf.basic.BasicLabelUI.installComponents(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installComponents(javax.swing.JLabel)

protected void installComponents(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

installKeyboardActions sample code for javax.swing.plaf.basic.BasicLabelUI.installKeyboardActions(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.installKeyboardActions(javax.swing.JLabel)

protected void installKeyboardActions(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  l)

uninstallDefaults sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallDefaults(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallDefaults(javax.swing.JLabel)

protected void uninstallDefaults(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

uninstallListeners sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallListeners(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallListeners(javax.swing.JLabel)

protected void uninstallListeners(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

uninstallComponents sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallComponents(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallComponents(javax.swing.JLabel)

protected void uninstallComponents(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicLabelUI.uninstallKeyboardActions(javax.swing.JLabel) definition code for javax.swing.plaf.basic.BasicLabelUI.uninstallKeyboardActions(javax.swing.JLabel)

protected void uninstallKeyboardActions(JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel  c)

createUI sample code for javax.swing.plaf.basic.BasicLabelUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicLabelUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

propertyChange sample code for javax.swing.plaf.basic.BasicLabelUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicLabelUI.propertyChange(java.beans.PropertyChangeEvent)

public void propertyChange(PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  e)
Description copied from interface: PropertyChangeListener sample code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) definition code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
This method gets called when a bound property is changed.

Specified by:
propertyChange sample code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) definition code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) in interface PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener
Parameters:
e - A PropertyChangeEvent object describing the event source and the property that has changed.