|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.yospace.yae.yogi.YogiComponent
|
+--com.yospace.yae.yogi.YogiImageComponent
|
+--com.yospace.yae.yogi.YogiLabel
A basic graphical label component which has a text value (which can be aligned
using the alignment values in YogiComponent), and an image (inheritted from
YogiImageComponent).
It then uses a corresponding UI which draws the text and image inside a graphical label.
| Field Summary | |
static int |
PROPERTY_TEXT
Constant for the text property |
static int |
PROPERTY_TEXT_PLACEMENT
Constant for the text placement property |
| Fields inherited from class com.yospace.yae.yogi.YogiImageComponent |
PROPERTY_IMAGE |
| Constructor Summary | |
YogiLabel()
Default constructor sets up basic default model with the image and text both set to null. |
|
YogiLabel(java.lang.String text,
Image image)
Create a YogiLabel with the given text and image. |
|
| Method Summary | |
YogiComponent |
getCellRendererComponent(AbstractTable table,
java.lang.Object value,
boolean isSelected,
boolean cellHasFocus)
Provided to implement the RendererFactory interface. |
java.lang.String |
getText()
Get the displayable text currently associated with the YogiLabel. |
boolean |
isTextOnRight()
Returns whether the ordering is image then text. |
void |
setText(java.lang.String newText)
Set the displayable text currently associated with the YogiLabel. |
protected void |
setTextImpl(java.lang.String newText)
Implementation method for setting the text - note that setText() may be overridden by subclasses. |
void |
setTextOnRight(boolean textOnRight)
Sets the left-to-right ordering of the text and image. |
| Methods inherited from class com.yospace.yae.yogi.YogiImageComponent |
getImage, getImageName, setImage, setImage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PROPERTY_TEXT
public static final int PROPERTY_TEXT_PLACEMENT
| Constructor Detail |
public YogiLabel()
public YogiLabel(java.lang.String text,
Image image)
text - the text to be displayed.image - the Image to be displayed.| Method Detail |
public java.lang.String getText()
public void setText(java.lang.String newText)
newText - the desired text for this label. Must not be null.protected final void setTextImpl(java.lang.String newText)
newText - the desired text for this label. Must not be null.public void setTextOnRight(boolean textOnRight)
If the value changes, the component is repainted and a PROPERTY_TEXT_PLACEMENT change event
is fired.
textOnRight - if true then the order will be image then text, else it will be text then image.public boolean isTextOnRight()
public YogiComponent getCellRendererComponent(AbstractTable table,
java.lang.Object value,
boolean isSelected,
boolean cellHasFocus)
RendererFactory interface.
Returns a YogiLabel customised to the arguments passed from the
AbstractTable subclass.getCellRendererComponent in interface RendererFactorygetCellRendererComponent in class YogiImageComponenttable - The table for which the check box is rendering.value - The object to be custom rendererd.isSelected - The selected state of the object to be custom rendererd.cellHasFocus - The focus state of the object to be custom rendererd.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||