All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.visuals
Class SpinBox

    com.sas.visuals.SpinBox

All Implemented Interfaces:
  CompositeInterface, ContainerInterface, com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.collection.ContentsChangedListener, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.lang.DoubleDataInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.Adjustable, java.awt.event.AdjustmentListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

    public class SpinBox

implements java.awt.Adjustable, java.awt.ItemSelectable, java.awt.event.AdjustmentListener, com.sas.lang.StringDataInterface, com.sas.lang.DoubleDataInterface, com.sas.collection.ContentsChangedListener

SpinBox is a class that combines a textField and a spinButton. The value in the textField can be incremented by pressing the spinButton. The SpinBox supports two types of models: an StaticOrderedCollectionInterface model or a BoundedNumberInterface model. The collection model displays one item from the collection in the textField and allows stepping throught the collection by using the spinButton. The boundedNumber model displays the value of the boundedNumber in the textField and allows it to be incremented or decremented by the spinButton. An AdjustmentEvent is fired any time the value of the SpinBox changes. An ItemEvent is also fired when the model is a collection and the value changes. The defaultModel for the SpinBox is a BoundedDouble.
Notes:

- The integer methods for setting the value, max, min, blockIncrement, and unitIncrement may not be valid if the model values are not also integers.
- The precision value needs to be in the form of a one digit where the value will be rounded at and zero's every where else. Example: 0.01 indicates the number will be rounded at the hundredths decimal place.
- If a model is set that implements the com.sas.util.validators.ValidationInterface, it will be used as the validator for the SpinBox. If the model does not implement the com.sas.util.validators.ValidationInterface the validator will be set to null. The previous validator will always be overridden when a new model is set.

See Also:
  `StaticOrderedCollectionInterface`, `BoundedNumberInterface`, `TextField`, `SpinButton`, Serialized Form

Field Summary
`protected java.awt.event.AdjustmentListener` | `adjustmentListener`
`protected com.sas.visuals.SpinBox.ArrowKeyAdapter` | `arrowKeyAdapter`
`protected com.sas.models.BoundedNumberInterface` | `defaultRangeModel`
`protected com.sas.util.transforms.TransformInterface` | `displayTransform`
`protected java.awt.event.ItemListener` | `itemListener`
`protected com.sas.visuals.SpinBox.ItemTextAdapter` | `itemTextAdapter`
`static int` | `LEFT_RIGHT` int values representing the orientation of the spinButton arrows- LEFT_RIGHT
`protected java.text.NumberFormat` | `numberFormat`
`protected boolean` | `numberFormatSet`
`protected double` | `precision`
`protected boolean` | `precisionDisplayed`
`protected PrefixPredicate` | `prefixPredicate`
`static java.lang.String` | `RB_KEY`
`protected SpinButton` | `spinBtn`
`protected TextField` | `text`
`protected boolean` | `textInvoked`
`static int` | `UP_DOWN` int values representing the orientation of the spinButton arrows- UP_DOWN
`protected boolean` | `valueInvoked`

Constructor Summary
`SpinBox()` Default constructor

