org.kalmeo.kuix.widget
Class Gauge

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.FocusableWidget
          extended by org.kalmeo.kuix.widget.Gauge

public class Gauge
extends FocusableWidget

This class represents a gauge.

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
 
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
Gauge()
          Construct a Gauge
 
Method Summary
protected  void doLayout()
          Layout the widget if its layout is defined.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the specified attribute
 Widget getBar()
           
 int getIncrement()
           
 Widget getInternalChildInstance(java.lang.String tag)
          Returns the first internal child instance corresponding to the given tag.
 Layout getLayout()
           
 java.lang.String getOnChange()
           
 int getValue()
           
 boolean processKeyEvent(byte type, int kuixKeyCode)
          Process a key event
 boolean processPointerEvent(byte type, int x, int y)
          Process a pointer event
 boolean setAttribute(java.lang.String name, java.lang.String value)
          Set the value to the specified attribute representing by the name
 void setIncrement(int increment)
           
 void setOnChange(java.lang.String onChange)
           
 void setValue(int value)
           
 
Methods inherited from class org.kalmeo.kuix.widget.FocusableWidget
getAvailablePseudoClasses, getOnFocus, getOnLostFocus, giveFocusToNearestWidget, isEnabled, isFocusable, isFocused, isPseudoClassCompatible, onAdded, processFocusEvent, remove, requestFocus, setEnabled, setFocusable, setOnFocus, setOnLostFocus, setVisible
 
Methods inherited from class org.kalmeo.kuix.widget.Widget
add, add, bringNear, bringToFront, catchChildrenFrom, cleanUp, cleanUpChildren, clearCachedStyle, getAlign, getAuthorStyle, getBackgroundAlign, getBackgroundColor, getBackgroundImage, getBackgroundRepeat, getBorder, getBorderAlign, getBorderColor, getBorderImage, getBorderStroke, getCachedMetrics, getChild, getColor, getDataProvider, getDefaultStylePropertyValue, getDesktop, getDisplayX, getDisplayY, getFocusManager, getGap, getGrayedColor, getHeight, getId, getInheritedTag, getInnerHeight, getInnerWidth, getInsets, getLastChild, getLayoutData, getMargin, getMinSize, getOtherFocus, getPadding, getPreferredSize, 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, onFocus, onLostFocus, onRemoved, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processActionEvent, processDataBindEvent, processItemsModelUpdateEvent, 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
 

Constructor Detail

Gauge

public Gauge()
Construct a Gauge

Method Detail

setAttribute

public boolean setAttribute(java.lang.String name,
                            java.lang.String value)
Description copied from class: Widget
Set the value to the specified attribute representing by the name

Overrides:
setAttribute in class FocusableWidget
Returns:
true if the attribute exists

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Description copied from class: Widget
Returns the value of the specified attribute

Overrides:
getAttribute in class FocusableWidget
Returns:
The value of the specified attribute

getInternalChildInstance

public Widget getInternalChildInstance(java.lang.String tag)
Description copied from class: Widget
Returns the first internal child instance corresponding to the given tag.

Overrides:
getInternalChildInstance in class Widget
Returns:
the child instance if it exists.

getBar

public Widget getBar()
Returns:
the bar

getValue

public int getValue()
Returns:
a fixed-point integer representing the value

setValue

public void setValue(int value)
Parameters:
value - a fixed-point integer representing the value

getIncrement

public int getIncrement()
Returns:
the increment

setIncrement

public void setIncrement(int increment)
Parameters:
increment - the increment to set

getOnChange

public java.lang.String getOnChange()
Returns:
the onChange

setOnChange

public void setOnChange(java.lang.String onChange)
Parameters:
onChange - the onChange to set

getLayout

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

doLayout

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

Overrides:
doLayout in class Widget

processKeyEvent

public boolean processKeyEvent(byte type,
                               int kuixKeyCode)
Description copied from class: Widget
Process a key event

Overrides:
processKeyEvent in class Widget
Returns:
true if the event is treated by the widget

processPointerEvent

public boolean processPointerEvent(byte type,
                                   int x,
                                   int y)
Description copied from class: Widget
Process a pointer event

Overrides:
processPointerEvent in class FocusableWidget
Returns:
true if the event is treated by the widget


Copyright © 2007-2008 Kalmeo. All Rights Reserved.