gui
Class PopupMenu

java.lang.Object
  extended by gui.PopupMenu
Direct Known Subclasses:
CascadePopupMenu, SystrayPopupMenu

public class PopupMenu
extends java.lang.Object

Author:
Rolf Wendolsky

Nested Class Summary
static interface PopupMenu.ExitHandler
           
 
Field Summary
private  boolean m_bCompatibilityMode
           
private  boolean m_bParentOnTop
           
private  java.awt.GridBagConstraints m_constraints
           
private  PopupMenu.ExitHandler m_exitHandler
           
private  java.awt.Window m_parent
           
private  java.awt.Component m_popup
           
private  java.util.Vector m_popupListeners
           
private  java.util.Vector m_registeredComponents
           
 
Constructor Summary
  PopupMenu()
           
  PopupMenu(boolean a_bCompatibilityMode)
           
  PopupMenu(javax.swing.JPopupMenu a_popup)
           
private PopupMenu(javax.swing.JPopupMenu a_popup, boolean a_bCompatibilityMode)
           
 
Method Summary
protected  void add(java.awt.Component a_component)
           
 void addPopupMenuListener(javax.swing.event.PopupMenuListener a_listener)
           
protected  void addSeparator()
           
protected  void addSeparator(javax.swing.JSeparator a_separator)
           
 java.awt.Point calculateLocationOnScreen(java.awt.Component a_parent, java.awt.Point a_pointOnScreen)
           
 void dispose()
           
 int getHeight()
           
 java.awt.Point getMousePosition()
           
 javax.swing.JPopupMenu getPopup()
           
 java.awt.Point getRelativePosition(java.awt.Point a_pointOnScreen)
           
 int getWidth()
           
protected  void insert(java.awt.Component a_component, int a_index)
           
 boolean isVisible()
           
protected  void pack()
           
 void registerExitHandler(PopupMenu.ExitHandler a_exitHandler)
           
protected  void removeAll()
           
 boolean removePopupMenuListener(javax.swing.event.PopupMenuListener a_listener)
           
 void repaint()
           
private  void resetParentOnTopAttribute()
           
 void setLocation(java.awt.Point a_point)
           
 void setVisible(boolean a_bVisible)
           
 void show(java.awt.Component a_parent, java.awt.Point a_pointOnScreen)
           
 void show(java.awt.Component a_parent, java.awt.Window a_hiddenParent, java.awt.Point a_pointOnScreen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_exitHandler

private PopupMenu.ExitHandler m_exitHandler

m_popup

private java.awt.Component m_popup

m_constraints

private java.awt.GridBagConstraints m_constraints

m_parent

private java.awt.Window m_parent

m_bParentOnTop

private boolean m_bParentOnTop

m_popupListeners

private java.util.Vector m_popupListeners

m_registeredComponents

private java.util.Vector m_registeredComponents

m_bCompatibilityMode

private boolean m_bCompatibilityMode
Constructor Detail

PopupMenu

public PopupMenu()

PopupMenu

public PopupMenu(boolean a_bCompatibilityMode)

PopupMenu

public PopupMenu(javax.swing.JPopupMenu a_popup)

PopupMenu

private PopupMenu(javax.swing.JPopupMenu a_popup,
                  boolean a_bCompatibilityMode)
Method Detail

removeAll

protected void removeAll()

insert

protected void insert(java.awt.Component a_component,
                      int a_index)

addSeparator

protected void addSeparator()

addSeparator

protected void addSeparator(javax.swing.JSeparator a_separator)

pack

protected void pack()

add

protected void add(java.awt.Component a_component)

addPopupMenuListener

public final void addPopupMenuListener(javax.swing.event.PopupMenuListener a_listener)

removePopupMenuListener

public final boolean removePopupMenuListener(javax.swing.event.PopupMenuListener a_listener)

getPopup

public javax.swing.JPopupMenu getPopup()

getRelativePosition

public final java.awt.Point getRelativePosition(java.awt.Point a_pointOnScreen)

getMousePosition

public final java.awt.Point getMousePosition()

registerExitHandler

public final void registerExitHandler(PopupMenu.ExitHandler a_exitHandler)

show

public final void show(java.awt.Component a_parent,
                       java.awt.Point a_pointOnScreen)

show

public final void show(java.awt.Component a_parent,
                       java.awt.Window a_hiddenParent,
                       java.awt.Point a_pointOnScreen)

repaint

public void repaint()

setLocation

public final void setLocation(java.awt.Point a_point)

calculateLocationOnScreen

public final java.awt.Point calculateLocationOnScreen(java.awt.Component a_parent,
                                                      java.awt.Point a_pointOnScreen)

getWidth

public final int getWidth()

getHeight

public final int getHeight()

isVisible

public final boolean isVisible()

dispose

public final void dispose()

resetParentOnTopAttribute

private final void resetParentOnTopAttribute()

setVisible

public final void setVisible(boolean a_bVisible)