Method Summary
`void` | `addAdjustmentListener(java.awt.event.AdjustmentListener l)` Add a listener to receive adjustment events when the value of the SpinBox changes.
`void` | `addItemListener(java.awt.event.ItemListener l)` Add a listener to receive item events when the state of the SpinBox changes.
`void` | `adjustmentValueChanged(java.awt.event.AdjustmentEvent e)` Handle all adjustment events that are sent out by spinButton.
`void` | `contentsChanged(com.sas.collection.ContentsChangedEvent e)` Handle contentsChanged events from a collection model.
`void` | `detachModel(com.sas.ModelInterface model)` Detach the specified model from the SpinBox.
`Alarm` | `getAlarm()` Deprecated.
`int` | `getArrowDirection()` Get the direction the SpinButton arrows are pointing.
`int` | `getBlockIncrement()` Get the block value increment for the spinButton.
`java.lang.Number` | `getBlockIncrementNumber()` Get the blockIncrement number value for the spinButton.
`int` | `getColumns()` Get the number of columns of the textField.
`static int` | `getDefaultHeight()`
`static int` | `getDefaultWidth()`
`long` | `getDelay()` Get the delay before the spinButton begins automatically incrementing its value.
`com.sas.util.transforms.TransformInterface` | `getDisplayTransform()` Get the displayTransform used to transform the objects in the model before they are displayed.
`double` | `getDoubleData()` Get the double data value of the SpinBox.
`static com.sas.beans.ExtendedBeanInfo` | `getExtendedBeanInfo()`
`int` | `getMaximum()` Get the maximum integer value of the SpinBox.
`java.lang.Number` | `getMaximumNumber()` Get the maximum number value for the SpinBox.
`int` | `getMinimum()` Get the minimum integer value of the SpinBox.
`java.lang.Number` | `getMinimumNumber()` Get the minimum number value for the SpinBox.
`java.text.NumberFormat` | `getNumberFormat()` Get the NumberFormat applied to the value set as the text in the textField.
`java.lang.Number` | `getNumberValue()` Get the number value of the SpinBox.
`int` | `getOrientation()` Get the orientation of the spinButton.
`double` | `getPrecision()` Get the precision of the value displayed in the textField.
`java.util.Vector` | `getRequiredInterfaces()` Returns the required interfaces Vector for this component.
`java.lang.Object[]` | `getSelectedObjects()` Get the selected object when the model is a collection.
`long` | `getStartInterval()` Get the start interval for the spinButton alarm to increment the value.
`java.lang.String` | `getText()` Get the text displayed in the textField.
`int` | `getUnitIncrement()` Get the integer unitIncrement of the spinButton.
`java.lang.Number` | `getUnitIncrementNumber()` Get the unitIncrement number value for the spinButton.
`int` | `getValue()` Get the integer value of the SpinBox.
`int` | `getVisibleAmount()` Not used.
`boolean` | `isCycleOn()` Get if the spinButton is set to cycle through its values.
`boolean` | `isPrecisionDisplayed()` Get if the text in the textField is displayed correctly.
`void` | `propertyChange(java.beans.PropertyChangeEvent event)` Handle property change events on complex properties.
`void` | `refresh(com.sas.ModelInterface model)` Refresh the SpinBox with the specified model.
`void` | `removeAdjustmentListener(java.awt.event.AdjustmentListener l)` Remove the adjustment listener.
`void` | `removeItemListener(java.awt.event.ItemListener l)` Remove the item listener.
`void` | `setAlarm(Alarm alarm)` Deprecated.
`void` | `setArrowDirection(int d)` Sets the direction the SpinButton arrows are pointing.
`void` | `setBlockIncrement(int block)` Set the blockIncrement on the spinButton.
`void` | `setBlockIncrementNumber(java.lang.Number block)` Set the blockIncrement number value for the spinButton.
`void` | `setColumns(int cols)` Set the number of text columns on the textField.
`void` | `setCycleOn(boolean cycle)` Set the spinButton to cycle through its values.
`static void` | `setDefaultHeight(int newHeight)`
`void` | `setDefaultValues()` Set the default internal values for the BaseButton.
`static void` | `setDefaultWidth(int newWidth)`
`void` | `setDelay(long delay)` Set the delay before the spinButton begins automatically incrementing its value.
`void` | `setDisplayTransform(com.sas.util.transforms.TransformInterface transform)` Set the displayTransform used to transform the items in the model when the model of the SpinBox is a StaticOrderedCollectionInterface object.
`void` | `setDoubleData(double d)` Set the double value of the SpinBox.
`void` | `setEnabled(boolean e)` Set the SpinBox enabled.
`void` | `setErrorHandler(ErrorHandlerInterface errorHandler)` Set the errorHandler for the validator of the text in the textField of the SpinBox.
`void` | `setForeground(java.awt.Color color)` Overrides setForeground in java.awt.Component.
`void` | `setMaximum(int max)` Set the integer maximum value for the SpinBox.
`void` | `setMaximumNumber(java.lang.Number max)` Set the maximum number value for the SpinBox.
`void` | `setMinimum(int min)` Set the integer minimum value for the SpinBox.
`void` | `setMinimumNumber(java.lang.Number min)` Set the minimum number value for the SpinBox.
`void` | `setNumberFormat(java.text.NumberFormat nf)` Set the NumberFormat applied to the value set as the text in the textField.
`void` | `setNumberValue(java.lang.Number value)` Set the number value for the SpinBox.
`void` | `setOrientation(int orient)` Set the orientation of the spinButton.
`void` | `setPrecision(double p)` Deprecated.
`void` | `setPrecisionDisplayed(boolean b)` Deprecated.
`void` | `setStartInterval(long startInterval)` Set the start interval for the spinButton alarm to increment the value.
`void` | `setText(java.lang.String txt)` Set the text of the SpinBox.
`void` | `setUnitIncrement(int unit)` Set the integer value of the unitIncrement.
`void` | `setUnitIncrementNumber(java.lang.Number unit)` Set the unitIncrement number value for the SpinBox.
`void` | `setValidator(ValidationInterface validator)` Set the validator for the text in the textField of the SpinBox.
`void` | `setValue(int val)` Set the integer value of the SpinBox.
`void` | `setVisibleAmount(int amt)` Not used.
`protected void` | `updateText(java.lang.Number newValue)` Invoked when the text needs to be updated from a change in the value.
`protected void` | `updateValue(java.lang.String txt)` Invoked when the value needs to be updated from a change in the text.

