|
|||||||||
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.DChoice
A choice component with an associated popup list to select the current item. The popup list can be hierarchical, but it cannot be expanded or collapsed.
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.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 | |
DChoice()
Constructs an empty choice. |
|
DChoice(DFrame frame)
Constructs an empty choice. |
Method Summary | |
void |
add(DItem item)
Adds an item to the choice. |
void |
add(DItem[] items)
Adds items to the choice. |
void |
add(DItem parent,
DItem child)
Adds an item to the choice as a child of the specified parent item. |
void |
add(DItem parent,
DItem[] children)
Adds items to the choice as children of the specified parent item. |
void |
addItemListener(java.awt.event.ItemListener listener)
Adds the specified item listener to receive item events from this choice. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the specified property change listener to receive property change events from this component. |
void |
clear()
Clears the list. |
boolean |
contains(DItem item)
Indicates whether this choice contains the specified item. |
DItem[] |
getChildren(DItem parent)
Returns the children of the specified parent item. |
int |
getDepth(DItem item)
Returns the depth of the specified item in the hierarchical tree. |
int |
getIndent()
Returns the indentation of the items when displayed in tree form. |
DItem |
getItem(java.lang.Object reference)
Returns the item in this choice with the specified reference, or null if no such item exists. |
int |
getItemCount()
Returns the number of items in the choice. |
DItem[] |
getItems()
Returns all the items in the choice. |
java.awt.Dimension |
getMaximumSize()
Returns the maximum size for this choice. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size for this choice. |
DItem |
getParent(DItem child)
Returns the parent of the specified child item, or null if the child has no parent in this choice. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size for this choice. |
int |
getRootCount()
Returns the number of root items in this choice. |
DItem[] |
getRoots()
Returns the root items in this choice. |
DItem |
getSelected()
Returns the selected item in this list. |
java.lang.Object[] |
getSelectedObjects()
Returns the selected items in this list. |
java.lang.Object |
getSelectedReference()
Returns the selected item's reference, if any. |
boolean |
hasChildren()
Determines if this choice contains items that are children of other items. |
boolean |
isFilled()
Indicates whether this choice is filled. |
boolean |
isFocusTraversable()
This component is focus-traversable if it is not disabled. |
boolean |
isSelected(DItem item)
Indicates whether the specified item is selected in this list. |
void |
paint(java.awt.Graphics g)
Paints this choice. |
java.lang.String |
paramString()
Returns the parameter string for this choice. |
protected void |
processEvent(java.awt.AWTEvent event)
Processes events on this choice. |
protected void |
processFocusEvent(java.awt.event.FocusEvent event)
Process focus events. |
protected void |
processItemEvent(java.awt.event.ItemEvent event)
Processes item events on this component by dispatching them to any registered ItemListeners. |
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 |
propertyChange(java.beans.PropertyChangeEvent event)
An item in this list changed state. |
void |
remove(DItem item)
Removes an item from the choice. |
void |
remove(DItem[] items)
Removes items from the choice. |
void |
removeChildren(DItem parent)
Removes an item's children from the list. |
void |
removeItemListener(java.awt.event.ItemListener listener)
Removes the specified item listener so that it no longer receives item events from this choice. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the specified property change listener so it no longer receives property change events from this component. |
void |
setFilled(boolean filled)
Sets whether to fill this choice with the fill colour. |
void |
setIndent(int indent)
Sets the indentation of the items when displayed in tree form. |
DItem |
setSelected(DItem item)
Sets the selected item. |
DItem |
setSelected(java.lang.Object reference)
Sets the selected item to be the first item in the choice with the specified reference. |
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, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, 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 |
Field Detail |
protected static final java.awt.Dimension MINSMALLICONSIZE
Constructor Detail |
public DChoice()
public DChoice(DFrame frame)
Method Detail |
public int getIndent()
setIndent(int)
public void setIndent(int indent)
getIndent()
public boolean isFilled()
public void setFilled(boolean filled)
public DItem[] getItems()
public int getItemCount()
public DItem getItem(java.lang.Object reference)
public boolean hasChildren()
public DItem[] getChildren(DItem parent)
parent
- the parent itempublic DItem getParent(DItem child)
child
- the child itempublic int getDepth(DItem item)
public DItem[] getRoots()
getRootCount()
public int getRootCount()
getRoots()
public boolean contains(DItem item)
public void add(DItem item)
item
- the item to addremove(dog.gui.DItem)
public void add(DItem parent, DItem child)
remove(dog.gui.DItem)
,
getChildren(DItem)
,
getParent(DItem)
,
getRoots()
public void add(DItem[] items)
remove(dog.gui.DItem)
public void add(DItem parent, DItem[] children)
remove(dog.gui.DItem)
public void remove(DItem item)
add(DItem)
,
removeChildren(DItem)
public void remove(DItem[] items)
add(DItem)
,
removeChildren(DItem)
public void removeChildren(DItem parent)
remove(DItem)
public boolean isSelected(DItem item)
public DItem setSelected(DItem item)
item
- the item to be selectedpublic DItem setSelected(java.lang.Object reference)
reference
- the reference of the item to be selectedpublic DItem getSelected()
public java.lang.Object getSelectedReference()
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
public void clear()
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
public boolean isFocusTraversable()
isFocusTraversable
in class java.awt.Component
public void addItemListener(java.awt.event.ItemListener listener)
addItemListener
in interface java.awt.ItemSelectable
listener
- the item listenerpublic void removeItemListener(java.awt.event.ItemListener listener)
removeItemListener
in interface java.awt.ItemSelectable
listener
- the item listenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in class DComponent
listener
- the property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in class DComponent
listener
- the property change listenerprotected void processEvent(java.awt.AWTEvent event)
processEvent
in class DComponent
event
- the eventprotected void processItemEvent(java.awt.event.ItemEvent event)
event
- the item eventprotected void processFocusEvent(java.awt.event.FocusEvent event)
processFocusEvent
in class java.awt.Component
protected void processKeyEvent(java.awt.event.KeyEvent event)
processKeyEvent
in class java.awt.Component
protected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent
in class DComponent
protected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent
in class DComponent
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public java.lang.String paramString()
paramString
in class DComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |