IBM DB2 UDB
Plugin Interface
for Extending the Control Center

com.ibm.db2.tools.cc.navigator
Interface Positionable


public interface Positionable

The Positionable interface is to be used by implementers of CCMenuAction to specify the position of a plugin menu item within its menu.

The default behavior when adding plugin menu items to a menu is to add them on the end, but before any Refresh and Filter menu items.

You can override this behavior to specify any position number from zero up to the number of items in the menu, not counting the Refresh and Filter menu items. Change your CCMenuAction subclass to implement Positionable and then implement the getPosition method.

See Also:
CCMenuAction

Field Summary
static int POSITION_BOTTOM
          Return this value from getPosition to position the menu item at the bottom before any Refresh and Filter menu items.
 
Method Summary
 int getPosition()
          Gets the position of this menu item within its menu.
 

Field Detail

POSITION_BOTTOM

public static final int POSITION_BOTTOM
Return this value from getPosition to position the menu item at the bottom before any Refresh and Filter menu items.

See Also:
Constant Field Values
Method Detail

getPosition

public int getPosition()
Gets the position of this menu item within its menu. Use POSITION_BOTTOM to specify that the menu item goes to the bottom (but before any Refresh and Filter menu items), otherwise use an integer to specify the position. Specify a position number of zero to place the menu item at the top.

Returns:
the position of the menu item

IBM DB2 UDB
Plugin Interface
for Extending the Control Center

(C)Copyright IBM Corp. 2002, 2004. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.