Methods inherited from class com.sas.awt.ContainerContainerComponent
`addNotify, clone, dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues`

Methods inherited from class com.sas.awt.ContainerVisualComponent
`addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, paint, print, printFinalize, printInitialize, queryLinks, queryLinks, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject`

Methods inherited from interface com.sas.awt.ContainerInterface
`getComponents, getLayout, invalidate, setLayout, validate`

Methods inherited from interface com.sas.awt.VisualInterface
`computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate`

Field Detail

### RB_KEY

    public static final java.lang.String RB_KEY

See Also:
  Constant Field Values

### spinBtn

    protected SpinButton spinBtn

### text

    protected TextField text

### precision

    protected double precision

### numberFormat

    protected java.text.NumberFormat numberFormat

### numberFormatSet

    protected boolean numberFormatSet

### defaultRangeModel

    protected com.sas.models.BoundedNumberInterface defaultRangeModel

### precisionDisplayed

    protected boolean precisionDisplayed

### textInvoked

    protected transient boolean textInvoked

### valueInvoked

    protected transient boolean valueInvoked

### prefixPredicate

    protected transient PrefixPredicate prefixPredicate

### arrowKeyAdapter

    protected transient com.sas.visuals.SpinBox.ArrowKeyAdapter arrowKeyAdapter

### itemTextAdapter

    protected transient com.sas.visuals.SpinBox.ItemTextAdapter itemTextAdapter

### adjustmentListener

    protected transient java.awt.event.AdjustmentListener adjustmentListener

### itemListener

    protected transient java.awt.event.ItemListener itemListener

### displayTransform

    protected com.sas.util.transforms.TransformInterface displayTransform

### UP_DOWN

    public static final int UP_DOWN

  int values representing the orientation of the spinButton arrows- UP_DOWN

  See Also:
    Constant Field Values

### LEFT_RIGHT

    public static final int LEFT_RIGHT

  int values representing the orientation of the spinButton arrows- LEFT_RIGHT

  See Also:
    Constant Field Values

Constructor Detail

### SpinBox

    public SpinBox()

  Default constructor

Method Detail

### getDefaultHeight

    public static int getDefaultHeight()

### getDefaultWidth

    public static int getDefaultWidth()

### setDefaultHeight

    public static void setDefaultHeight(int newHeight)

### setDefaultWidth

    public static void setDefaultWidth(int newWidth)

### getExtendedBeanInfo

    public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()

### addAdjustmentListener

    public void addAdjustmentListener(java.awt.event.AdjustmentListener l)

  Add a listener to receive adjustment events when the value of the SpinBox changes.

  Specified by:
    `addAdjustmentListener` in interface `java.awt.Adjustable`
  See Also:
    `Adjustable.addAdjustmentListener(java.awt.event.AdjustmentListener)`

### addItemListener

    public void addItemListener(java.awt.event.ItemListener l)

  Add a listener to receive item events when the state of the SpinBox changes.

  Specified by:
    `addItemListener` in interface `java.awt.ItemSelectable`
  See Also:
    `ItemSelectable.addItemListener(java.awt.event.ItemListener)`

### adjustmentValueChanged

    public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)

  Handle all adjustment events that are sent out by spinButton. Forward the events on to the AdjustmentListeners.

  Specified by:
    `adjustmentValueChanged` in interface `java.awt.event.AdjustmentListener`

### contentsChanged

    public void contentsChanged(com.sas.collection.ContentsChangedEvent e)

  Handle contentsChanged events from a collection model.

  Specified by:
    `contentsChanged` in interface `com.sas.collection.ContentsChangedListener`

