mWaba.gui.control
Class ChoiceControl

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--mWaba.gui.mControl
                    |
                    +--mWaba.gui.control.ChoiceControl
Direct Known Subclasses:
mChoice, Menu

public class ChoiceControl
extends mControl


Field Summary
protected  boolean blockSelected
           
 int displayRows
           
protected  boolean extraButton
           
protected  int firstItem
           
 mVector items
           
 int selectedIndex
           
 int spacing
           
 int xOffset
           
protected  int xShift
           
 
Fields inherited from class mWaba.gui.mControl
_debug, AlwaysEnabled, AlwaysRecalculateSize, backGround, borderWidth, CapturesPen, columns, debugGui, defaultAddMeCellConstraints, defaultAddMeControlConstraints, DidHoldDown, Disabled, doubleBuffer, doubleClickTime, dragging, dragResolution, DrawFlat, emptySize, firstPress, fixedPreferredSize, fixedSize, ForceResize, foreGround, globalDrawFlat, globalEditable, globalEnabled, globalSmallControls, GotPenDown, GotPreferredSize, holdDownPause, holdTick, ImageChanged, Invisible, KeepImage, kids, listeners, modifiers, myFont, myFrame, NoFocus, NotAnEditor, NotEditable, PenTransparent, preferredSize, PreferredSizeOnly, pressPoint, prompt, SendUpKeyEvents, SendUpPenEvents, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, text, Transparent, WantDrag, WantHoldDown
 
Fields inherited from class waba.ui.Container
children, numChildren, tail
 
Fields inherited from class waba.ui.Control
height, next, parent, width, x, y
 
Constructor Summary
ChoiceControl()
           
 
Method Summary
protected  void calculatePreferredSize()
           
 void centerSelected()
           
 void changeModifiers(int toSet, int toClear)
           
 void doPaint(waba.fx.Graphics gr, waba.fx.Rect area)
           
 void doPaintData(waba.fx.Graphics gr)
           
 int getDisplayRows()
           
 MenuItem getItemAt(int where)
           
protected  int getItemHeight()
           
protected  int getMenuHeight()
           
protected  int getMenuWidth()
           
 int getScreenRows()
           
 java.lang.Object getSelectedItem()
           
 boolean isSelected(int idx)
           
protected  void paintBox(waba.fx.Graphics g)
           
 void paintItem(waba.fx.Graphics g, int index)
           
 void paintItem(waba.fx.Graphics g, int index, boolean checksOnly)
           
 void selectOrUnselect(int item)
           
 
Methods inherited from class mWaba.gui.mControl
add, addListener, addToFront, amFlat, amOnTopFrame, amSmall, callBack, checkHasModifier, checkPenTransparent, consume, contains, doBackground, doBorder, doPaintChildren, dragged, editable, enabled, fixSizeAt, getBackground, getChildren, getChildren, getControlBuffer, getControlBuffer, getDim, getFont, getFontMetrics, getForeground, getFrame, getFrameOrContainer, getGraphics, getNext, getPosInFrame, getPreferredSize, getSurface, gotFocus, handedPenEvent, handOffPenEvent, handOffPenEvent, hasModifier, inheritModifiers, isOnMe, lostFocus, make, makeFrameTopMost, modify, modifyAll, modifyAll, notifyAction, onControlEvent, onEvent, onKeyEvent, onLabelPenEvent, onPaint, onPenEvent, paintBackground, paintChildren, penClicked, penDoubleClicked, penHeld, penPressed, penReleased, postEvent, recalculateSize, redisplay, reduceClip, remove, removeListener, repaint, repaintDataNow, repaintNow, repaintNow, requestCallBack, requestResizeTo, resetRect, resizeTo, restore, sendToListeners, set, setNext, setParent, setRect, show, shown, startDragging, stopDragging, ticked, visible
 
Methods inherited from class waba.ui.Container
findChild
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getFontMetrics, getMainWindow, getParent, getRect, removeTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockSelected

protected boolean blockSelected

extraButton

protected boolean extraButton

items

public mVector items

spacing

public int spacing

xOffset

public int xOffset

selectedIndex

public int selectedIndex

displayRows

public int displayRows

firstItem

protected int firstItem

xShift

protected int xShift
Constructor Detail

ChoiceControl

public ChoiceControl()
Method Detail

getSelectedItem

public java.lang.Object getSelectedItem()

getDisplayRows

public int getDisplayRows()

getScreenRows

public int getScreenRows()

calculatePreferredSize

protected void calculatePreferredSize()
Overrides:
calculatePreferredSize in class mControl

getMenuWidth

protected int getMenuWidth()

getMenuHeight

protected int getMenuHeight()

getItemHeight

protected int getItemHeight()

getItemAt

public MenuItem getItemAt(int where)

selectOrUnselect

public void selectOrUnselect(int item)

isSelected

public boolean isSelected(int idx)

paintBox

protected void paintBox(waba.fx.Graphics g)

paintItem

public void paintItem(waba.fx.Graphics g,
                      int index)

paintItem

public void paintItem(waba.fx.Graphics g,
                      int index,
                      boolean checksOnly)

doPaintData

public void doPaintData(waba.fx.Graphics gr)
Overrides:
doPaintData in class mControl

doPaint

public void doPaint(waba.fx.Graphics gr,
                    waba.fx.Rect area)
Overrides:
doPaint in class mControl

centerSelected

public void centerSelected()

changeModifiers

public void changeModifiers(int toSet,
                            int toClear)