|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--dog.gui.DComponent
|
+--dog.gui.DMenubar
An application menu bar for a frame.
This menubar manages a list of items. It displays the items' icon (if any) and label, and generates action events.
To add a submenu to any menu item, add an item for which the reference is another menu. The handling of that menu will be performed automatically.
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Fields inherited from class dog.gui.DComponent |
CENTER, CENTER_TILE, changes, EAST, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, TILE, tooltip, WEST |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DMenubar()
|
|
| Method Summary | |
void |
add(DItem item)
|
void |
add(DItem[] items)
|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this menu. |
void |
clear()
|
DItem[] |
getItems()
Returns the items in this menu. |
java.awt.Dimension |
getPreferredSize()
|
DItem |
getSelected()
Returns the selected item in this menu. |
void |
paint(java.awt.Graphics g)
|
protected void |
processActionEvent(java.awt.event.ActionEvent event)
Processes action events on this menu by dispatching them to any registered ActionListeners. |
protected void |
processEvent(java.awt.AWTEvent event)
Processes events on this menu. |
protected void |
processMouseEvent(java.awt.event.MouseEvent event)
|
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes the specified action listener so it no longer receives action events from this menu. |
protected void |
select(DItem item,
int xoffset)
|
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, 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, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DMenubar()
| Method Detail |
public void add(DItem item)
public void add(DItem[] items)
public void clear()
public DItem[] getItems()
public DItem getSelected()
protected void select(DItem item,
int xoffset)
public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic void paint(java.awt.Graphics g)
paint in class java.awt.Componentpublic void addActionListener(java.awt.event.ActionListener listener)
listener - the action listenerpublic void removeActionListener(java.awt.event.ActionListener listener)
listener - the action listenerprotected void processEvent(java.awt.AWTEvent event)
processEvent in class DComponentevent - the eventprotected void processActionEvent(java.awt.event.ActionEvent event)
event - the action eventprotected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent in class DComponentprotected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent in class DComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||