org.kalmeo.kuix.widget
Class Text

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.FocusableWidget
          extended by org.kalmeo.kuix.widget.TextWidget
              extended by org.kalmeo.kuix.widget.Text
Direct Known Subclasses:
TextField

public class Text
extends TextWidget

This class represents a text.

For further informations, visit the Kuix widgets reference page.

Author:
bbeaulant

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 org.kalmeo.kuix.widget.Widget
add, bringNear, bringToFront, catchChildrenFrom, cleanUp, cleanUpChildren, getAlign, getAuthorStyle, getBackgroundAlign, getBackgroundColor, getBackgroundImage, getBackgroundRepeat, getBorder, getBorderAlign, getBorderColor, getBorderImage, getBorderStroke, getCachedMetrics, getChild, getColor, getDataProvider, getDesktop, getDisplayX, getDisplayY, getFocusManager, getGap, getGrayedColor, getHeight, getId, getInheritedTag, getInnerHeight, getInnerWidth, getInsets, getInternalChildInstance, getLastChild, getLayoutData, getMargin, getMinSize, getOtherFocus, getPadding, getSpan, getStyleClasses, getStylePropertyValue, getStyles, getTag, getWeight, getWidget, getWidgetAt, getWidgetAt, getWidth, getX, getY, hasBindInstruction, hasShortcutKeyCodes, hasShortcuts, invalidate, invalidate, invalidateAppearance, invalidateAppearanceRegion, invalidateStylePropertiesCache, isFocusWidgetChild, isIndividualyVisible, isInvalidated, isInWidgetTree, isObjectAttribute, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onChildAdded, onChildRemoved, onRemoved, paintBackground, paintBorder, paintImpl, paintMosaicImage, parseAuthorStyle, processActionEvent, processDataBindEvent, processItemsModelUpdateEvent, processKeyEvent, processModelUpdateEvent, processShortcutKeyEvent, propagateFocusEvent, removeAll, removeAttributeBindInstruction, requestBackwardFocus, requestForwardFocus, sendToBack, setAttributeBindInstruction, setAuthorStyle, setBounds, setDataProvider, setId, setObjectAttribute, setShortcutKeyCodes, setShortcuts, setStyleClass, setStyleClasses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textX

protected int textX

textY

protected int textY

insetHeight

protected int insetHeight
Constructor Detail

Text

public Text()
Construct a Text


Text

public Text(java.lang.String tag)
Construct a Text

Parameters:
tag -
Method Detail

getLayout

public Layout getLayout()
Overrides:
getLayout in class Widget
Returns:
the layout

getPreferredSize

public Metrics getPreferredSize(int preferredWidth)
Description copied from class: Widget
Returns the prefered size of this Widget

Overrides:
getPreferredSize in class Widget
Returns:
The prefered size of this Widget

add

public Widget add(Widget widget)
Description copied from class: Widget
Add a Widget to this as child

Overrides:
add in class Widget
Parameters:
widget - The Widget to add
Returns:
This Widget

doLayout

protected void doLayout()
Description copied from class: Widget
Layout the widget if its layout is defined.

Overrides:
doLayout in class Widget

paint

public void paint(Graphics g)
Description copied from class: Widget
Paint the widget itself.

Overrides:
paint in class Widget

paintChildrenImpl

protected void paintChildrenImpl(Graphics g)
Description copied from class: Widget
Invoke the paintImpl method on widget's children.

Overrides:
paintChildrenImpl in class Widget

onFocus

protected void onFocus(Widget focusedWidget)
Description copied from class: Widget
Call when the widget or one of its parents gain the focus.

Overrides:
onFocus in class Widget

onLostFocus

protected void onLostFocus(Widget focusedWidget)
Description copied from class: Widget
Call when the widget or one of its parents lost the focus.

Overrides:
onLostFocus in class Widget


Copyright © 2007-2008 Kalmeo. All Rights Reserved.