### detachModel

    public void detachModel(com.sas.ModelInterface model)

  Detach the specified model from the SpinBox. The defaultModel will be attached if the model is set to null.

  Specified by:
    `detachModel` in interface `com.sas.ViewInterface`
  Overrides:
    `detachModel` in class `ContainerVisualComponent`
  Parameters:
    `model` - Model to detach
  See Also:
    `ViewInterface.detachModel(com.sas.ModelInterface)`

### getAlarm

    public Alarm getAlarm()

  Deprecated.

  Get the alarm used to trigger the spinButton when it is pressed and held down.

  Returns:
    the alarm set on the spinButton
  See Also:
    `SpinButton.getAlarm()`, `setAlarm(com.sas.util.Alarm)`

### getArrowDirection

    public int getArrowDirection()

  Get the direction the SpinButton arrows are pointing.

  Returns:
    the UP_DOWN or the LEFT_RIGHT values.
  See Also:
    `setArrowDirection(int)`

### getDelay

    public long getDelay()

  Get the delay before the spinButton begins automatically incrementing its value. The delay is in milliseconds.

  Returns:
    the delay before the spinButton begins incrementing its value.
  See Also:
    `getStartInterval()`, `setDelay(long)`

### getStartInterval

    public long getStartInterval()

  Get the start interval for the spinButton alarm to increment the value. The alarm interval gets shorter the longer the alarm is fired( the longer the button is held down).

  Returns:
    the start interval between spinButton value increments.
  See Also:
    `getDelay()`, `setStartInterval(long)`

### getBlockIncrement

    public int getBlockIncrement()

  Get the block value increment for the spinButton. This may not equal the blockIncrementNumber value if the number value is not using an integer data type.

  Specified by:
    `getBlockIncrement` in interface `java.awt.Adjustable`
  See Also:
    `Adjustable`, `SpinButton`, `getBlockIncrementNumber()`, `setBlockIncrement(int)`

### getColumns

    public int getColumns()

  Get the number of columns of the textField.

  Returns:
    the number of columns of the textField
  See Also:
    `setColumns(int)`

### getDisplayTransform

    public com.sas.util.transforms.TransformInterface getDisplayTransform()

  Get the displayTransform used to transform the objects in the model before they are displayed.

  Returns:
    the display TransformInterface object

### getDoubleData

    public final double getDoubleData()

  Get the double data value of the SpinBox. Final method that calls the `getNumberValue()` method.

  Specified by:
    `getDoubleData` in interface `com.sas.lang.DoubleDataInterface`
  Returns:
    double value of the SpinBox
  See Also:
    `setDoubleData(double)`, `getNumberValue()`, `DoubleDataInterface`

### getMaximum

    public int getMaximum()

  Get the maximum integer value of the SpinBox. This may not equal the maximumNumber value if the number value is not using an integer data type.

  Specified by:
    `getMaximum` in interface `java.awt.Adjustable`
  Returns:
    the maximum value of the SpinBox.
  See Also:
    `Adjustable`, `getMaximumNumber()`, `setMaximum(int)`

### getMinimum

    public int getMinimum()

  Get the minimum integer value of the SpinBox. This may not equal the minimumNumber value if the number value is not using an integer data type.

  Specified by:
    `getMinimum` in interface `java.awt.Adjustable`
  Returns:
    the minimum value of the SpinBox.
  See Also:
    `Adjustable`, `getMinimumNumber()`, `setMinimum(int)`

### getBlockIncrementNumber

    public java.lang.Number getBlockIncrementNumber()

  Get the blockIncrement number value for the spinButton.

  See Also:
    `Adjustable`, `SpinButton`, `setBlockIncrement(int)`

### getMaximumNumber

    public java.lang.Number getMaximumNumber()

  Get the maximum number value for the SpinBox.

  Returns:
    the maximum number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `setMaximumNumber(java.lang.Number)`

### getMinimumNumber

    public java.lang.Number getMinimumNumber()

  Get the minimum number value for the SpinBox.

  Returns:
    the minimum number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `setMinimumNumber(java.lang.Number)`

### getRequiredInterfaces

    public java.util.Vector getRequiredInterfaces()

  Returns the required interfaces Vector for this component.

  Specified by:
    `getRequiredInterfaces` in interface `com.sas.ViewInterface`
  Overrides:
    `getRequiredInterfaces` in class `ContainerVisualComponent`
  Returns:
    the required interfaces Vector for this component.
  See Also:
    `ViewInterface.getRequiredInterfaces()`

