|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbuoy.event.EventSource
buoy.widget.Widget
buoy.widget.BLabel
public class BLabel
A BLabel is a Widget that displays a text string, an image, or both. The text may be specified as HTML, allowing it to contain complex formatting, multiple fonts, etc.
Nested Class Summary | |
---|---|
static class |
BLabel.Position
This inner class represents a value for the alignment or text position. |
Field Summary | |
---|---|
static BLabel.Position |
CENTER
|
static BLabel.Position |
EAST
|
static BLabel.Position |
NORTH
|
static BLabel.Position |
NORTHEAST
|
static BLabel.Position |
NORTHWEST
|
static BLabel.Position |
SOUTH
|
static BLabel.Position |
SOUTHEAST
|
static BLabel.Position |
SOUTHWEST
|
static BLabel.Position |
WEST
|
Constructor Summary | |
---|---|
BLabel()
Create a new BLabel with no text or image. |
|
BLabel(javax.swing.Icon image)
Create a new BLabel which displays an image. |
|
BLabel(javax.swing.Icon image,
BLabel.Position align)
Create a new BLabel which displays an image. |
|
BLabel(java.lang.String text)
Create a new BLabel which displays text. |
|
BLabel(java.lang.String text,
BLabel.Position align)
Create a new BLabel which displays text. |
|
BLabel(java.lang.String text,
javax.swing.Icon image,
BLabel.Position align,
BLabel.Position textPos)
Create a new BLabel which displays both text and an image. |
Method Summary | |
---|---|
BLabel.Position |
getAlignment()
Get the alignment of the label's contents. |
javax.swing.JLabel |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
javax.swing.Icon |
getIcon()
Get the image which appears on this label. |
java.awt.Dimension |
getMaximumSize()
Get the largest size at which this Widget can reasonably be drawn. |
java.lang.String |
getText()
Get the text which appears on this label. |
BLabel.Position |
getTextPosition()
Get the position of the text relative to the image. |
void |
setAlignment(BLabel.Position alignment)
Set the alignment of the label's contents. |
void |
setIcon(javax.swing.Icon image)
Set the image which appears on this label. |
void |
setText(java.lang.String text)
Set the text which appears on this label. |
void |
setTextPosition(BLabel.Position position)
Set the position of the text relative to the image. |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible |
Methods inherited from class buoy.event.EventSource |
---|
addEventLink, addEventLink, removeEventLink |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BLabel.Position CENTER
public static final BLabel.Position NORTH
public static final BLabel.Position SOUTH
public static final BLabel.Position WEST
public static final BLabel.Position EAST
public static final BLabel.Position NORTHEAST
public static final BLabel.Position SOUTHEAST
public static final BLabel.Position NORTHWEST
public static final BLabel.Position SOUTHWEST
Constructor Detail |
---|
public BLabel()
public BLabel(java.lang.String text)
text
- the text to display on the BLabelpublic BLabel(java.lang.String text, BLabel.Position align)
text
- the text to display on the BLabelalign
- the alignment of the label contents (CENTER, NORTH, NORTHEAST, etc.)public BLabel(javax.swing.Icon image)
image
- the image to display on the BLabelpublic BLabel(javax.swing.Icon image, BLabel.Position align)
image
- the image to display on the BLabelalign
- the alignment of the label contents (CENTER, NORTH, NORTHEAST, etc.)public BLabel(java.lang.String text, javax.swing.Icon image, BLabel.Position align, BLabel.Position textPos)
text
- the text to display on the BLabelimage
- the image to display on the BLabelalign
- the alignment of the label contents (CENTER, NORTH, NORTHEAST, etc.)textPos
- the position of the text relative to the image (CENTER, NORTH, NORTHEAST, etc.)Method Detail |
---|
public javax.swing.JLabel getComponent()
Widget
getComponent
in class Widget
public java.lang.String getText()
public void setText(java.lang.String text)
public javax.swing.Icon getIcon()
public void setIcon(javax.swing.Icon image)
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class Widget
public BLabel.Position getAlignment()
public void setAlignment(BLabel.Position alignment)
public BLabel.Position getTextPosition()
public void setTextPosition(BLabel.Position position)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |