org.kalmeo.kuix.widget
Class RadioGroup

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.List
          extended by org.kalmeo.kuix.widget.RadioGroup

public class RadioGroup
extends List

This class represents a radio buttons group.

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.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
RadioGroup()
          Construct a RadioGroup
RadioGroup(java.lang.String tag)
          Construct a RadioGroup
 
Method Summary
 Widget add(Widget widget)
          Add a Widget to this as child
 void cleanUp()
          CleanUp all widget's link and propagate the action on its children.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the specified attribute
 java.lang.String getOnChange()
           
 RadioButton getSelectedRadioButton()
           
 java.lang.String getValue()
           
protected  void onChildRemoved(Widget widget)
          Event called when the child widjet is removed.
protected  void processNewRadioButtonValue(RadioButton radioButton)
           
 boolean setAttribute(java.lang.String name, java.lang.String value)
          Set the value to the specified attribute representing by the name
 void setOnChange(java.lang.String onChange)
           
 void setSelectedRadioButton(RadioButton radioButton, boolean propagateChangeEvent)
          Set the current selected RadioButton.
 void setValue(java.lang.String value)
          Check if the value exists in RadioButton children value and the select the first occurrence
 
Methods inherited from class org.kalmeo.kuix.widget.List
addItem, addItem, addItem, addItem, getDefaultStylePropertyValue, getItemWidget, getRenderer, isObjectAttribute, processItemsModelUpdateEvent, removeAllItems, removeItem, setItems, setObjectAttribute, setRenderer
 
Methods inherited from class org.kalmeo.kuix.widget.Widget
add, bringNear, bringToFront, catchChildrenFrom, cleanUpChildren, clearCachedStyle, doLayout, getAlign, getAuthorStyle, getAvailablePseudoClasses, 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, getLayout, 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, isFocusable, isFocused, isFocusWidgetChild, isIndividualyVisible, isInvalidated, isInWidgetTree, isPseudoClassCompatible, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onAdded, onChildAdded, onFocus, onLostFocus, onRemoved, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processActionEvent, processDataBindEvent, processFocusEvent, processKeyEvent, processModelUpdateEvent, processPointerEvent, processShortcutKeyEvent, propagateFocusEvent, remove, removeAll, removeAttributeBindInstruction, requestBackwardFocus, requestFocus, requestForwardFocus, sendToBack, setAttributeBindInstruction, setAuthorStyle, setBounds, setDataProvider, setId, setShortcutKeyCodes, setShortcuts, setStyleClass, setStyleClasses, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadioGroup

public RadioGroup()
Construct a RadioGroup


RadioGroup

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

Parameters:
tag -
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 List
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 Widget
Returns:
The value of the specified attribute

getValue

public java.lang.String getValue()
Returns:
the select radio button value

setValue

public void setValue(java.lang.String value)
Check if the value exists in RadioButton children value and the select the first occurrence

Parameters:
value -

getOnChange

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

setOnChange

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

getSelectedRadioButton

public RadioButton getSelectedRadioButton()
Returns:
the selectedButton

setSelectedRadioButton

public void setSelectedRadioButton(RadioButton radioButton,
                                   boolean propagateChangeEvent)
Set the current selected RadioButton.

Parameters:
radioButton - the selectedButton to set
propagateChangeEvent - if true the onChange event could be propagated

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

cleanUp

public void cleanUp()
Description copied from class: Widget
CleanUp all widget's link and propagate the action on its children.
Caution : This method do NOT remove the widget from widget tree. It only clean external references like dataBinding, menu cache, etc...

Overrides:
cleanUp in class Widget

processNewRadioButtonValue

protected void processNewRadioButtonValue(RadioButton radioButton)
Parameters:
radioButton -

onChildRemoved

protected void onChildRemoved(Widget widget)
Description copied from class: Widget
Event called when the child widjet is removed.

Overrides:
onChildRemoved in class Widget
Parameters:
widget - The widget child witch is removed


Copyright © 2007-2008 Kalmeo. All Rights Reserved.