|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.LabelUI
com.cbse.jeasy.JELabelUI
public class JELabelUI
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 JELabelUI |
labelUI
|
| Constructor Summary | |
|---|---|
JELabelUI()
|
|
| Method Summary | |
|---|---|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
|
static void |
drawString(java.awt.Graphics g,
java.lang.String text,
int underlinedChar,
int x,
int y)
Draw a string with the graphics g at location (x,y) just
like g.drawString would. |
static void |
drawStringUnderlineCharAt(java.awt.Graphics g,
java.lang.String text,
int underlinedIndex,
int x,
int y)
Draw a string with the graphics g at location (
x,y) just like g.drawString
would. |
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
protected void |
installComponents(javax.swing.JLabel c)
|
protected void |
installDefaults(javax.swing.JLabel c)
|
protected void |
installKeyboardActions(javax.swing.JLabel l)
|
protected void |
installListeners(javax.swing.JLabel c)
|
void |
installUI(javax.swing.JComponent c)
|
protected java.lang.String |
layoutCL(javax.swing.JLabel label,
java.awt.FontMetrics fontMetrics,
java.lang.String text,
javax.swing.Icon icon,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel(). |
void |
paint(java.awt.Graphics g,
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(javax.swing.JLabel l,
java.awt.Graphics g,
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(javax.swing.JLabel l,
java.awt.Graphics g,
java.lang.String s,
int textX,
int textY)
Paint clippedText at textX, textY with the labels foreground color. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
|
protected void |
uninstallComponents(javax.swing.JLabel c)
|
protected void |
uninstallDefaults(javax.swing.JLabel c)
|
protected void |
uninstallKeyboardActions(javax.swing.JLabel c)
|
protected void |
uninstallListeners(javax.swing.JLabel c)
|
void |
uninstallUI(javax.swing.JComponent c)
|
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static JELabelUI labelUI
| Constructor Detail |
|---|
public JELabelUI()
| Method Detail |
|---|
protected java.lang.String layoutCL(javax.swing.JLabel label,
java.awt.FontMetrics fontMetrics,
java.lang.String text,
javax.swing.Icon icon,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR)
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)
protected void paintEnabledText(javax.swing.JLabel l,
java.awt.Graphics g,
java.lang.String s,
int textX,
int textY)
paint(java.awt.Graphics, javax.swing.JComponent),
paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)
protected void paintDisabledText(javax.swing.JLabel l,
java.awt.Graphics g,
java.lang.String s,
int textX,
int textY)
paint(java.awt.Graphics, javax.swing.JComponent),
paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.ComponentUIpaintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int),
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)public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize in class javax.swing.plaf.ComponentUIpublic java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize in class javax.swing.plaf.ComponentUIpublic java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize in class javax.swing.plaf.ComponentUIpublic void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.ComponentUIpublic void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIprotected void installDefaults(javax.swing.JLabel c)
protected void installListeners(javax.swing.JLabel c)
protected void installComponents(javax.swing.JLabel c)
protected void installKeyboardActions(javax.swing.JLabel l)
protected void uninstallDefaults(javax.swing.JLabel c)
protected void uninstallListeners(javax.swing.JLabel c)
protected void uninstallComponents(javax.swing.JLabel c)
protected void uninstallKeyboardActions(javax.swing.JLabel c)
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListener
public static void drawString(java.awt.Graphics g,
java.lang.String text,
int underlinedChar,
int x,
int y)
g at location (x,y) just
like g.drawString would. The first occurrence of
underlineChar in text will be underlined. The matching
algorithm is not case sensitive.
public static void drawStringUnderlineCharAt(java.awt.Graphics g,
java.lang.String text,
int underlinedIndex,
int x,
int y)
g at location (
x,y) just like g.drawString
would. The character at index underlinedIndex in text will
be underlined. If index is beyond the bounds of
text (including < 0), nothing will be underlined.
g - Graphics to draw withtext - String to drawunderlinedIndex - Index of character in text to underlinex - x coordinate to draw aty - y coordinate to draw at
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||