net.thestump.ghronos.ui
Class Menubar

java.lang.Object
  extended bywaba.ui.Control
      extended bywaba.ui.Container
          extended bywaba.ui.Window
              extended bywaba.ui.MenuBar
                  extended bynet.thestump.ghronos.ui.Menubar
All Implemented Interfaces:
waba.fx.ISurface, superwaba.ext.xplat.io.Storable

public class Menubar
extends waba.ui.MenuBar
implements superwaba.ext.xplat.io.Storable

A command-oriented menubar to handle all menubar events.

Author:
Christopher C. Stump

Field Summary
static int ABOUT
          about menubar option
static int FIRST_MOVE_BLACK
          black moves first menubar option
static int RESET
          reset menubar option
static int SEQUENTIAL_MOVES
          per player moves menubar option
static int SOUND
          sound menubar option
static int TIMING
          timingstyle menubar option
 
Fields inherited from class waba.ui.MenuBar
CHECKED, DISABLED, gap, UNCHECKED
 
Fields inherited from class waba.ui.Window
beepIfOut, borderStyle, canDrag, eraseBackgroundNow, flicker, HIDE_STATE, highResPrepared, imgCovered, lastSwappedContainer, mainSwapContainer, menubar, needsPaint, NO_BORDER, RECT_BORDER, ROUND_BORDER, TAB_BORDER, TAB_ONLY_BORDER, title, titleFont, topMost, VK_BOTTOM, VK_HIDE, VK_SHOW, VK_TOP, zStack
 
Fields inherited from class waba.ui.Container
BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_SIMPLE, children, lastH, lastW, lastX, lastY, parentWindow, tail
 
Fields inherited from class waba.ui.Control
AFTER, appId, asContainer, asWindow, backColor, backDis, BEFORE, BOTTOM, CENTER, enabled, FILL, FIT, fm, fmH, focusLess, font, foreColor, foreDis, height, LEFT, parent, PREFERRED, RANGE, RIGHT, SAME, TOP, visible, width, x, x2, y, y2
 
Method Summary
 void accessAllItems(boolean state)
          Sets accessability of menubar options
 void evaluateSelection()
          Evaluates and responds to the selected menu item.
 byte getID()
           
 superwaba.ext.xplat.io.Storable getInstance()
           
static Menubar instance()
          Singleton accessor for the application's menubar
 void loadState(superwaba.ext.xplat.io.DataStream ds)
           
 void saveState(superwaba.ext.xplat.io.DataStream ds)
           
 
Methods inherited from class waba.ui.MenuBar
getSelectedMenuItem, isCheckable, isChecked, isEnabled, loadBehindLastPopup, onClickedOutside, onColorsChanged, onEvent, onFontChanged, onPaint, onPopup, popupClosed, postPopup, setChecked, setCursorColor, setEnabled, setItems, setPopColors, setVisible, switchTo
 
Methods inherited from class waba.ui.Window
_doPaint, _doPaint, _postEvent, damageRect, destroyZStack, dontSaveBehind, getClientRect, getClientRect, getFocus, getOffScreen, getPreferredHeight, getPreferredWidth, getTopMost, isTopMost, isVisible, loadBehind, makeUnmovable, onUnpop, paintTitle, popupBlockingModal, popupMenuBar, popupModal, postUnpop, pumpEvents, saveBehind, setBorderStyle, setDoubleBuffer, setFocus, setMenuBar, setStatePosition, setTitle, setTitleFont, swap, swapFocus, unpop, updateScreen, validate
 
Methods inherited from class waba.ui.Container
add, add, add, broadcastEvent, findChild, getChildren, onAdd, onRemove, onStart, paintChildren, remove, setEnabled
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getAbsoluteRect, getBackColor, getFont, getFontMetrics, getForeColor, getNext, getParent, getParentWindow, getPos, getRect, getSize, isDisplayed, isEnabled, onBoundsChanged, onWindowPaintFinished, postEvent, removeTimer, repaint, repaintNow, requestFocus, setBackColor, setBackForeColors, setFocusLess, setFont, setForeColor, setRect, setRect, setRect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESET

public static final int RESET
reset menubar option

See Also:
Constant Field Values

TIMING

public static final int TIMING
timingstyle menubar option

See Also:
Constant Field Values

SOUND

public static final int SOUND
sound menubar option

See Also:
Constant Field Values

FIRST_MOVE_BLACK

public static final int FIRST_MOVE_BLACK
black moves first menubar option

See Also:
Constant Field Values

SEQUENTIAL_MOVES

public static final int SEQUENTIAL_MOVES
per player moves menubar option

See Also:
Constant Field Values

ABOUT

public static final int ABOUT
about menubar option

See Also:
Constant Field Values
Method Detail

instance

public static Menubar instance()
Singleton accessor for the application's menubar

Returns:
The menubar of the MainWindow

accessAllItems

public void accessAllItems(boolean state)
Sets accessability of menubar options

Parameters:
state - true to have all menu bar items enabled, false to have them all disabled

evaluateSelection

public void evaluateSelection()
Evaluates and responds to the selected menu item.


getID

public byte getID()
Specified by:
getID in interface superwaba.ext.xplat.io.Storable

getInstance

public superwaba.ext.xplat.io.Storable getInstance()
Specified by:
getInstance in interface superwaba.ext.xplat.io.Storable

saveState

public void saveState(superwaba.ext.xplat.io.DataStream ds)
Specified by:
saveState in interface superwaba.ext.xplat.io.Storable

loadState

public void loadState(superwaba.ext.xplat.io.DataStream ds)
Specified by:
loadState in interface superwaba.ext.xplat.io.Storable


Copyright © 2004 Christopher C. Stump. All Rights Reserved.