yu.ac.bg.etf.javaqx.qswing
Class DefaultBoundedRangeModel

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.DefaultBoundedRangeModel
All Implemented Interfaces:
BoundedRangeModel

public class DefaultBoundedRangeModel
extends java.lang.Object
implements BoundedRangeModel

Default Implementation of BoundedRangeModel.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Nested Class Summary
static class DefaultBoundedRangeModel.EmptyModel
          Empty Model.
 
Field Summary
protected  ChangeEvent changeEvent
           
protected  EventListenerList listenerList
           
 
Constructor Summary
DefaultBoundedRangeModel()
          Constructs new DefaultBoundedRangeModel object.
DefaultBoundedRangeModel(int value, int extent, int minimum, int maximum)
          Constructs new DefaultBoundedRangeModel object.
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Adds change listener.
protected  void fireStateChanged()
          Fires state changed event.
 ChangeListener[] getChangeListeners()
          Returns change listeners.
 int getExtent()
          Returns the current extent.
 int getMaximum()
          Returns the maximum value for the model.
 int getMinimum()
          Returns the minimum value for the model.
 int getValue()
          Returns the current value for the model.
 boolean getValueIsAdjusting()
          Returns the value of the valueIsAdjusting property.
 void removeChangeListener(ChangeListener listener)
          Removes change listener.
 void setExtent(int extent)
          Sets the current extent.
 void setMaximum(int maximum)
          Sets the maximum value for the model.
 void setMinimum(int minimum)
          Sets the minimum value for the model.
 void setRangeProperties(int value, int extent, int minimum, int maximum, boolean adjusting)
          Sets all the properties for the model.
 void setValue(int value)
          Sets the current value for the model.
 void setValueIsAdjusting(boolean adjusting)
          Sets the value of the valueIsAdjusting property.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

changeEvent

protected final ChangeEvent changeEvent

listenerList

protected final EventListenerList listenerList
Constructor Detail

DefaultBoundedRangeModel

public DefaultBoundedRangeModel()
Constructs new DefaultBoundedRangeModel object.


DefaultBoundedRangeModel

public DefaultBoundedRangeModel(int value,
                                int extent,
                                int minimum,
                                int maximum)
Constructs new DefaultBoundedRangeModel object.

Parameters:
value - the value
extent - the extent
minimum - the minimum
maximum - the maximum
Method Detail

getChangeListeners

public ChangeListener[] getChangeListeners()
Returns change listeners.

Returns:
change listeners

fireStateChanged

protected void fireStateChanged()
Fires state changed event.


getValue

public int getValue()
Returns the current value for the model.

Specified by:
getValue in interface BoundedRangeModel
Returns:
The current value for the model.

setValue

public void setValue(int value)
Sets the current value for the model.

Specified by:
setValue in interface BoundedRangeModel
Parameters:
value - the value

getMinimum

public int getMinimum()
Returns the minimum value for the model.

Specified by:
getMinimum in interface BoundedRangeModel
Returns:
the minimum value for the model

setMinimum

public void setMinimum(int minimum)
Sets the minimum value for the model.

Specified by:
setMinimum in interface BoundedRangeModel
Parameters:
minimum - the minimum value

getMaximum

public int getMaximum()
Returns the maximum value for the model.

Specified by:
getMaximum in interface BoundedRangeModel
Returns:
the maximum value for the model

setMaximum

public void setMaximum(int maximum)
Sets the maximum value for the model.

Specified by:
setMaximum in interface BoundedRangeModel
Parameters:
maximum - the maximum value

getExtent

public int getExtent()
Returns the current extent.

Specified by:
getExtent in interface BoundedRangeModel
Returns:
the extent

setExtent

public void setExtent(int extent)
Sets the current extent.

Specified by:
setExtent in interface BoundedRangeModel
Parameters:
extent - the extent

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns the value of the valueIsAdjusting property.

Specified by:
getValueIsAdjusting in interface BoundedRangeModel
Returns:
the value of the valueIsAdjusting property

setValueIsAdjusting

public void setValueIsAdjusting(boolean adjusting)
Sets the value of the valueIsAdjusting property.

Specified by:
setValueIsAdjusting in interface BoundedRangeModel
Parameters:
adjusting - the value of the valueIsAdjusting property

setRangeProperties

public void setRangeProperties(int value,
                               int extent,
                               int minimum,
                               int maximum,
                               boolean adjusting)
Sets all the properties for the model.

Specified by:
setRangeProperties in interface BoundedRangeModel
Parameters:
value - the value
extent - the extent
minimum - the minimum value
maximum - the maximum value
adjusting - the adjusting flag

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds change listener.

Specified by:
addChangeListener in interface BoundedRangeModel
Parameters:
listener - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes change listener.

Specified by:
removeChangeListener in interface BoundedRangeModel
Parameters:
listener - the change listener

toString

public java.lang.String toString()



Copyright © 2007 ETF and contributors. All Rights Reserved.