ilog.webui.dhtml.components
Class IlxWPopupMenu
- java.lang.Object
-
- ilog.webui.dhtml.IlxWContainer
-
- ilog.webui.dhtml.IlxWComponent
-
- ilog.webui.dhtml.components.IlxWMenuHolder
-
- ilog.webui.dhtml.components.IlxWPopupMenu
-
- All Implemented Interfaces:
- ilog.webui.dhtml.IlxWConstants, ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, ilog.webui.dhtml.IlxWJSObject, java.io.Serializable
public class IlxWPopupMenu extends ilog.webui.dhtml.components.IlxWMenuHolderAn implementation of a popup menu. A popup menu contains a set of menus that can be added with theadd(IlxWMenuItem)method.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ilog.webui.dhtml.IlxWComponent
IlxWComponent.DynamicStyleMap
-
-
Field Summary
-
Fields inherited from class ilog.webui.dhtml.components.IlxWMenuHolder
menuItemDescriptor, menuItemDisabled, menuItemHighlighted, menuItemNames, menuItemNormal, menuItemSeparator
-
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
-
-
Constructor Summary
Constructors Constructor and Description IlxWPopupMenu()
-
Method Summary
Methods Modifier and Type Method and Description IlxWComponentadd(IlxWComponent component)Adds the specified component to the end of this container.IlxWMenuItemadd(IlxWMenuItem menuItem)Appends the specified menu item to the end of this menu.IlxWMenuItemadd(java.lang.String s)Creates a new menu item with the specified text and appends it to the end of this menu.voidaddSeparator()Appends a new separator at the end of the menu.java.lang.StringemitOnContextMenuJSCode(IlxWPort port)Emits the JavaScript string used to show the popup menu.protected IlxWCSSRulesetgetUserAgentRules()Gets the "user-agent" CSS rules.protected voidprintComponent(IlxWPort port)Prints the HTML code that will display the graphical representation of this component.-
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validate
-
Methods inherited from class ilog.webui.dhtml.IlxWContainer
add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizer
-
-
-
-
Method Detail
-
add
public IlxWMenuItem add(IlxWMenuItem menuItem)
Appends the specified menu item to the end of this menu.- Parameters:
menuItem- TheJMenuItemto add.- Returns:
- the
JMenuItemadded.
-
add
public IlxWComponent add(IlxWComponent component)
Adds the specified component to the end of this container.- Overrides:
addin classIlxWContainer- Throws:
- if the given component already has a parent container.IllegalStateException- Parameters:
component- The component to be added.- Returns:
- the component passed as the argument.
-
add
public IlxWMenuItem add(java.lang.String s)
Creates a new menu item with the specified text and appends it to the end of this menu.- Parameters:
s- The string for the menu item to be added.
-
addSeparator
public void addSeparator()
Appends a new separator at the end of the menu.
-
emitOnContextMenuJSCode
public java.lang.String emitOnContextMenuJSCode(IlxWPort port)
Emits the JavaScript string used to show the popup menu. This JavaScript is attend to be used as event handler for theoncontextmenuevent.
-
printComponent
protected void printComponent(IlxWPort port) throws java.io.IOException
Description copied from class:IlxWComponentPrints the HTML code that will display the graphical representation of this component. This method is called by theIlxWComponent.print(ilog.webui.dhtml.IlxWPort)method.- Specified by:
printComponentin classIlxWComponent- Throws:
java.io.IOException- Parameters:
port- The port on which the component will be printed.- See Also:
IlxWComponent.print(ilog.webui.dhtml.IlxWPort)
-
getUserAgentRules
protected IlxWCSSRuleset getUserAgentRules()
Description copied from class:IlxWContainerGets the "user-agent" CSS rules.
User agent rules are a set of CSS rules which will apply by default to each instance of this container. They may be completed or overridden by the author rules, set via thesetAuthorRulesmethod.This method returns
nullby default but is intended to be redefined by subclasses.- Overrides:
getUserAgentRulesin classIlxWContainer- Returns:
- a CSS ruleset.
- See Also:
IlxWContainer.setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)
-
-