net.thestump.ghronos.ui
Class NoTapBigNumber

java.lang.Object
  extended bywaba.ui.Control
      extended bysuperwaba.ext.xplat.ui.BigNumber
          extended bynet.thestump.ghronos.ui.NoTapBigNumber
All Implemented Interfaces:
waba.fx.ISurface

public class NoTapBigNumber
extends superwaba.ext.xplat.ui.BigNumber

Allows for tap events only to be disabled on this BigNumber. Also allows for a maximum scroll value to be set.

Author:
Christopher C. Stump

Field Summary
 
Fields inherited from class superwaba.ext.xplat.ui.BigNumber
DIRECT, DOLLAR, mode, NONE, num, POINT, UP_DOWN
 
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
 
Constructor Summary
NoTapBigNumber(int num, int max)
          Defaults to responding to tap events.
 
Method Summary
 boolean canTap()
          Tells if this number is tappable
 void onEvent(waba.ui.Event event)
           
 void onPaint(waba.fx.Graphics g)
           
 void setDash(boolean dash)
          Turns this number into a dash
 void setMax(int m)
          Sets the maximum number scrollable to on this number
 void setNumber(int n)
           
 void setTap(boolean tap)
          Sets the "tapability" of this BigNumber
 
Methods inherited from class superwaba.ext.xplat.ui.BigNumber
getNumber, getPreferredHeight, getPreferredWidth, setMode
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getAbsoluteRect, getBackColor, getFont, getFontMetrics, getForeColor, getNext, getParent, getParentWindow, getPos, getRect, getSize, isDisplayed, isEnabled, isVisible, onBoundsChanged, onColorsChanged, onFontChanged, onWindowPaintFinished, postEvent, removeTimer, repaint, repaintNow, requestFocus, setBackColor, setBackForeColors, setEnabled, setFocusLess, setFont, setForeColor, setRect, setRect, setRect, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoTapBigNumber

public NoTapBigNumber(int num,
                      int max)
Defaults to responding to tap events. Uses UP_DOWN mode only.

Parameters:
num - The number of this BigNumber
max - Same as setMax(int) parameter
Method Detail

setMax

public void setMax(int m)
Sets the maximum number scrollable to on this number

Parameters:
m - If a digit 0-9, sets a maximum scroll restriction to that number. If less than zero, unsets any maximum restriction so that this BigNumber scrolls fully between 0-9.

setTap

public void setTap(boolean tap)
Sets the "tapability" of this BigNumber

Parameters:
tap - false to disable responses to taps, true otherwise

setDash

public void setDash(boolean dash)
Turns this number into a dash

Parameters:
dash - true if we want the number to be a dash, false otherwise

canTap

public boolean canTap()
Tells if this number is tappable

Returns:
true if you can change the number with a tap, false otherwise

onEvent

public void onEvent(waba.ui.Event event)

setNumber

public void setNumber(int n)

onPaint

public void onPaint(waba.fx.Graphics g)


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