javax.rad.ui.menu
Interface IPopupMenu

All Superinterfaces:
IComponent, IContainer, INamedObject, IResource
All Known Implementing Classes:
SwingPopupMenu, UIPopupMenu

public interface IPopupMenu
extends IContainer

Platform and technology independent popup menu definition. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .

See Also:
PopupMenu, JPopupMenu

Method Summary
 void addSeparator()
          Appends a new separator at the end of the menu.
 void addSeparator(int pIndex)
          Inserts a separator at the specified position.
 void show(IComponent pOrigin, int pX, int pY)
          Shows the popup menu at the x, y position relative to an origin component.
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Method Detail

addSeparator

void addSeparator()
Appends a new separator at the end of the menu.


addSeparator

void addSeparator(int pIndex)
Inserts a separator at the specified position.

Parameters:
pIndex - an integer specifying the position at which to insert the menu separator
Throws:
IllegalArgumentException - if the value of index < 0

show

void show(IComponent pOrigin,
          int pX,
          int pY)
Shows the popup menu at the x, y position relative to an origin component. The origin component must be contained within the component hierarchy of the popup menu's parent. Both the origin and the parent must be showing on the screen for this method to be valid.

If this PopupMenu is being used as a Menu (i.e., it has a non-Component parent), then you cannot call this method on the PopupMenu.

Parameters:
pOrigin - the component which defines the coordinate space
pX - the x coordinate position to popup the menu
pY - the y coordinate position to popup the menu


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.