Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
public class: BasicLabelUI [javadoc | source]
java.lang.Object
   javax.swing.plaf.ComponentUI
      javax.swing.plaf.LabelUI
         javax.swing.plaf.basic.BasicLabelUI

All Implemented Interfaces:
    PropertyChangeListener

Direct Known Subclasses:
    MetalLabelUI, SynthLabelUI

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 labelUI    The default BasicLabelUI instance. This field might not be used. To change the default instance use a subclass which overrides the createUI method, and place that class name in defaults table under the key "LabelUI". 
Method from javax.swing.plaf.basic.BasicLabelUI Summary:
createUI,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installComponents,   installDefaults,   installKeyboardActions,   installListeners,   installUI,   layoutCL,   loadActionMap,   paint,   paintDisabledText,   paintEnabledText,   propertyChange,   uninstallComponents,   uninstallDefaults,   uninstallKeyboardActions,   uninstallListeners,   uninstallUI
Methods from javax.swing.plaf.ComponentUI:
contains,   createUI,   getAccessibleChild,   getAccessibleChildrenCount,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installUI,   paint,   uninstallUI,   update
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicLabelUI Detail:
 public static ComponentUI createUI(JComponent c) 
 public int getBaseline(JComponent c,
    int width,
    int height) 
    Returns the baseline.
 public BaselineResizeBehavior getBaselineResizeBehavior(JComponent c) 
    Returns an enum indicating how the baseline of the component changes as the size changes.
 public Dimension getMaximumSize(JComponent c) 
 public Dimension getMinimumSize(JComponent c) 
 public Dimension getPreferredSize(JComponent c) 
 protected  void installComponents(JLabel c) 
 protected  void installDefaults(JLabel c) 
 protected  void installKeyboardActions(JLabel l) 
 protected  void installListeners(JLabel c) 
 public  void installUI(JComponent c) 
 protected String layoutCL(JLabel label,
    FontMetrics fontMetrics,
    String text,
    Icon icon,
    Rectangle viewR,
    Rectangle iconR,
    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.
 static  void loadActionMap(LazyActionMap map) 
 public  void paint(Graphics g,
    JComponent c) 
    Paints the label text with the foreground color, if the label is opaque then paints 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 .
 protected  void paintDisabledText(JLabel l,
    Graphics g,
    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(JLabel l,
    Graphics g,
    String s,
    int textX,
    int textY) 
    Paint clippedText at textX, textY with the labels foreground color.
 public  void propertyChange(PropertyChangeEvent e) 
 protected  void uninstallComponents(JLabel c) 
 protected  void uninstallDefaults(JLabel c) 
 protected  void uninstallKeyboardActions(JLabel c) 
 protected  void uninstallListeners(JLabel c) 
 public  void uninstallUI(JComponent c)