### getUnitIncrementNumber

    public java.lang.Number getUnitIncrementNumber()

  Get the unitIncrement number value for the spinButton.

  See Also:
    `Adjustable`, `SpinButton`, `setBlockIncrement(int)`

### getNumberValue

    public java.lang.Number getNumberValue()

  Get the number value of the SpinBox.

  Returns:
    the number value of the SpinBox
  See Also:
    `setNumberValue(java.lang.Number)`

### getNumberFormat

    public java.text.NumberFormat getNumberFormat()

  Get the NumberFormat applied to the value set as the text in the textField. This allows for formating of the string displayed in the textField.

  Returns:
    the NumberFormat object used to format the value set as the text in the textField
  See Also:
    `NumberFormat`

### getOrientation

    public int getOrientation()

  Get the orientation of the spinButton.

  Specified by:
    `getOrientation` in interface `java.awt.Adjustable`
  Returns:
    an orientation value from java.awt.Adjustable
  See Also:
    `Adjustable`, `SpinButton`, `setOrientation(int)`

### getPrecision

    public double getPrecision()

  Get the precision of the value displayed in the textField.

  Returns:
    the precision for the display of the SpinBox value
  See Also:
    `setPrecision(double)`

### getSelectedObjects

    public java.lang.Object[] getSelectedObjects()

  Get the selected object when the model is a collection.

  Specified by:
    `getSelectedObjects` in interface `java.awt.ItemSelectable`
  Returns:
    a one-element array containing the selectedItem when the model is a collection, null otherwise.
  See Also:
    `ItemSelectable`

### getText

    public java.lang.String getText()

  Get the text displayed in the textField.

  Specified by:
    `getText` in interface `com.sas.lang.StringDataInterface`
  Returns:
    the text displayed in the textField
  See Also:
    `StringDataInterface`, `setText(java.lang.String)`

### getUnitIncrement

    public int getUnitIncrement()

  Get the integer unitIncrement of the spinButton. This may not equal the unitIncrementNumber value if the number value is not using an integer data type.

  Specified by:
    `getUnitIncrement` in interface `java.awt.Adjustable`
  Returns:
    the amount the value is incremented by the spinButton.
  See Also:
    `setUnitIncrement(int)`

### getValue

    public int getValue()

  Get the integer value of the SpinBox.

  Specified by:
    `getValue` in interface `java.awt.Adjustable`
  Returns:
    the integer value of the SpinBox
  See Also:
    `Adjustable`, `SpinButton`, `setValue(int)`

### getVisibleAmount

    public int getVisibleAmount()

  Not used. Get the visibleAmount of the spinButton.

  Specified by:
    `getVisibleAmount` in interface `java.awt.Adjustable`
  Returns:
    the visibleAmount
  See Also:
    `Adjustable`, `setVisibleAmount(int)`

### isCycleOn

    public boolean isCycleOn()

  Get if the spinButton is set to cycle through its values.

  Returns:
    true if the values will be cycled through; false otherwise.
  See Also:
    `setCycleOn(boolean)`

