Decision Center API

ilog.webui.dhtml.components
Class IlxWPopupMenu

java.lang.Object
  extended by ilog.webui.dhtml.IlxWContainer
      extended by ilog.webui.dhtml.IlxWComponent
          extended by ilog.webui.dhtml.components.IlxWMenuHolder
              extended by ilog.webui.dhtml.components.IlxWPopupMenu
All Implemented Interfaces:
ilog.webui.dhtml.IlxWConstants, ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, ilog.webui.dhtml.IlxWJSObject, Serializable

public class IlxWPopupMenu
extends ilog.webui.dhtml.components.IlxWMenuHolder

An implementation of a popup menu. A popup menu contains a set of menus that can be added with the add(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
IlxWPopupMenu()
           
 
Method Summary
 IlxWComponent add(IlxWComponent component)
          Adds the specified component to the end of this container.
 IlxWMenuItem add(IlxWMenuItem menuItem)
          Appends the specified menu item to the end of this menu.
 IlxWMenuItem add(String s)
          Creates a new menu item with the specified text and appends it to the end of this menu.
 void addSeparator()
          Appends a new separator at the end of the menu.
 String emitOnContextMenuJSCode(IlxWPort port)
          Emits the JavaScript string used to show the popup menu.
protected  IlxWCSSRuleset getUserAgentRules()
          Gets the "user-agent" CSS rules.
protected  void printComponent(IlxWPort port)
          Prints the HTML code that will display the graphical representation of this component.
 
Methods inherited from class ilog.webui.dhtml.components.IlxWMenuHolder
printJSClient
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlxWPopupMenu

public IlxWPopupMenu()
Method Detail

add

public IlxWMenuItem add(IlxWMenuItem menuItem)
Appends the specified menu item to the end of this menu.

Parameters:
menuItem - The JMenuItem to add.
Returns:
the JMenuItem added.

add

public IlxWComponent add(IlxWComponent component)
Adds the specified component to the end of this container.

Overrides:
add in class IlxWContainer
Throws:
IllegalStateException - if the given component already has a parent container.
Parameters:
component - The component to be added.
Returns:
the component passed as the argument.

add

public IlxWMenuItem add(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 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 the oncontextmenu event.


printComponent

protected void printComponent(IlxWPort port)
                       throws IOException
Description copied from class: IlxWComponent
Prints the HTML code that will display the graphical representation of this component. This method is called by the IlxWComponent.print(ilog.webui.dhtml.IlxWPort) method.

Specified by:
printComponent in class IlxWComponent
Throws:
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: IlxWContainer
Gets 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 the setAuthorRules method.

This method returns null by default but is intended to be redefined by subclasses.

Overrides:
getUserAgentRules in class IlxWContainer
Returns:
a CSS ruleset.
See Also:
IlxWContainer.setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)

Decision Center API

© Copyright IBM Corp. 1987, 2013