wt.clients.scheduler
Class LongSpinner

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bysymantec.itools.awt.util.spinner.Spinner
                  extended bysymantec.itools.awt.util.spinner.NumericSpinner
                      extended bywt.clients.scheduler.LongSpinner
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, symantec.itools.awt.Orientation, Serializable

public class LongSpinner
extends symantec.itools.awt.util.spinner.NumericSpinner

LongSpinner extends NumericSpinner to allow listening to the contained textfield. This spinner allows long values and throws PropertyChangeEvents with the new and old long values.
Supported API: false

Extendable: false

See Also:
NumericSpinner, Serialized Form

Nested Class Summary
(package private)  class LongSpinner.SymKey
           
 
Nested classes inherited from class symantec.itools.awt.util.spinner.Spinner
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  symantec.itools.beans.PropertyChangeSupport _changes
           
protected  boolean _isVisible
           
protected  long _longValue
           
 LongSpinner.SymKey aSymKey
           
 
Fields inherited from class symantec.itools.awt.util.spinner.NumericSpinner
 
Fields inherited from class symantec.itools.awt.util.spinner.Spinner
action, actionListener, added, current, currentVeto, editable, errors, increment, max, maxVeto, min, minVeto, orientation, ORIENTATION_DEFAULT, text, textWidth, wrappable
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface symantec.itools.awt.Orientation
ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LongSpinner()
           
 
Method Summary
 void addKeyListener(KeyListener l)
          Add a key listener to this component.
 void addNotify()
           
 void addPropertyChangeListener(PropertyChangeListener ear)
          Add a listener for all property change events
 long getCurrentLongValue()
          get the contents of the current long value
 String getCurrentText()
          Get the current text from the spinner.
protected  TextField getTextField()
          Get a reference to the internal text field object.
private  boolean isBadKey(int code)
           
(package private)  void LongSpinner_keyPressed(KeyEvent event)
          Preprocess key events to maintain the integrity of the text field.
(package private)  void LongSpinner_keyReleased(KeyEvent event)
          Post processing of key press.
 void removePropertyChangeListener(PropertyChangeListener ear)
          Remove a listener for all property change events.
private  void restoreField(Exception e)
           
 void scrollDown()
          Decrement the spinner's value and wrap if necessary
 void scrollUp()
          Increment the spinners value and handles wrapping
 void setCurrentLongValue(long candVal)
          Sets the current long value.
 
Methods inherited from class symantec.itools.awt.util.spinner.NumericSpinner
addVetoableChangeListener, getIncrement, removeVetoableChangeListener, setIncrement, setMax, setMin, validateText
 
Methods inherited from class symantec.itools.awt.util.spinner.Spinner
addActionListener, addCurrentListener, addCurrentListener, addMaxListener, addMaxListener, addMinListener, addMinListener, getCurrent, getDelay, getEditable, getEntryFieldText, getMax, getMin, getMinimumSize, getNotifyWhilePressed, getOrientation, getPreferredSize, getWrappable, isEditable, isNotifyWhilePressed, isValidCurrentValue, isValidMaxValue, isValidMinValue, isWrappable, removeActionListener, removeCurrentListener, removeCurrentListener, removeMaxListener, removeMaxListener, removeMinListener, removeMinListener, removeNotify, setCurrent, setDelay, setEditable, setEnabled, setLayout, setNotifyWhilePressed, setOrientation, setWrappable, sourceActionEvent, updateButtonStatus, updateText
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, 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, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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

aSymKey

public LongSpinner.SymKey aSymKey

_isVisible

protected boolean _isVisible

_longValue

protected long _longValue

_changes

protected symantec.itools.beans.PropertyChangeSupport _changes
Constructor Detail

LongSpinner

public LongSpinner()
Method Detail

addNotify

public void addNotify()

getCurrentLongValue

public long getCurrentLongValue()
get the contents of the current long value

Returns:
the current long value

getCurrentText

public String getCurrentText()
Get the current text from the spinner.

Returns:
A string containing the text of the spinner value.

getTextField

protected TextField getTextField()
Get a reference to the internal text field object. Overriden to make sure the cursor stays where it is.

See Also:
symantec.itools.awt.util.spinner

setCurrentLongValue

public void setCurrentLongValue(long candVal)
                         throws PropertyVetoException
Sets the current long value.

Throws:
PropertyVetoException - is thrown if the new value is greater than the specified maximum value, or if the value is less than the minimum value.

addKeyListener

public void addKeyListener(KeyListener l)
Add a key listener to this component.

See Also:
KeyListener

scrollUp

public void scrollUp()
Increment the spinners value and handles wrapping


scrollDown

public void scrollDown()
Decrement the spinner's value and wrap if necessary


LongSpinner_keyPressed

void LongSpinner_keyPressed(KeyEvent event)
Preprocess key events to maintain the integrity of the text field. Keypress events arepassed in before being handled to the text field. allowed values are numeric, BACK_SPACE, TAB,END.


isBadKey

private boolean isBadKey(int code)

LongSpinner_keyReleased

void LongSpinner_keyReleased(KeyEvent event)
Post processing of key press. If the text field is not empty, convert the numeric string into a long value and set current value. Counting on the KeyPressed handler to throw out the bad data.


restoreField

private void restoreField(Exception e)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener ear)
Add a listener for all property change events

See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener ear)
Remove a listener for all property change events.

Parameters:
ear - the PropertyChangeListner to remove
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)