|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Button | +--adm.CMenuButton
This class creates a stand-alone menu button. It does not need to be
added to a menuBar. CMenuBotton looks like a button but works like a
menu. When the button is pressed, a pull down menu will appear.
Like awt.Menu, any menuItem, separator and subclass of menuItem such
as JavaMenuItem and ShellMenuItem can be added to this widget.
To distinguish from a normal awt.Button, a ">>" String is added on back
of the label set by the user. If the label is not set, the default label
">>" will appear on the CMenuBotton.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CMenuButton()
Null constructor. |
|
CMenuButton(java.lang.String label)
Constructor with label parameter |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Popup a popup menu at position (0, height of button) |
java.awt.MenuItem |
add(java.awt.MenuItem mi)
Adds the specified menu item to this menu. |
void |
addSeparator()
Adds a separator line, or a hypen, to the menu at the current position. |
java.lang.String |
getLabel()
Return the label string (not include " >>"). |
void |
insert(java.awt.MenuItem mi,
int index)
Inserts a menu item into this menu at the specified position. |
void |
insertSeparator(int index)
Inserts a separator at the specified position. |
void |
remove(int index)
Removes the menu item at the specified index from this menuButton. |
void |
remove(java.awt.MenuComponent item)
Removes the specified menu item from this menuButton. |
void |
setLabel(java.lang.String label)
Set the label string. |
Methods inherited from class java.awt.Button |
addActionListener,
addNotify,
getActionCommand,
removeActionListener,
setActionCommand |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
dispatchEvent,
doLayout,
enable,
enable,
enableInputMethods,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paint,
paintAll,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
update,
validate |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CMenuButton()
public CMenuButton(java.lang.String label)
label
- label stringMethod Detail |
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- the label Stringpublic java.awt.MenuItem add(java.awt.MenuItem mi)
public void addSeparator()
public void insert(java.awt.MenuItem mi, int index)
public void remove(int index)
public void remove(java.awt.MenuComponent item)
public void insertSeparator(int index)
public void actionPerformed(java.awt.event.ActionEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |