javax.swing
Class DefaultBoundedRangeModel

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.DefaultBoundedRangeModel
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel

public class DefaultBoundedRangeModel
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A generic implementation of BoundedRangeModel.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel , Serialized Form

Field Summary
protected  ChangeEvent sample code for javax.swing.event.ChangeEvent definition code for javax.swing.event.ChangeEvent changeEvent sample code for javax.swing.DefaultBoundedRangeModel.changeEvent definition code for javax.swing.DefaultBoundedRangeModel.changeEvent
          Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected  EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList listenerList sample code for javax.swing.DefaultBoundedRangeModel.listenerList definition code for javax.swing.DefaultBoundedRangeModel.listenerList
          The listeners waiting for model changes.
 
Constructor Summary
DefaultBoundedRangeModel sample code for javax.swing.DefaultBoundedRangeModel.DefaultBoundedRangeModel() definition code for javax.swing.DefaultBoundedRangeModel.DefaultBoundedRangeModel() ()
          Initializes all of the properties with default values.
DefaultBoundedRangeModel sample code for javax.swing.DefaultBoundedRangeModel.DefaultBoundedRangeModel(int, int, int, int) definition code for javax.swing.DefaultBoundedRangeModel.DefaultBoundedRangeModel(int, int, int, int) (int value, int extent, int min, int max)
          Initializes value, extent, minimum and maximum.
 
Method Summary
 void addChangeListener sample code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) (ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
          Adds a ChangeListener.
protected  void fireStateChanged sample code for javax.swing.DefaultBoundedRangeModel.fireStateChanged() definition code for javax.swing.DefaultBoundedRangeModel.fireStateChanged() ()
          Runs each ChangeListener's stateChanged method.
 ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener [] getChangeListeners sample code for javax.swing.DefaultBoundedRangeModel.getChangeListeners() definition code for javax.swing.DefaultBoundedRangeModel.getChangeListeners() ()
          Returns an array of all the change listeners registered on this DefaultBoundedRangeModel.
 int getExtent sample code for javax.swing.DefaultBoundedRangeModel.getExtent() definition code for javax.swing.DefaultBoundedRangeModel.getExtent() ()
          Returns the model's extent.
<T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener >
T[]
getListeners sample code for javax.swing.DefaultBoundedRangeModel.getListeners(java.lang.Class) definition code for javax.swing.DefaultBoundedRangeModel.getListeners(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this model.
 int getMaximum sample code for javax.swing.DefaultBoundedRangeModel.getMaximum() definition code for javax.swing.DefaultBoundedRangeModel.getMaximum() ()
          Returns the model's maximum.
 int getMinimum sample code for javax.swing.DefaultBoundedRangeModel.getMinimum() definition code for javax.swing.DefaultBoundedRangeModel.getMinimum() ()
          Returns the model's minimum.
 int getValue sample code for javax.swing.DefaultBoundedRangeModel.getValue() definition code for javax.swing.DefaultBoundedRangeModel.getValue() ()
          Returns the model's current value.
 boolean getValueIsAdjusting sample code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting() definition code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting() ()
          Returns true if the value is in the process of changing as a result of actions being taken by the user.
 void removeChangeListener sample code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) (ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
          Removes a ChangeListener.
 void setExtent sample code for javax.swing.DefaultBoundedRangeModel.setExtent(int) definition code for javax.swing.DefaultBoundedRangeModel.setExtent(int) (int n)
          Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
 void setMaximum sample code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) (int n)
          Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
 void setMinimum sample code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) (int n)
          Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
 void setRangeProperties sample code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean) definition code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean) (int newValue, int newExtent, int newMin, int newMax, boolean adjusting)
          Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
 void setValue sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int) (int n)
          Sets the current value of the model.
 void setValueIsAdjusting sample code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean) definition code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean) (boolean b)
          Sets the valueIsAdjusting property.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.swing.DefaultBoundedRangeModel.toString() definition code for javax.swing.DefaultBoundedRangeModel.toString() ()
          Returns a string that displays all of the BoundedRangeModel properties.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

changeEvent sample code for javax.swing.DefaultBoundedRangeModel.changeEvent

protected transient ChangeEvent sample code for javax.swing.event.ChangeEvent definition code for javax.swing.event.ChangeEvent  changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".


listenerList sample code for javax.swing.DefaultBoundedRangeModel.listenerList

protected EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList  listenerList
The listeners waiting for model changes.

Constructor Detail

DefaultBoundedRangeModel sample code for javax.swing.DefaultBoundedRangeModel() definition code for javax.swing.DefaultBoundedRangeModel()

public DefaultBoundedRangeModel()
Initializes all of the properties with default values. Those values are:


DefaultBoundedRangeModel sample code for javax.swing.DefaultBoundedRangeModel(int, int, int, int) definition code for javax.swing.DefaultBoundedRangeModel(int, int, int, int)

public DefaultBoundedRangeModel(int value,
                                int extent,
                                int min,
                                int max)
Initializes value, extent, minimum and maximum. Adjusting is false. Throws an IllegalArgumentException if the following constraints aren't satisfied:
 min <= value <= value+extent <= max
 

Method Detail

getValue sample code for javax.swing.DefaultBoundedRangeModel.getValue() definition code for javax.swing.DefaultBoundedRangeModel.getValue()

public int getValue()
Returns the model's current value.

Specified by:
getValue sample code for javax.swing.BoundedRangeModel.getValue() definition code for javax.swing.BoundedRangeModel.getValue() in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Returns:
the model's current value
See Also:
setValue(int) sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int) , BoundedRangeModel.getValue() sample code for javax.swing.BoundedRangeModel.getValue() definition code for javax.swing.BoundedRangeModel.getValue()

getExtent sample code for javax.swing.DefaultBoundedRangeModel.getExtent() definition code for javax.swing.DefaultBoundedRangeModel.getExtent()

public int getExtent()
Returns the model's extent.

Specified by:
getExtent sample code for javax.swing.BoundedRangeModel.getExtent() definition code for javax.swing.BoundedRangeModel.getExtent() in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Returns:
the model's extent
See Also:
setExtent(int) sample code for javax.swing.DefaultBoundedRangeModel.setExtent(int) definition code for javax.swing.DefaultBoundedRangeModel.setExtent(int) , BoundedRangeModel.getExtent() sample code for javax.swing.BoundedRangeModel.getExtent() definition code for javax.swing.BoundedRangeModel.getExtent()

getMinimum sample code for javax.swing.DefaultBoundedRangeModel.getMinimum() definition code for javax.swing.DefaultBoundedRangeModel.getMinimum()

public int getMinimum()
Returns the model's minimum.

Specified by:
getMinimum sample code for javax.swing.BoundedRangeModel.getMinimum() definition code for javax.swing.BoundedRangeModel.getMinimum() in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Returns:
the model's minimum
See Also:
setMinimum(int) sample code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) , BoundedRangeModel.getMinimum() sample code for javax.swing.BoundedRangeModel.getMinimum() definition code for javax.swing.BoundedRangeModel.getMinimum()

getMaximum sample code for javax.swing.DefaultBoundedRangeModel.getMaximum() definition code for javax.swing.DefaultBoundedRangeModel.getMaximum()

public int getMaximum()
Returns the model's maximum.

Specified by:
getMaximum sample code for javax.swing.BoundedRangeModel.getMaximum() definition code for javax.swing.BoundedRangeModel.getMaximum() in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Returns:
the model's maximum
See Also:
setMaximum(int) sample code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) , BoundedRangeModel.getMaximum() sample code for javax.swing.BoundedRangeModel.getMaximum() definition code for javax.swing.BoundedRangeModel.getMaximum()

setValue sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int)

public void setValue(int n)
Sets the current value of the model. For a slider, that determines where the knob appears. Ensures that the new value, n falls within the model's constraints:
     minimum <= value <= value+extent <= maximum
 

Specified by:
setValue sample code for javax.swing.BoundedRangeModel.setValue(int) definition code for javax.swing.BoundedRangeModel.setValue(int) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
n - the model's new value
See Also:
BoundedRangeModel.setValue(int) sample code for javax.swing.BoundedRangeModel.setValue(int) definition code for javax.swing.BoundedRangeModel.setValue(int)

setExtent sample code for javax.swing.DefaultBoundedRangeModel.setExtent(int) definition code for javax.swing.DefaultBoundedRangeModel.setExtent(int)

public void setExtent(int n)
Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
     minimum <= value <= value+extent <= maximum
 

Specified by:
setExtent sample code for javax.swing.BoundedRangeModel.setExtent(int) definition code for javax.swing.BoundedRangeModel.setExtent(int) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
n - the model's new extent
See Also:
BoundedRangeModel.setExtent(int) sample code for javax.swing.BoundedRangeModel.setExtent(int) definition code for javax.swing.BoundedRangeModel.setExtent(int)

setMinimum sample code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMinimum(int)

public void setMinimum(int n)
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
     minimum <= value <= value+extent <= maximum
 

Specified by:
setMinimum sample code for javax.swing.BoundedRangeModel.setMinimum(int) definition code for javax.swing.BoundedRangeModel.setMinimum(int) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
n - the model's new minimum
See Also:
getMinimum() sample code for javax.swing.DefaultBoundedRangeModel.getMinimum() definition code for javax.swing.DefaultBoundedRangeModel.getMinimum() , BoundedRangeModel.setMinimum(int) sample code for javax.swing.BoundedRangeModel.setMinimum(int) definition code for javax.swing.BoundedRangeModel.setMinimum(int)

setMaximum sample code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMaximum(int)

public void setMaximum(int n)
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
     minimum <= value <= value+extent <= maximum
 

Specified by:
setMaximum sample code for javax.swing.BoundedRangeModel.setMaximum(int) definition code for javax.swing.BoundedRangeModel.setMaximum(int) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
n - the model's new maximum
See Also:
BoundedRangeModel.setMaximum(int) sample code for javax.swing.BoundedRangeModel.setMaximum(int) definition code for javax.swing.BoundedRangeModel.setMaximum(int)

setValueIsAdjusting sample code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean) definition code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean)

public void setValueIsAdjusting(boolean b)
Sets the valueIsAdjusting property.

Specified by:
setValueIsAdjusting sample code for javax.swing.BoundedRangeModel.setValueIsAdjusting(boolean) definition code for javax.swing.BoundedRangeModel.setValueIsAdjusting(boolean) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
b - true if the upcoming changes to the value property are part of a series
See Also:
getValueIsAdjusting() sample code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting() definition code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting() , setValue(int) sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int) , BoundedRangeModel.setValueIsAdjusting(boolean) sample code for javax.swing.BoundedRangeModel.setValueIsAdjusting(boolean) definition code for javax.swing.BoundedRangeModel.setValueIsAdjusting(boolean)

getValueIsAdjusting sample code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting() definition code for javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting()

public boolean getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.

Specified by:
getValueIsAdjusting sample code for javax.swing.BoundedRangeModel.getValueIsAdjusting() definition code for javax.swing.BoundedRangeModel.getValueIsAdjusting() in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Returns:
the value of the valueIsAdjusting property
See Also:
setValue(int) sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int) , BoundedRangeModel.getValueIsAdjusting() sample code for javax.swing.BoundedRangeModel.getValueIsAdjusting() definition code for javax.swing.BoundedRangeModel.getValueIsAdjusting()

setRangeProperties sample code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean) definition code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean)

public void setRangeProperties(int newValue,
                               int newExtent,
                               int newMin,
                               int newMax,
                               boolean adjusting)
Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
     minimum <= value <= value+extent <= maximum
 

At most, one ChangeEvent is generated.

Specified by:
setRangeProperties sample code for javax.swing.BoundedRangeModel.setRangeProperties(int, int, int, int, boolean) definition code for javax.swing.BoundedRangeModel.setRangeProperties(int, int, int, int, boolean) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
newValue - an int giving the current value
newExtent - an int giving the amount by which the value can "jump"
newMin - an int giving the minimum value
newMax - an int giving the maximum value
adjusting - a boolean, true if a series of changes are in progress
See Also:
BoundedRangeModel.setRangeProperties(int, int, int, int, boolean) sample code for javax.swing.BoundedRangeModel.setRangeProperties(int, int, int, int, boolean) definition code for javax.swing.BoundedRangeModel.setRangeProperties(int, int, int, int, boolean) , setValue(int) sample code for javax.swing.DefaultBoundedRangeModel.setValue(int) definition code for javax.swing.DefaultBoundedRangeModel.setValue(int) , setExtent(int) sample code for javax.swing.DefaultBoundedRangeModel.setExtent(int) definition code for javax.swing.DefaultBoundedRangeModel.setExtent(int) , setMinimum(int) sample code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMinimum(int) , setMaximum(int) sample code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) definition code for javax.swing.DefaultBoundedRangeModel.setMaximum(int) , setValueIsAdjusting(boolean) sample code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean) definition code for javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean)

addChangeListener sample code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)

public void addChangeListener(ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
Adds a ChangeListener. The change listeners are run each time any one of the Bounded Range model properties changes.

Specified by:
addChangeListener sample code for javax.swing.BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
l - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) , BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)

removeChangeListener sample code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)

public void removeChangeListener(ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
Removes a ChangeListener.

Specified by:
removeChangeListener sample code for javax.swing.BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) in interface BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel
Parameters:
l - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) , BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)

getChangeListeners sample code for javax.swing.DefaultBoundedRangeModel.getChangeListeners() definition code for javax.swing.DefaultBoundedRangeModel.getChangeListeners()

public ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener [] getChangeListeners()
Returns an array of all the change listeners registered on this DefaultBoundedRangeModel.

Returns:
all of this model's ChangeListeners or an empty array if no change listeners are currently registered
Since:
1.4
See Also:
addChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener) , removeChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)

fireStateChanged sample code for javax.swing.DefaultBoundedRangeModel.fireStateChanged() definition code for javax.swing.DefaultBoundedRangeModel.fireStateChanged()

protected void fireStateChanged()
Runs each ChangeListener's stateChanged method.

See Also:
setRangeProperties(int, int, int, int, boolean) sample code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean) definition code for javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean) , EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList

toString sample code for javax.swing.DefaultBoundedRangeModel.toString() definition code for javax.swing.DefaultBoundedRangeModel.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string that displays all of the BoundedRangeModel properties.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of the object.

getListeners sample code for javax.swing.DefaultBoundedRangeModel.<T extends java.util.EventListener>getListeners(java.lang.Class<T>) definition code for javax.swing.DefaultBoundedRangeModel.<T extends java.util.EventListener>getListeners(java.lang.Class<T>)

public <T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener > T[] getListeners(Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultBoundedRangeModel instance m for its change listeners with the following code:

ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));
If no such listeners exist, this method returns an empty array.

Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this model, or an empty array if no such listeners have been added
Throws:
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
Since:
1.3
See Also:
getChangeListeners() sample code for javax.swing.DefaultBoundedRangeModel.getChangeListeners() definition code for javax.swing.DefaultBoundedRangeModel.getChangeListeners()