LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyMenuBar

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyMenuBarBase
          extended by leon.view.LyMenuBar
All Implemented Interfaces:
LyGetIdInterface

public class LyMenuBar
extends LyMenuBarBase
implements LyGetIdInterface

The LyMenuBar class implements generic behavior for the MENUBAR components as described in views.dtd regardless of the requested target (win, swing, html...). It represents a menu bar.

See Also:
LyComponent

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyMenuBar()
          Constructor with all required attributes.
 
Method Summary
 void addItemToCache(LyItem item)
          Adds an item to the cache of items.
 void addMenu(LyMenu menu)
          Adds a sub-component menu.
 LyItem findItem(java.lang.String id, java.lang.String controllerId)
          Looks for the LyItem object that has a given id and a given controller.
 LyMenu findMenu(java.lang.String id, java.lang.String controllerId)
          Looks for the LyMenu object that has a given id and a given controller.
 boolean isIdle()
          Indicates wether this menubar is idle or not (idle menu bar do nor refresh the menu contents in views dynamicallly.
 void removeMenu(LyMenu menu)
          Removes a sub-component menu.
 void setIdle(boolean idle)
          Indicates wether this menubar is idle or not (idle menu bar do nor refresh the menu contents in views dynamicallly.
 void setSorted(boolean sorted)
          Indictates wether this menubar is Automatically sorted for its menu content or not.
 
Methods inherited from class leon.view.LyMenuBarBase
cloneComponent, getColor, getFont, getFontColor, getIcon, getId, getMenu, getMenuCount, getTemplate, insertMenu, isDefaultColor, isDefaultFont, isDefaultFontColor, setColor, setFont, setFontColor, setIcon, setId, setTemplate, writeXml
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, free, freeze, getBounds, getChild, getChildCount, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.getinterface.LyGetIdInterface
getId
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyMenuBar

public LyMenuBar()
Constructor with all required attributes.

Method Detail

findMenu

public LyMenu findMenu(java.lang.String id,
                       java.lang.String controllerId)
Looks for the LyMenu object that has a given id and a given controller. The research is made through the hierarchical tree, all the children are taken into account. This is very usefull to retrieve a menu associated to a sub-controller inside a compound view.

Parameters:
id - the identifier of the menu
controllerId - the identifier of the controller to which the menu should belong.
Returns:
the the corresponding LyMenu object or null if not was found.

findItem

public LyItem findItem(java.lang.String id,
                       java.lang.String controllerId)
Looks for the LyItem object that has a given id and a given controller. The research is made through the hierarchical tree, all the children are taken into account. This is very usefull to retrieve a menu item associated to a sub-controller inside a compound view.

Parameters:
id - the identifier of the menu item
controllerId - the identifier of the controller to which the menu item should belong.
Returns:
the the corresponding LyItem object or null if not found.

isIdle

public boolean isIdle()
Indicates wether this menubar is idle or not (idle menu bar do nor refresh the menu contents in views dynamicallly.

Returns:
idle status

setIdle

public void setIdle(boolean idle)
Indicates wether this menubar is idle or not (idle menu bar do nor refresh the menu contents in views dynamicallly.

Parameters:
idle - status

addMenu

public void addMenu(LyMenu menu)
Adds a sub-component menu.

Overrides:
addMenu in class LyMenuBarBase
Parameters:
menu - The menu to add to components list.

addItemToCache

public void addItemToCache(LyItem item)
Adds an item to the cache of items.

Parameters:
item - the item to be added to the cache.

setSorted

public void setSorted(boolean sorted)
Indictates wether this menubar is Automatically sorted for its menu content or not.

Parameters:
sorted - status

removeMenu

public void removeMenu(LyMenu menu)
Removes a sub-component menu.

Overrides:
removeMenu in class LyMenuBarBase
Parameters:
menu - The menu to remove to menus list.
Throws:
java.lang.IllegalStateException - if menus list is empty.
java.lang.IllegalArgumentException - if menus list doesn't contain menu.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com