|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.ultraswing.CLabel
This class is an extension of JLabel, with new features such as underlined text, anti-aliasing text, vertical label, etc.
Nested Class Summary |
Nested classes inherited from class javax.swing.JLabel |
JLabel.AccessibleJLabel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JLabel |
labelFor |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CLabel()
Creates a label with no set text or icon. |
|
CLabel(Icon icon)
Creates a JLabel instance with the specified image. |
|
CLabel(String text)
Creates a CLabel instance with the specified text. |
|
CLabel(String text,
boolean isVertical)
Creates a CLabel instance with the specified text. |
|
CLabel(String text,
Icon icon)
Creates a CLabel instance with the specified
text, image, and horizontal alignment. |
|
CLabel(String text,
Icon icon,
int horizontalAlignment,
boolean isVertical)
Creates a CLabel instance with the specified
text, image, and horizontal alignment. |
Method Summary | |
Icon |
getVerticalLabelIcon()
Returns the Icon object when this label is vertical |
String |
getVerticalLabelText()
Returns the text when this label is vertical |
boolean |
isAntiAlias()
Tests if this label's text is anti-aliasing or not |
boolean |
isUnderlined()
Tests if text is underlined or not |
void |
paintComponent(Graphics g)
|
void |
setAntiAlias(boolean b)
Sets true to make text anti-aliasing |
void |
setIcon(Icon icon)
Sets icon |
void |
setText(String text)
Sets label text |
void |
setUnderlined(boolean isUnderlined)
Sets text to be underlined or not |
void |
setVertical(boolean b)
Sets this label to be vertical or not |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CLabel()
public CLabel(String text)
CLabel
instance with the specified text.
The label is aligned against the leading edge of its display area,
and centered vertically.
text
- The text to be displayed by the label.public CLabel(String text, boolean isVertical)
CLabel
instance with the specified text.
The label is aligned against the leading edge of its display area,
and centered vertically.
text
- The text to be displayed by the label.isVertical
- if true, this label is a vertical labelpublic CLabel(String text, Icon icon, int horizontalAlignment, boolean isVertical)
CLabel
instance with the specified
text, image, and horizontal alignment.
text
- The text to be displayed by the label.icon
- The image to be displayed by the label.isVertical
- if true, this label is a vertical labelhorizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public CLabel(String text, Icon icon)
CLabel
instance with the specified
text, image, and horizontal alignment.
The label is centered vertically in its display area.
The text is on the trailing edge of the image.
text
- The text to be displayed by the label.icon
- The image to be displayed by the label.public CLabel(Icon icon)
JLabel
instance with the specified image.
The label is centered vertically and horizontally
in its display area.
icon
- The image to be displayed by the label.Method Detail |
public boolean isUnderlined()
public void setUnderlined(boolean isUnderlined)
public void setIcon(Icon icon)
public Icon getVerticalLabelIcon()
public void setText(String text)
public void setAntiAlias(boolean b)
public boolean isAntiAlias()
public String getVerticalLabelText()
public void setVertical(boolean b)
public void paintComponent(Graphics g)
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |