org.kalmeo.kuix.widget
Class Menu

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.FocusableWidget
          extended by org.kalmeo.kuix.widget.ActionWidget
              extended by org.kalmeo.kuix.widget.ListItem
                  extended by org.kalmeo.kuix.widget.MenuItem
                      extended by org.kalmeo.kuix.widget.Menu
Direct Known Subclasses:
Screen.ScreenMenu

public class Menu
extends MenuItem

This class represents a menu.

For further informations, visit the Kuix widgets reference page.

Author:
bbeaulant

Nested Class Summary
 class Menu.MenuPopup
          This class represents a menu popup
 
Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget
Widget.BindInstruction
 
Field Summary
protected  Menu.MenuPopup popup
           
 
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
Menu()
          Construct a Menu
Menu(java.lang.String tag)
          Construct a Menu
 
Method Summary
 void cleanUp()
          CleanUp all widget's link and propagate the action on its children.
 int getDepth()
           
 Widget getInternalChildInstance(java.lang.String tag)
          Returns the first internal child instance corresponding to the given tag.
 Menu.MenuPopup getPopup()
           
protected static void hideAllMenuPopups()
          Hide all visible menuPopups
 void hideMenuTree()
          Hide the menu tree
 void hidePopup()
          Close the menuPopup
 boolean processActionEvent()
          Process action event
 void removeAll()
          Remove all childs.
 void showPopup()
          Open the menuPopup
 void showPopup(int displayX, int displayY)
          Open the menuPopup
 
Methods inherited from class org.kalmeo.kuix.widget.ListItem
getDefaultStylePropertyValue
 
Methods inherited from class org.kalmeo.kuix.widget.ActionWidget
getOnAction, processKeyEvent, processPointerEvent, processShortcutKeyEvent, setAttribute, setOnAction
 
Methods inherited from class org.kalmeo.kuix.widget.FocusableWidget
getAttribute, 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, cleanUpChildren, clearCachedStyle, doLayout, 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, 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, isFocusWidgetChild, isIndividualyVisible, isInvalidated, isInWidgetTree, isObjectAttribute, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onChildAdded, onChildRemoved, onFocus, onLostFocus, onRemoved, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processDataBindEvent, processItemsModelUpdateEvent, processModelUpdateEvent, propagateFocusEvent, 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

popup

protected Menu.MenuPopup popup
Constructor Detail

Menu

public Menu()
Construct a Menu


Menu

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

Parameters:
tag -
Method Detail

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.

getPopup

public Menu.MenuPopup getPopup()
Returns:
the popup

getDepth

public int getDepth()
Returns:
the depth

showPopup

public void showPopup()
Open the menuPopup


showPopup

public void showPopup(int displayX,
                      int displayY)
Open the menuPopup

Parameters:
displayX -
displayY -

hidePopup

public void hidePopup()
Close the menuPopup


hideMenuTree

public void hideMenuTree()
Hide the menu tree


hideAllMenuPopups

protected static void hideAllMenuPopups()
Hide all visible menuPopups


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

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

processActionEvent

public boolean processActionEvent()
Description copied from class: Widget
Process action event

Overrides:
processActionEvent in class MenuItem
Returns:
true if the event is treated by the widget


Copyright © 2007-2008 Kalmeo. All Rights Reserved.