org.kalmeo.kuix.widget
Class TabFolder

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

public class TabFolder
extends List

This class represents a tab folder.

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
TabFolder()
          Construct a TabFolder
 
Method Summary
 Widget add(Widget widget)
          Add a Widget to this as child
 void addTabItem(TabItem tabItem)
          Add a new TabItem
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the specified attribute
 int getBackwardTabKey()
          Returns the backwardTabKey.
 ScrollPane getButtonsContainer()
          Returns the buttonsContainer.
 Widget getContainer()
          Returns the container.
 TabItem getCurrentTabItem()
           
 Widget getDefaultTabItem()
          Returns the defaultTabItem.
 int getForwardTabKey()
          Returns the forwardTabKey.
 Widget getInternalChildInstance(java.lang.String tag)
          Returns the first internal child instance corresponding to the given tag.
 Layout getLayout()
           
 boolean isFocusWidgetChild()
          Check if this Widget is a child of a focused widget.
protected  void onAdded(Widget parent)
          Event called when the widjet is added to parent.
 boolean processKeyEvent(byte type, int kuixKeyCode)
          Process a key event
protected  void propagateFocusEvent(Widget focusedWidget, boolean lost)
          Propagate focus lost or gain event to widget's children.
 void removeAll()
          Remove all childs.
 void removeAllItems()
          Remove all items
 void selectNextTab()
          Select the next enabled tab.
protected  void selectOtherTab(boolean forward, boolean unselectIfNoOther)
          Select an other enabled tab.
 void selectPreviousTab()
          Select the previous enabled tab.
 boolean setAttribute(java.lang.String name, java.lang.String value)
          Set the value to the specified attribute representing by the name
 void setBackwardTabKey(int backwardTabKey)
          Set the backwardTabKey.
 void setCurrentTabItem(TabItem tabItem)
          Set the current TabItem (only if this instance is a child of the TabFolder)
 void setForwardTabKey(int forwardTabKey)
          Set the forwardTabKey.
 
Methods inherited from class org.kalmeo.kuix.widget.List
addItem, addItem, addItem, addItem, getDefaultStylePropertyValue, getItemWidget, getRenderer, isObjectAttribute, processItemsModelUpdateEvent, removeItem, setItems, setObjectAttribute, setRenderer
 
Methods inherited from class org.kalmeo.kuix.widget.Widget
add, bringNear, bringToFront, catchChildrenFrom, cleanUp, 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, 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, isFocusable, isFocused, isIndividualyVisible, isInvalidated, isInWidgetTree, isPseudoClassCompatible, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onChildAdded, onChildRemoved, onFocus, onLostFocus, onRemoved, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processActionEvent, processDataBindEvent, processFocusEvent, processModelUpdateEvent, processPointerEvent, processShortcutKeyEvent, remove, 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

TabFolder

public TabFolder()
Construct a TabFolder

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

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.

isFocusWidgetChild

public boolean isFocusWidgetChild()
Description copied from class: Widget
Check if this Widget is a child of a focused widget.

Overrides:
isFocusWidgetChild in class Widget
Returns:
true if this Widget is a child of a focused widget

getLayout

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

getDefaultTabItem

public Widget getDefaultTabItem()
Returns the defaultTabItem. The default tab item is the TabItem used if no other tab are enabled.

Returns:
the defaultTabItem

getBackwardTabKey

public int getBackwardTabKey()
Returns the backwardTabKey. The backward tab key represents the KuixKeyCode used as shortcut to switch to the backward tab.

Returns:
the previousTabKey

setBackwardTabKey

public void setBackwardTabKey(int backwardTabKey)
Set the backwardTabKey. The backward tab key represents the KuixKeyCode used as shortcut to switch to the backward tab.

Parameters:
backwardTabKey - to set

getForwardTabKey

public int getForwardTabKey()
Returns the forwardTabKey. The forward tab key represents the KuixKeyCode used as shortcut to switch to the forward tab.

Returns:
the nextTabKey

setForwardTabKey

public void setForwardTabKey(int forwardTabKey)
Set the forwardTabKey. The forward tab key represents the KuixKeyCode used as shortcut to switch to the forward tab.

Parameters:
forwardTabKey - to set

getButtonsContainer

public ScrollPane getButtonsContainer()
Returns the buttonsContainer. The buttonsContainer is the widget that holds tabItems buttons (TabItem.TabItemButton).

Returns:
the buttonsContainer

getContainer

public Widget getContainer()
Returns the container. The container is the widget that holds tabItems.

Returns:
the container

getCurrentTabItem

public TabItem getCurrentTabItem()
Returns:
the currentTabItem

setCurrentTabItem

public void setCurrentTabItem(TabItem tabItem)
Set the current TabItem (only if this instance is a child of the TabFolder)

Parameters:
tabItem -

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

addTabItem

public void addTabItem(TabItem tabItem)
Add a new TabItem

Parameters:
tabItem -

removeAllItems

public void removeAllItems()
Description copied from class: List
Remove all items

Overrides:
removeAllItems in class List

removeAll

public void removeAll()
Description copied from class: Widget
Remove all childs.
Caution : this method do NOT cleanUp child widgets. It only remove widgets from widget tree.

Overrides:
removeAll in class Widget

selectOtherTab

protected void selectOtherTab(boolean forward,
                              boolean unselectIfNoOther)
Select an other enabled tab.

Parameters:
forward -
unselectIfNoOther -

selectPreviousTab

public void selectPreviousTab()
Select the previous enabled tab.


selectNextTab

public void selectNextTab()
Select the next enabled tab.


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

propagateFocusEvent

protected void propagateFocusEvent(Widget focusedWidget,
                                   boolean lost)
Description copied from class: Widget
Propagate focus lost or gain event to widget's children.

Overrides:
propagateFocusEvent in class Widget

onAdded

protected void onAdded(Widget parent)
Description copied from class: Widget
Event called when the widjet is added to parent.

Overrides:
onAdded in class Widget


Copyright © 2007-2008 Kalmeo. All Rights Reserved.