| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected static BasicLabelUI | labelUI
The default |
| private Rectangle | |
| private Rectangle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ComponentUI | Returns: an instance ofBasicLabelUIa component c)Hides javax. Returns an instance of |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| public Component. | getBaselineResizeBehavior(JComponent c)
Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes. |
| public Dimension | Returns: getPreferredSize(c)Overrides javax. Returns the specified component's maximum size appropriate for the look and feel. |
| public Dimension | Returns: getPreferredSize(c)Overrides javax. Returns the specified component's minimum size appropriate for the look and feel. |
| public Dimension | getPreferredSize(JComponent c)
Overrides javax. Returns the specified component's preferred size appropriate for the look and feel. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | installUI(JComponent c)
Overrides javax. Configures the specified component appropriately for the look and feel. |
| private String | |
| protected String | Returns: a possibly clipped version of the compound labels stringan instance of label, FontMetrics JLabela font metrics fontMetrics, String a text text, Icon an icon icon, Rectangle a bounding rectangle to lay out label viewR, Rectangle a bounding rectangle to lay out icon iconR, Rectangle a bounding rectangle to lay out text textR)Forwards the call to SwingUtilities.layoutCompoundLabel(). |
| pack-priv static void | |
| public void | paint(Graphics g, JComponent c)
Overrides javax. Paints the label text with the foreground color, if the label is opaque then paints the entire background with the background color. |
| protected void | paintDisabledText(JLabel
an instance of l, Graphics JLabelan instance of g, String Graphicsa text s, int an X coordinate textX, int an Y coordinate 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
an instance of l, Graphics JLabelan instance of g, String Graphicsa text s, int an X coordinate textX, int an Y coordinate textY)Paint clippedText at textX, textY with the labels foreground color. |
| public void | propertyChange(PropertyChangeEvent e)
Implements java. This method gets called when a bound property is changed. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | uninstallUI(JComponent c)
Overrides javax. Reverses configuration which was done on the specified component during
|
| labelUI | back to summary |
|---|---|
| protected static BasicLabelUI labelUI The default | |
| paintIconR | back to summary |
|---|---|
| private Rectangle paintIconR | |
| paintTextR | back to summary |
|---|---|
| private Rectangle paintTextR | |
| BasicLabelUI | back to summary |
|---|---|
| public BasicLabelUI() Constructs a | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Returns an instance of
| |
| getBaseline | back to summary |
|---|---|
| public int getBaseline(JComponent c, int width, int height) Overrides javax. Returns the baseline.
| |
| getBaselineResizeBehavior | back to summary |
|---|---|
| public Component. Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes.
| |
| getMaximumSize | back to summary |
|---|---|
| public Dimension getMaximumSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's maximum size appropriate for
the look and feel. If
| |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's minimum size appropriate for
the look and feel. If
| |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's preferred size appropriate for
the look and feel. If | |
| installComponents | back to summary |
|---|---|
| protected void installComponents(JLabel c) Registers components.
| |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults(JLabel c) Installs default properties.
| |
| installKeyboardActions | back to summary |
|---|---|
| protected void installKeyboardActions(JLabel l) Registers keyboard actions.
| |
| installListeners | back to summary |
|---|---|
| protected void installListeners(JLabel c) Registers listeners.
| |
| installUI | back to summary |
|---|---|
| public void installUI(JComponent c) Overrides javax. Doc from javax. Configures the specified component appropriately for the look and feel.
This method is invoked when the
| |
| layout | back to summary |
|---|---|
| private String layout(JLabel label, FontMetrics fm, int width, int height) | |
| layoutCL | back to summary |
|---|---|
| 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.
| |
| loadActionMap | back to summary |
|---|---|
| pack-priv static void loadActionMap(LazyActionMap map) | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. 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
| |
| paintDisabledText | back to summary |
|---|---|
| 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().
| |
| paintEnabledText | back to summary |
|---|---|
| protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY) Paint clippedText at textX, textY with the labels foreground color.
| |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent e) Implements java. Doc from java. This method gets called when a bound property is changed. | |
| uninstallComponents | back to summary |
|---|---|
| protected void uninstallComponents(JLabel c) Unregisters components.
| |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults(JLabel c) Uninstalls default properties.
| |
| uninstallKeyboardActions | back to summary |
|---|---|
| protected void uninstallKeyboardActions(JLabel c) Unregisters keyboard actions.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners(JLabel c) Unregisters listeners.
| |
| uninstallUI | back to summary |
|---|---|
| public void uninstallUI(JComponent c) Overrides javax. Doc from javax. Reverses configuration which was done on the specified component during
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| private void | |
| private void | |
| private void | |
| private void |
| PRESS | back to summary |
|---|---|
| private static final String PRESS | |
| RELEASE | back to summary |
|---|---|
| private static final String RELEASE | |
| Actions | back to summary |
|---|---|
| pack-priv Actions(String key) | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
| doPress | back to summary |
|---|---|
| private void doPress(JLabel label) | |
| doRelease | back to summary |
|---|---|
| private void doRelease(JLabel label, boolean isCommand) | |
| putOnRelease | back to summary |
|---|---|
| private void putOnRelease(InputMap inputMap, int keyCode, int modifiers) | |
| removeOnRelease | back to summary |
|---|---|
| private void removeOnRelease(InputMap inputMap, int keyCode, int modifiers) | |