### isPrecisionDisplayed

    public boolean isPrecisionDisplayed()

  Get if the text in the textField is displayed correctly.

  Returns:
    if the text uses the precision to display the value.
  See Also:
    `setPrecisionDisplayed(boolean)`

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent event)

  Handle property change events on complex properties.

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`
  Overrides:
    `propertyChange` in class `ContainerVisualComponent`
  See Also:
    `PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)`

### refresh

    public void refresh(com.sas.ModelInterface model)

  Refresh the SpinBox with the specified model.

  Specified by:
    `refresh` in interface `com.sas.ViewInterface`
  Overrides:
    `refresh` in class `ContainerVisualComponent`
  Parameters:
    `model` - the model to refresh the SpinBox with.
  See Also:
    `ViewInterface.refresh(com.sas.ModelInterface)`

### removeAdjustmentListener

    public void removeAdjustmentListener(java.awt.event.AdjustmentListener l)

  Remove the adjustment listener.

  Specified by:
    `removeAdjustmentListener` in interface `java.awt.Adjustable`
  Parameters:
    `l` - the adjustment listener
  See Also:
    `addAdjustmentListener(java.awt.event.AdjustmentListener)`, `AdjustmentEvent`

### removeItemListener

    public void removeItemListener(java.awt.event.ItemListener l)

  Remove the item listener.

  Specified by:
    `removeItemListener` in interface `java.awt.ItemSelectable`
  Parameters:
    `l` - the item listener
  See Also:
    `addItemListener(java.awt.event.ItemListener)`, `ItemEvent`

### setAlarm

    public void setAlarm(Alarm alarm)

  Deprecated.

  Set the alarm used to trigger the spinButton when it is held down.

  Parameters:
    `alarm` - the spinButton alarm
  See Also:
    `SpinButton.setAlarm(com.sas.util.Alarm)`

### setArrowDirection

    public void setArrowDirection(int d)

  Sets the direction the SpinButton arrows are pointing.

  Parameters:
    `d` - the UP_DOWN or the LEFT_RIGHT values.
  See Also:
    `getArrowDirection()`

### setBlockIncrement

    public void setBlockIncrement(int block)

  Set the blockIncrement on the spinButton.

  Specified by:
    `setBlockIncrement` in interface `java.awt.Adjustable`
  See Also:
    `Adjustable`, `SpinButton`, `getBlockIncrement()`

### setColumns

    public void setColumns(int cols)

  Set the number of text columns on the textField.

  Parameters:
    `cols` - the number of columns of text

### setCycleOn

    public void setCycleOn(boolean cycle)

  Set the spinButton to cycle through its values.

  Parameters:
    `cycle` - true if the values will be cycled through; false otherwise.
  See Also:
    `isCycleOn()`

### setDefaultValues

    public void setDefaultValues()

  Set the default internal values for the BaseButton.

  Specified by:
    `setDefaultValues` in interface `ContainerInterface`
  Specified by:
    `setDefaultValues` in interface `VisualInterface`
  Specified by:
    `setDefaultValues` in interface `com.sas.ComponentInterface`
  Overrides:
    `setDefaultValues` in class `CompositeContainer`
  See Also:
    `ContainerInterface.setDefaultValues()`

### setForeground

    public void setForeground(java.awt.Color color)

  Overrides setForeground in java.awt.Component. This is overridden to get notification of a color change and to filter it to the contained components.

  Overrides:
    `setForeground` in class `java.awt.Component`
  Parameters:
    `color` - the new color for the foreground

### setDelay

    public void setDelay(long delay)

  Set the delay before the spinButton begins automatically incrementing its value. The delay is in milliseconds.

  Parameters:
    `delay` - the delay before the spinButton begins incrementing its value.
  See Also:
    `getDelay()`

### setStartInterval

    public void setStartInterval(long startInterval)

  Set the start interval for the spinButton alarm to increment the value. The alarm interval gets shorter the longer the alarm is fired( the longer the button is held down).

  Parameters:
    `startInterval` - the start interval between spinButton value increments.
  See Also:
    `getStartInterval()`

### setDisplayTransform

    public void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)

  Set the displayTransform used to transform the items in the model when the model of the SpinBox is a StaticOrderedCollectionInterface object. The transformed items are displayed in the textField.

  Parameters:
    `transform` - the displayTransform

### setDoubleData

    public final void setDoubleData(double d)

  Set the double value of the SpinBox. Final method that calls the `setNumberValue(Number)` method.

  Specified by:
    `setDoubleData` in interface `com.sas.lang.DoubleDataInterface`
  Parameters:
    `d` - new double value
  See Also:
    `getDoubleData()`, `setNumberValue(java.lang.Number)`, `DoubleDataInterface`

### setEnabled

    public void setEnabled(boolean e)

  Set the SpinBox enabled.

  Specified by:
    `setEnabled` in interface `VisualInterface`
  Overrides:
    `setEnabled` in class `ContainerVisualComponent`
  Parameters:
    `e` - true to enable the SpinBox; false to disable it
  See Also:
    `VisualInterface.setEnabled(boolean)`

### setMaximum

    public void setMaximum(int max)

  Set the integer maximum value for the SpinBox.

  Specified by:
    `setMaximum` in interface `java.awt.Adjustable`
  Parameters:
    `max` - the integer maximum value
  See Also:
    `getMaximum()`

### setMinimum

    public void setMinimum(int min)

  Set the integer minimum value for the SpinBox.

  Specified by:
    `setMinimum` in interface `java.awt.Adjustable`
  Parameters:
    `min` - the integer minimum value
  See Also:
    `getMinimum()`

### setBlockIncrementNumber

    public void setBlockIncrementNumber(java.lang.Number block)

  Set the blockIncrement number value for the spinButton.

  See Also:
    `Adjustable`, `SpinButton`, `setBlockIncrement(int)`

### setMaximumNumber

    public void setMaximumNumber(java.lang.Number max)

  Set the maximum number value for the SpinBox.

  Parameters:
    `max` - the maximum number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `getMaximumNumber()`

### setMinimumNumber

    public void setMinimumNumber(java.lang.Number min)

  Set the minimum number value for the SpinBox.

  Parameters:
    `min` - the minimum number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `getMinimumNumber()`

### setUnitIncrementNumber

    public void setUnitIncrementNumber(java.lang.Number unit)

  Set the unitIncrement number value for the SpinBox.

  Parameters:
    `unit` - the unitIncrement number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `getUnitIncrementNumber()`

### setNumberValue

    public void setNumberValue(java.lang.Number value)

  Set the number value for the SpinBox.

  Parameters:
    `value` - the number value for the SpinBox
  See Also:
    `BoundedNumberInterface`, `getNumberValue()`

### setNumberFormat

    public void setNumberFormat(java.text.NumberFormat nf)

  Set the NumberFormat applied to the value set as the text in the textField. This allows for formating of the number value displayed in the textField.

  Parameters:
    `nf` - the NumberFormat object used to format the value set as the text in the textField
  See Also:
    `NumberFormat`

### setOrientation

    public void setOrientation(int orient)

  Set the orientation of the spinButton. Uses HORIZONTAL and VERTICAL static int values.

  Parameters:
    `orient` - an orientation value from java.awt.Adjustable
  See Also:
    `Adjustable`, `getOrientation()`

### setPrecision

    public void setPrecision(double p)

  Deprecated.

  Set the precision used to display the value in the textField. The precision value needs to be in the form of a one digit where the value will be rounded at and zero's every where else. Example: 0.01 would be the precision to round to the nearest hundredths.

  Parameters:
    `p` - the precision
  See Also:
    `getPrecision()`

### setPrecisionDisplayed

    public void setPrecisionDisplayed(boolean b)

  Deprecated.

  Set if the precision is used to display the text in the SpinBox.

  Parameters:
    `b` - true the precision value is used to display the SpinBox value; false the entire value is displayed.
  See Also:
    `isPrecisionDisplayed()`

### setText

    public void setText(java.lang.String txt)

  Set the text of the SpinBox. This also changes the value if the model is a boundedNumber

  Specified by:
    `setText` in interface `com.sas.lang.StringDataInterface`
  Parameters:
    `txt` - the new text of the SpinBox
  See Also:
    `getText()`

### setUnitIncrement

    public void setUnitIncrement(int unit)

  Set the integer value of the unitIncrement.

  Specified by:
    `setUnitIncrement` in interface `java.awt.Adjustable`
  Parameters:
    `unit` - the new unitIncrement.
  See Also:
    `Adjustable`, `getUnitIncrement()`

### setValue

    public void setValue(int val)

  Set the integer value of the SpinBox.

  Specified by:
    `setValue` in interface `java.awt.Adjustable`
  Parameters:
    `val` - the new integer value
  See Also:
    `Adjustable`, `getValue()`

### setValidator

    public void setValidator(ValidationInterface validator)

  Set the validator for the text in the textField of the SpinBox. If a model is set the implements the ValidationInterface, this property will be set with the model. This property must be set after the model if a different validator is wanted. If this is set before the model is set, it will be overridden if the model implements the ValidationInterface.

  Specified by:
    `setValidator` in interface `ValidatorInterface`
  Overrides:
    `setValidator` in class `ContainerContainerComponent`

### setErrorHandler

    public void setErrorHandler(ErrorHandlerInterface errorHandler)

  Set the errorHandler for the validator of the text in the textField of the SpinBox.

  Specified by:
    `setErrorHandler` in interface `ValidatorInterface`
  Overrides:
    `setErrorHandler` in class `ContainerContainerComponent`

### setVisibleAmount

    public void setVisibleAmount(int amt)

  Not used. Required for the java.awt.Adjustable interface.

  Specified by:
    `setVisibleAmount` in interface `java.awt.Adjustable`
  See Also:
    `Adjustable`

### updateText

    protected void updateText(java.lang.Number newValue)

  Invoked when the text needs to be updated from a change in the value.

### updateValue

    protected void updateValue(java.lang.String txt)

  Invoked when the value needs to be updated from a change in the text.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.