|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
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.ehsbe.commons.gui.JxLabel
public class JxLabel
Special label, which htmlizes its text wrt. to the additional properties it has.
Hints
,
Validator
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
JLabel.AccessibleJLabel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Hints |
hints
hints for text decoration |
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 | |
---|---|
JxLabel()
Creates a JLabel instance with
no image and with an empty string for the title. |
|
JxLabel(Icon image)
Creates a JLabel instance with the specified image. |
|
JxLabel(Icon image,
int horizontalAlignment)
Creates a JLabel instance with the specified
image and horizontal alignment. |
|
JxLabel(String text)
Creates a JLabel instance with the specified text. |
|
JxLabel(String text,
Icon icon,
int horizontalAlignment)
Creates a JLabel instance with the specified
text, image, and horizontal alignment. |
|
JxLabel(String text,
int horizontalAlignment)
Creates a JLabel instance with the specified
text and horizontal alignment. |
Method Summary | |
---|---|
Hints |
getHints()
Get the hints assigned to this component. |
String |
getOriginalText()
Get the real aka original label text. |
void |
invalidate()
|
void |
setEnabled(boolean enabled)
|
void |
setForeground(Color fg)
|
void |
setText(String text)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Hints hints
Constructor Detail |
---|
public JxLabel(String text, Icon icon, int horizontalAlignment)
JLabel
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.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public JxLabel(String text, int horizontalAlignment)
JLabel
instance with the specified
text and horizontal alignment.
The label is centered vertically in its display area.
text
- The text to be displayed by the label.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public JxLabel(String text)
JLabel
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 JxLabel(Icon image, int horizontalAlignment)
JLabel
instance with the specified
image and horizontal alignment.
The label is centered vertically in its display area.
image
- The image to be displayed by the label.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public JxLabel(Icon image)
JLabel
instance with the specified image.
The label is centered vertically and horizontally
in its display area.
image
- The image to be displayed by the label.public JxLabel()
JLabel
instance with
no image and with an empty string for the title.
The label is centered vertically
in its display area.
The label's contents, once set, will be displayed on the leading edge
of the label's display area.
Method Detail |
---|
public void setText(String text)
setText
in class JLabel
public void setForeground(Color fg)
setForeground
in class JComponent
public void setEnabled(boolean enabled)
setEnabled
in class JComponent
public String getOriginalText()
null
if not set, the text otherwise.public void invalidate()
invalidate
in class Container
public Hints getHints()
null
value.
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |