com.frinika.sequencer.gui
Class TickSpinnerModel

java.lang.Object
  extended by javax.swing.AbstractSpinnerModel
      extended by javax.swing.SpinnerNumberModel
          extended by com.frinika.sequencer.gui.TickSpinnerModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.SpinnerModel

public class TickSpinnerModel
extends javax.swing.SpinnerNumberModel

Model for TickSpinner.

Author:
Jens Gulden
See Also:
TickSpinner, Serialized Form

Field Summary
protected  TimeFormat format
           
protected  TimeUtils timeUtils
           
 
Fields inherited from class javax.swing.AbstractSpinnerModel
listenerList
 
Constructor Summary
TickSpinnerModel(long value, TimeUtils timeUtils)
           
TickSpinnerModel(TimeFormat format, long value, boolean allowNegative, TimeUtils timeUtils)
           
TickSpinnerModel(TimeFormat format, long value, TimeUtils timeUtils)
           
TickSpinnerModel(TimeFormat format, TimeUtils timeUtils)
           
TickSpinnerModel(TimeUtils timeUtils)
           
 
Method Summary
protected  void fireStateChanged()
           
 TimeFormat getFormat()
           
 int getStepSize(java.lang.String currentValue, int caretPos)
           
 long stringToTicks(java.lang.String s)
           
 java.lang.String ticksToString(long tick)
           
 void updateStepSize(java.lang.String currentValue, int caretPos)
           
 
Methods inherited from class javax.swing.SpinnerNumberModel
getMaximum, getMinimum, getNextValue, getNumber, getPreviousValue, getStepSize, getValue, setMaximum, setMinimum, setStepSize, setValue
 
Methods inherited from class javax.swing.AbstractSpinnerModel
addChangeListener, getChangeListeners, getListeners, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

protected TimeFormat format

timeUtils

protected TimeUtils timeUtils
Constructor Detail

TickSpinnerModel

public TickSpinnerModel(TimeUtils timeUtils)

TickSpinnerModel

public TickSpinnerModel(TimeFormat format,
                        TimeUtils timeUtils)

TickSpinnerModel

public TickSpinnerModel(long value,
                        TimeUtils timeUtils)

TickSpinnerModel

public TickSpinnerModel(TimeFormat format,
                        long value,
                        TimeUtils timeUtils)

TickSpinnerModel

public TickSpinnerModel(TimeFormat format,
                        long value,
                        boolean allowNegative,
                        TimeUtils timeUtils)
Method Detail

getFormat

public TimeFormat getFormat()

stringToTicks

public long stringToTicks(java.lang.String s)
                   throws java.text.ParseException
Throws:
java.text.ParseException

ticksToString

public java.lang.String ticksToString(long tick)

updateStepSize

public void updateStepSize(java.lang.String currentValue,
                           int caretPos)

fireStateChanged

protected void fireStateChanged()
Overrides:
fireStateChanged in class javax.swing.AbstractSpinnerModel

getStepSize

public int getStepSize(java.lang.String currentValue,
                       int caretPos)