|
||||||||||
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
org.kalmeo.kuix.widget.Text
public class Text
This class represents a text.
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 int |
insetHeight
|
protected int |
textX
|
protected int |
textY
|
Fields inherited from class org.kalmeo.kuix.widget.TextWidget |
---|
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 | |
---|---|
Text()
Construct a Text |
|
Text(java.lang.String tag)
Construct a Text |
Method Summary | |
---|---|
Widget |
add(Widget widget)
Add a Widget to this as child |
protected void |
doLayout()
Layout the widget if its layout is defined. |
Layout |
getLayout()
|
Metrics |
getPreferredSize(int preferredWidth)
Returns the prefered size of this Widget |
protected void |
onFocus(Widget focusedWidget)
Call when the widget or one of its parents gain the focus. |
protected void |
onLostFocus(Widget focusedWidget)
Call when the widget or one of its parents lost the focus. |
void |
paint(Graphics g)
Paint the widget itself. |
protected void |
paintChildrenImpl(Graphics g)
Invoke the paintImpl method on widget's children. |
Methods inherited from class org.kalmeo.kuix.widget.TextWidget |
---|
clearCachedStyle, getAttribute, getDefaultStylePropertyValue, getDisplayedText, getFont, getText, isFocusable, setAttribute, setDefaultFontFace, setDefaultFontSize, setDefaultFontStyle, setText |
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 int textX
protected int textY
protected int insetHeight
Constructor Detail |
---|
public Text()
Text
public Text(java.lang.String tag)
Text
tag
- Method Detail |
---|
public Layout getLayout()
getLayout
in class Widget
public Metrics getPreferredSize(int preferredWidth)
Widget
Widget
getPreferredSize
in class Widget
Widget
public Widget add(Widget widget)
Widget
Widget
to this as child
add
in class Widget
widget
- The Widget
to add
Widget
protected void doLayout()
Widget
doLayout
in class Widget
public void paint(Graphics g)
Widget
paint
in class Widget
protected void paintChildrenImpl(Graphics g)
Widget
paintImpl
method on widget's children.
paintChildrenImpl
in class Widget
protected void onFocus(Widget focusedWidget)
Widget
onFocus
in class Widget
protected void onLostFocus(Widget focusedWidget)
Widget
onLostFocus
in class Widget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |