|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--dog.gui.DContainer
|
+--dog.gui.DPopup
|
+--dog.gui.DMenu
A menu component to select an item.
This menu 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 Class Summary | |
class |
DMenu.Separator
A menu separator. |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected static java.awt.Dimension |
MINSMALLICONSIZE
The minimum size that icons may be displayed at (16x16). |
| Fields inherited from class dog.gui.DPopup |
ABOVE, BELOW, component, COMPONENT, componentWindow, fitMode, height, hideOnFocusLost, LEFT, MOVE, NONE, position, RESIZE, RIGHT, width |
| Fields inherited from class dog.gui.DContainer |
cancelButton, CENTER, defaultButton, EAST, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, 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 | |
DMenu(DRootPane root)
Constructs a menu. |
|
| Method Summary | |
void |
add(DItem item)
Adds an item to this menu. |
void |
add(DItem[] items)
Add a number of items to this menu, in order. |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this menu. |
void |
dispose()
Clears this menu and its parents from the screen. |
int |
getItemCount()
Returns the number of items in this menu. |
DItem[] |
getItems()
Returns the items in this menu. |
DItem |
getParentItem()
Returns the item that caused this submenu to be activated. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this menu. |
DItem |
getSelected()
Returns the selected item in this menu. |
boolean |
hasSubMenus()
Indicates whether this menu contains submenus. |
boolean |
isFocusTraversable()
This component is focus-traversable if it is not disabled. |
void |
paint(java.awt.Graphics g)
Paints this menu. |
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 |
processKeyEvent(java.awt.event.KeyEvent event)
Process key events. |
protected void |
processMouseEvent(java.awt.event.MouseEvent event)
Process mouse events. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
Process mouse motion events. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes the specified action listener so it no longer receives action events from this menu. |
| Methods inherited from class dog.gui.DPopup |
componentHidden, componentMoved, componentResized, componentShown, fit, getFont, getOffset, getOffset, paintBackground, processFocusEvent, setConstraints, setConstraints, setSize, setVisible |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, show, show, size, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final java.awt.Dimension MINSMALLICONSIZE
| Constructor Detail |
public DMenu(DRootPane root)
| Method Detail |
public void add(DItem item)
public void add(DItem[] items)
public int getItemCount()
public DItem[] getItems()
public DItem getSelected()
public boolean hasSubMenus()
public DItem getParentItem()
public void dispose()
dispose in class DPopuppublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class DPopuppublic 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 DContainerevent - the eventprotected void processActionEvent(java.awt.event.ActionEvent event)
event - the action eventpublic boolean isFocusTraversable()
isFocusTraversable in class java.awt.Componentprotected void processKeyEvent(java.awt.event.KeyEvent event)
processKeyEvent in class DPopupprotected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent in class DContainerprotected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent in class DContainer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||