Home about services products contact login
   com.smardec.asc

Advanced Swing Components

  animatepanel
  autocomplete
  dropdown
  filechooser
  fontchooser
  gradient
  hyperlink
  outlookpanel
  outlookpanel.renderers
  quick
  rotate
  sliderpanel
  spantable
  splashscreen
  statusbar
  table
  table.renderers
  table.wrappers
  tree
  treetable
  util
  xmlbars
  xmlbars.menubar
  xmlbars.toolbar
  xmlbars.toolbar.layouts
com.smardec.asc.util
Class PopupMenuHelper

java.lang.Object
|
+--com.smardec.asc.util.PopupMenuHelper

public class PopupMenuHelper
extends java.lang.Object

PopupMenuHelper allows to show popup menu with different position in relation to parent component.


Field Summary
static java.lang.String POSITION_ABOVE
Popup menu position constraint.
static java.lang.String POSITION_BELOW
Popup menu position constraint.
static java.lang.String POSITION_LEFT
Popup menu position constraint.
static java.lang.String POSITION_RIGHT
Popup menu position constraint.
Constructor Summary
PopupMenuHelper()
Method Summary
static void showPopupMenu(javax.swing.JPopupMenu jPopupMenu, javax.swing.JComponent jComponent)
Shows specified popup menu.
static void showPopupMenu(javax.swing.JPopupMenu jPopupMenu, javax.swing.JComponent jComponent, java.lang.String menuPositionSequence, boolean growToParentWidth)
Shows specified popup menu.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail
POSITION_LEFT
public static final java.lang.String POSITION_LEFT

Popup menu position constraint. Menu position is on the left of parent component.

See Also:
Constant Field Values

POSITION_RIGHT
public static final java.lang.String POSITION_RIGHT
Popup menu position constraint. Menu position is on the right of parent component.

See Also:
Constant Field Values

POSITION_ABOVE
public static final java.lang.String POSITION_ABOVE
Popup menu position constraint. Menu position is above the parent component.

See Also:
Constant Field Values

POSITION_BELOW
public static final java.lang.String POSITION_BELOW
Popup menu position constraint. Menu position is below the parent component.

See Also:
Constant Field Values
Constructor Detail
PopupMenuHelper
public PopupMenuHelper()
Method Detail
showPopupMenu
public static void showPopupMenu(javax.swing.JPopupMenu jPopupMenu, javax.swing.JComponent jComponent)
Shows specified popup menu. At first tries to show popup below the component then on the right of specified component.

Parameters:
jPopupMenu - popup menu to be shown
jComponent - parent component to show popup menu

showPopupMenu
public static void showPopupMenu(javax.swing.JPopupMenu jPopupMenu, javax.swing.JComponent jComponent, java.lang.String menuPositionSequence, boolean growToParentWidth)
Shows specified popup menu.

Parameters:
jPopupMenu - popup menu to be shown
jComponent - parent component to show popup menu
menuPositionSequence - specifies popup menu position
growToParentWidth - if true popup menu should grows to parent component's width
Home about services products contact login