| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class BasicLabelUI extends LabelUI implements 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 |
labelUI
The default BasicLabelUI instance. |
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
static ComponentUI |
|
int |
getBaseline(JComponent c, int width, int height) Returns the baseline. |
Component.BaselineResizeBehavior |
Returns an enum indicating how the baseline of the component changes as the size changes. |
Dimension |
Returns the specified component's maximum size appropriate for the look and feel. |
Dimension |
Returns the specified component's minimum size appropriate for the look and feel. |
Dimension |
Returns the specified component's preferred size appropriate for the look and feel. |
protected void |
|
protected void |
|
protected void |
|
protected void |
|
void |
Configures the specified component appropriate for the look and feel. |
protected String |
Forwards the call to SwingUtilities.layoutCompoundLabel(). |
void |
paint(Graphics g, 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(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. |
void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
void |
Reverses configuration which was done on the specified component during installUI .
|
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static BasicLabelUI labelUI
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".
Constructor Detail |
---|
public BasicLabelUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
c
public int getBaseline(JComponent c, int width, int height)
getBaseline
in class ComponentUI
c
width
height
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehavior
in class ComponentUI
c
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
c
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
c
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
c
protected void installComponents(JLabel c)
c
protected void installDefaults(JLabel c)
c
protected void installKeyboardActions(JLabel l)
l
protected void installListeners(JLabel c)
c
public void installUI(JComponent c)
installUI
in class ComponentUI
c
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
label
fontMetrics
text
icon
viewR
iconR
textR
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
g
c
protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
l
g
s
textX
textY
protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
l
g
s
textX
textY
public void propertyChange(PropertyChangeEvent e)
e
protected void uninstallComponents(JLabel c)
c
protected void uninstallDefaults(JLabel c)
c
protected void uninstallKeyboardActions(JLabel c)
c
protected void uninstallListeners(JLabel c)
c
public void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
c
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |