|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.kuix.widget.Widget
org.kalmeo.kuix.widget.FocusableWidget
org.kalmeo.kuix.widget.TextWidget
public abstract class TextWidget
This class is base for all text widgets.
For further informations, visit the Kuix widgets reference page.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget |
---|
Widget.BindInstruction |
Field Summary | |
---|---|
protected java.lang.String |
text
|
Fields inherited from class org.kalmeo.kuix.widget.FocusableWidget |
---|
DISABLED_PSEUDO_CLASS, enabled, focusable, focused, HOVER_PSEUDO_CLASS, PSEUDO_CLASSES |
Fields inherited from class org.kalmeo.kuix.widget.Widget |
---|
bindInstructions, DEFAULT_ALIGN, DEFAULT_BACKGROUND_ALIGN, DEFAULT_BACKGROUND_REPEAT, DEFAULT_BORDER, DEFAULT_GAP, DEFAULT_MARGIN, DEFAULT_MIN_SIZE, DEFAULT_PADDING, DEFAULT_SPAN, DEFAULT_WEIGHT, next, parent, previous |
Constructor Summary | |
---|---|
TextWidget(java.lang.String tag)
Construct a TextWidget |
Method Summary | |
---|---|
void |
clearCachedStyle(boolean propagateToChildren)
Clear the cachedStyle. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the specified attribute |
protected java.lang.Object |
getDefaultStylePropertyValue(java.lang.String name)
Returns the de default style property value for name
property, or null . |
protected java.lang.String |
getDisplayedText()
Returns the displayed text. |
protected Font |
getFont()
|
java.lang.String |
getText()
Returns the text value. |
boolean |
isFocusable()
Check if this Widget is focusable. |
boolean |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value to the specified attribute representing by
the name |
void |
setDefaultFontFace(int defaultFontFace)
|
void |
setDefaultFontSize(int defaultFontSize)
|
void |
setDefaultFontStyle(int defaultFontStyle)
|
TextWidget |
setText(java.lang.String text)
Returns the instance of this TextWidget
Useful in this case :
AbstractTextWidget text = new Text().setText("message"); |
Methods inherited from class org.kalmeo.kuix.widget.FocusableWidget |
---|
getAvailablePseudoClasses, getOnFocus, getOnLostFocus, giveFocusToNearestWidget, isEnabled, isFocused, isPseudoClassCompatible, onAdded, processFocusEvent, processPointerEvent, remove, requestFocus, setEnabled, setFocusable, setOnFocus, setOnLostFocus, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String text
Constructor Detail |
---|
public TextWidget(java.lang.String tag)
TextWidget
tag
- Method Detail |
---|
public boolean setAttribute(java.lang.String name, java.lang.String value)
Widget
value
to the specified attribute representing by
the name
setAttribute
in class FocusableWidget
true
if the attribute existspublic java.lang.Object getAttribute(java.lang.String name)
Widget
getAttribute
in class FocusableWidget
public boolean isFocusable()
Widget
Widget
is focusable.
isFocusable
in class FocusableWidget
true
if the widget is focusablepublic void setDefaultFontFace(int defaultFontFace)
defaultFontFace
- the defaultFontFace to setpublic void setDefaultFontStyle(int defaultFontStyle)
defaultFontStyle
- the defaultFontStyle to setpublic void setDefaultFontSize(int defaultFontSize)
defaultFontSize
- the defaultFontSize to setpublic java.lang.String getText()
protected java.lang.String getDisplayedText()
public TextWidget setText(java.lang.String text)
TextWidget
Useful in this case :
AbstractTextWidget text = new Text().setText("message");
text
- the text to setprotected Font getFont()
Text
protected java.lang.Object getDefaultStylePropertyValue(java.lang.String name)
Widget
name
property, or null
.
getDefaultStylePropertyValue
in class Widget
name
propertypublic void clearCachedStyle(boolean propagateToChildren)
Widget
clearCachedStyle
in class Widget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |