| 
 [.hacks.] [.java.]  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--Awt
                          |
                          +--Caption
                                |
                                +--Knob
                                      |
                                      +--MenuKnob
(#)MenuKnob.java
| Field Summary | |
protected  Fifo | 
menuItems
fifo that holds the menu items  | 
protected  int | 
selectedItem
currently selected item 0 = first  | 
static java.lang.String | 
SEPARATOR
String that is recognized as a separator  | 
| Fields inherited from class Knob | 
acommand | 
| Fields inherited from class Caption | 
active, activeRect, caption, entered, hrefs, iconDist, iconPos, invalid, mode | 
| Fields inherited from class Awt | 
actionListener, Background, bg, big, bim, Black, BlueMask, Bold, Bolditalic, borderDepth, borderType, BOTTOM, Brighter, Bulk, BULK, C, Center, CENTER, ColorMask, componentStates, Darker, E, East, EFFECT_MASK, Esc, FILL, Flat, FontMask, fonts, FontSize0, FontSizeMask, Foreground, GreenMask, Href, HREF, Hrefend, innerInsets, insets, Italic, itemListener, jvendor, jversion, Larger, LEFT, minimumDimension, MISC_MASK, Monospaced, N, NE, None, NONE, North, NorthEast, NorthWest, Null, NW, Plain, POSITION_MASK, Raised, RAISED, RedMask, RIGHT, S, SansSerif, SE, Serif, Smaller, South, SouthEast, SouthWest, Sunken, SUNKEN, SW, Tab0, TabMask, TabSizeMask, TOP, Uline, ULINE, W, West, White | 
| 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 | |
MenuKnob()
Standard constructor - no label - empty menu  | 
|
MenuKnob(java.lang.String[] menuItems)
MenuKnob constructor - no label - initial menu  | 
|
MenuKnob(java.lang.String label,
                 java.lang.String[] menuItems)
MenuKnob constructor - initial label - initial menu  | 
|
| Method Summary | |
 void | 
actionPerformed(java.awt.event.ActionEvent e)
notify our listeners  | 
 void | 
addItem(java.lang.String item)
append a menu item  | 
 java.lang.String | 
getItem(int i)
return a menu item  | 
 int | 
getItemCount()
return number of items in menu  | 
 int | 
getSelectedIndex()
return index of currently selected item  | 
 java.lang.String | 
getSelectedItem()
return currently selected item  | 
 java.lang.Object[] | 
getSelectedObjects()
implement ItemSelectable  | 
 java.awt.Dimension | 
measureIcon()
return dims needed for icon  | 
 void | 
onPress()
pop up the menu  | 
 void | 
paintIcon(java.awt.Graphics g,
                   int x,
                   int y,
                   int w,
                   int h)
Paint the Icon  | 
 void | 
select(int i)
set selected item  | 
 void | 
select(java.lang.String i)
set selected item - first matching  | 
 void | 
setFifo(Fifo f)
replace this widgets datamodel - give it a new menu  | 
 void | 
setSelectedIndex(int i)
set selected item  | 
| Methods inherited from class Knob | 
getActionCommand, mouseDragged, mouseExited, mouseMoved, mousePressed, mouseReleased, onRelease, setActionCommand | 
| Methods inherited from class Caption | 
doHref, getCaption, getHref, getLabel, getMode, getText, getTitle, invalidate, isActive, isEntered, measure, measureCaption, paint, paintCaption, setActive, setCaption, setEntered, setLabel, setMode, setText, setTitle | 
| Methods inherited from class java.awt.Panel | 
getAccessibleContext | 
| Methods inherited from class java.awt.Container | 
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree | 
| Methods inherited from class java.awt.Component | 
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final java.lang.String SEPARATOR
protected Fifo menuItems
protected int selectedItem
| Constructor Detail | 
public MenuKnob()
public MenuKnob(java.lang.String[] menuItems)
menuItems - initial menu items
public MenuKnob(java.lang.String label,
                java.lang.String[] menuItems)
label - initial labelmenuItems - initial menu items| Method Detail | 
public void setFifo(Fifo f)
f - fifo holding menu itemspublic void addItem(java.lang.String item)
item - item to appendpublic java.lang.String getItem(int i)
i - index of item to returnpublic int getItemCount()
public int getSelectedIndex()
public void setSelectedIndex(int i)
i - index of item to selectpublic java.lang.String getSelectedItem()
public void select(java.lang.String i)
i - string of item to selectpublic void select(int i)
i - index of item to selectpublic java.awt.Dimension measureIcon()
measureIcon in class Caption
public void paintIcon(java.awt.Graphics g,
                      int x,
                      int y,
                      int w,
                      int h)
paintIcon in class Captiong - Graphics object to usex - x-position of describing recty - y-position of describing rectw - width of describing recth - height of describing rectpublic void onPress()
onPress in class Knobpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectablegetSelectedObjects in class Awt
  | 
 [.hacks.] [.java.]  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||