LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyPopupMenuBase

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyPopupMenuBase
All Implemented Interfaces:
LyGetControllerInterface, LyGetIdInterface, LySetControllerInterface, LySetEnabledInterface
Direct Known Subclasses:
LyPopupMenu

public abstract class LyPopupMenuBase
extends LyComponent
implements LyGetIdInterface, LyGetControllerInterface, LySetControllerInterface, LySetEnabledInterface

The LyPopupMenuBase class is a generated Java implementation that corresponds to the element POPUP_MENU of the descriptive grammar of the views (views.dtd). <POPUP_MENU> : Popup Menu A popup menu is a menu which positioning and content depends on the context that made possible to display it. This context depends, most of the time, of an element belonging to a high-level graphical object (tree node, element of a map, line of a list,...). If need be, this context is used as context for the launched action. The context-sensitive menus are available only with the Swing and SWT viewers.

See Also:
LyComponent, See also tag POPUP_MENU of grammar leon_views.dtd.

Nested Class Summary
static class LyPopupMenuBase.Style
          Possible values for attribute 'style'.
 
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
LyPopupMenuBase()
          Default constructor.
 
Method Summary
 void addItem(LyItem item)
          Adds a sub-component item.
 void addMenu(LyMenu menu)
          Adds a sub-component menu.
 void addSep()
          Adds a separator.
 LyComponent cloneComponent()
          Method for cloning a component.
 java.lang.String getColor()
          Gets value of color.
 LyComponent getComponent(int i)
          Get sub-component Component of index i.
 int getComponentCount()
          Get sub-component Component count.
 java.lang.String getController()
          Gets value of controller.
 java.lang.String getFont()
          Gets value of font.
 java.lang.String getFontColor()
          Gets value of fontColor.
 java.lang.String getId()
          Gets value of id.
 LyPopupMenuBase.Style getStyle()
          Gets value of style.
static LyPopupMenuBase.Style getStyle(java.lang.String token)
          Utility method to get style value from a string.
 LyPopupMenu getTemplate()
          Gets value of template.
 int getX()
          Gets value of x.
 int getY()
          Gets value of y.
 void insertItem(LyItem item, int pos)
          Inserts a sub-component item at given position.
 void insertMenu(LyMenu menu, int pos)
          Inserts a sub-component menu at given position.
 void insertSep(int pos)
          Inserts a separator at the given position.
 boolean isDefaultColor()
          Checks whether the color attribute is valuated to the default value.
 boolean isDefaultFont()
          Checks whether the font attribute is valuated to the default value.
 boolean isDefaultFontColor()
          Checks whether the fontColor attribute is valuated to the default value.
 boolean isEnabled()
          Checks if value of attribute enabled is set.
 void removeItem(LyItem item)
          Removes a sub-component item.
 void removeMenu(LyMenu menu)
          Removes a sub-component menu.
 void removeSep(int pos)
          Removes a separator at the given position.
 void setColor(java.lang.String color)
          Initializes attribute color to the given value.
 void setController(java.lang.String controller)
          Initializes attribute controller to the given value.
 void setEnabled(boolean enabled)
          Sets attribute enabled to the given value.
 void setFont(java.lang.String font)
          Initializes attribute font to the given value.
 void setFontColor(java.lang.String fontColor)
          Initializes attribute fontColor to the given value.
 void setId(java.lang.String id)
          Initializes attribute id to the given value.
 void setStyle(LyPopupMenuBase.Style style)
          Initializes attribute style to the given value.
 void setTemplate(LyPopupMenu template)
          Initializes attribute template to the given value.
 void setX(int x)
          Initializes attribute x to the given value.
 void setY(int y)
          Initializes attribute y to the given value.
 void writeXml(java.io.PrintWriter pw, boolean debug)
          Method to rewrite XML corresponding to this component.
 
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
 

Field Detail

__VERSION

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

LyPopupMenuBase

public LyPopupMenuBase()
Default constructor.

Method Detail

getStyle

public static final LyPopupMenuBase.Style getStyle(java.lang.String token)
Utility method to get style value from a string.

Parameters:
token - Token string
Returns:
Style value corresponding to this token

cloneComponent

public LyComponent cloneComponent()
Method for cloning a component.

Specified by:
cloneComponent in class LyComponent

getId

public java.lang.String getId()
Gets value of id.

Specified by:
getId in interface LyGetIdInterface
Overrides:
getId in class LyComponent
Returns:
value of id.

getTemplate

public LyPopupMenu getTemplate()
Gets value of template.

Returns:
value of template.

getController

public java.lang.String getController()
Gets value of controller.

Specified by:
getController in interface LyGetControllerInterface
Returns:
value of controller.

isEnabled

public boolean isEnabled()
Checks if value of attribute enabled is set.

Returns:
true if enabled is set, false otherwise.

getStyle

public LyPopupMenuBase.Style getStyle()
Gets value of style.

Returns:
value of style.

getX

public int getX()
Gets value of x.

Returns:
value of x.

getY

public int getY()
Gets value of y.

Returns:
value of y.

getFont

public java.lang.String getFont()
Gets value of font.

Returns:
value of font.

isDefaultFont

public boolean isDefaultFont()
Checks whether the font attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getColor

public java.lang.String getColor()
Gets value of color.

Returns:
value of color.

isDefaultColor

public boolean isDefaultColor()
Checks whether the color attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getFontColor

public java.lang.String getFontColor()
Gets value of fontColor.

Returns:
value of fontColor.

isDefaultFontColor

public boolean isDefaultFontColor()
Checks whether the fontColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getComponent

public LyComponent getComponent(int i)
Get sub-component Component of index i.

Parameters:
i - the index of the Component to get.
Returns:
sub-component Component of index i.

getComponentCount

public int getComponentCount()
Get sub-component Component count.

Returns:
sub-component Component count.

setId

public void setId(java.lang.String id)
Initializes attribute id to the given value.

Parameters:
id - New value of id.

setTemplate

public void setTemplate(LyPopupMenu template)
Initializes attribute template to the given value.

Parameters:
template - New value of template.

setController

public void setController(java.lang.String controller)
Initializes attribute controller to the given value.

Specified by:
setController in interface LySetControllerInterface
Parameters:
controller - New value of controller.
See Also:
LySetControllerInterface.setController(java.lang.String)

setEnabled

public void setEnabled(boolean enabled)
Sets attribute enabled to the given value.

Specified by:
setEnabled in interface LySetEnabledInterface
Parameters:
enabled - Boolean indicating if attribute enabled is set or unset.

setStyle

public void setStyle(LyPopupMenuBase.Style style)
Initializes attribute style to the given value.

Parameters:
style - New value of style.
Throws:
java.lang.IllegalArgumentException - if style parameter is null.

setX

public void setX(int x)
Initializes attribute x to the given value.

Parameters:
x - New value of x.

setY

public void setY(int y)
Initializes attribute y to the given value.

Parameters:
y - New value of y.

setFont

public void setFont(java.lang.String font)
Initializes attribute font to the given value.

Parameters:
font - New value of font.

setColor

public void setColor(java.lang.String color)
Initializes attribute color to the given value.

Parameters:
color - New value of color.

setFontColor

public void setFontColor(java.lang.String fontColor)
Initializes attribute fontColor to the given value.

Parameters:
fontColor - New value of fontColor.

addItem

public void addItem(LyItem item)
Adds a sub-component item.

Parameters:
item - The item to add to components list.

insertItem

public void insertItem(LyItem item,
                       int pos)
Inserts a sub-component item at given position.

Parameters:
item - The item to add to components list.
pos - Position where the sub-component is inserted.

removeItem

public void removeItem(LyItem item)
Removes a sub-component item.

Parameters:
item - The item to remove to components list.
Throws:
java.lang.IllegalStateException - if components list is empty.
java.lang.IllegalArgumentException - if components list doesn't contain item.

addSep

public void addSep()
Adds a separator.


insertSep

public void insertSep(int pos)
Inserts a separator at the given position.

Parameters:
pos - Position where the separator is inserted.

removeSep

public void removeSep(int pos)
Removes a separator at the given position.

Parameters:
pos - Position where the separator is removed.
Throws:
java.lang.IllegalStateException - if components list is empty.
java.lang.IllegalArgumentException - if components list doesn't contain a separator at the given position.

addMenu

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

Parameters:
menu - The menu to add to components list.

insertMenu

public void insertMenu(LyMenu menu,
                       int pos)
Inserts a sub-component menu at given position.

Parameters:
menu - The menu to add to components list.
pos - Position where the sub-component is inserted.

removeMenu

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

Parameters:
menu - The menu to remove to components list.
Throws:
java.lang.IllegalStateException - if components list is empty.
java.lang.IllegalArgumentException - if components list doesn't contain menu.

writeXml

public void writeXml(java.io.PrintWriter pw,
                     boolean debug)
Method to rewrite XML corresponding to this component.

Specified by:
writeXml in class LyComponent
Parameters:
pw - the printWriter on which the XML is written.
debug - true if debug mode (full dump).

(c) January 2013 - W4 S.A.

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