org.zaval.lw
Class LwLabel
java.lang.Object
|
+--org.zaval.util.ValidationObject
|
+--org.zaval.lw.LwCanvas
|
+--org.zaval.lw.LwLabel
- All Implemented Interfaces:
- Drawable, Layoutable, LwComponent, Validationable
- Direct Known Subclasses:
- LwTextField
- public class LwLabel
- extends LwCanvas
This light weight component is used to show a text by using LwTextRender as the face view.
Constructor Summary |
LwLabel()
Constructs the componen. |
LwLabel(LwTextRender r)
Constructs the component with the specified text render. |
LwLabel(java.lang.String t)
Constructs the component with the specified string. |
LwLabel(TextModel t)
Constructs the component with the specified text model. |
Methods inherited from class org.zaval.lw.LwCanvas |
calcPreferredSize, canHaveFocus, getBackground, getBounds, getHeight, getInsets, getLocation, getLwComponentAt, getLwParent, getOrigin, getPreferredSize, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isOpaque, isVisible, paint, recalc, repaint, repaint, requestFocus, setBackground, setEnabled, setInsets, setLocation, setLwParent, setOpaque, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LwLabel
public LwLabel()
- Constructs the componen. The text string is set to "".
LwLabel
public LwLabel(java.lang.String t)
- Constructs the component with the specified string.
- Parameters:
t
- the specified string.
LwLabel
public LwLabel(TextModel t)
- Constructs the component with the specified text model.
- Parameters:
t
- the specified text model.
LwLabel
public LwLabel(LwTextRender r)
- Constructs the component with the specified text render.
- Parameters:
r
- the specified text render.
getTextRender
public LwTextRender getTextRender()
- Gets the face view as a LwTextReneder instance.
- Returns:
- a text render instance.
getText
public java.lang.String getText()
- Gets the text that is shown with the class as a string.
- Returns:
- a string.
getTextModel
public TextModel getTextModel()
- Gets the text model that is shown with the class. The text model is represented with
org.zaval.data.TextModel interface.
- Returns:
- a text model.
setText
public void setText(java.lang.String s)
- Sets the specified string to be shown with the class.
- Parameters:
s
- the specified string.
setForeground
public void setForeground(java.awt.Color c)
- Sets the text color. The method uses appropriate method of the text render
that is used as the face view.
- Parameters:
c
- the specified text color.
getForeground
public java.awt.Color getForeground()
- Gets the text color.
- Returns:
- a text color.
makeTextRender
protected LwTextRender makeTextRender(TextModel t)
- The method gets default text render that will be used to render the
specified text model. The render is set as the face view for the component
during the component initialization.
- Parameters:
t
- the specified text model.- Returns:
- a text render that is going to be used as the face view of the component.
Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org