DefaultBoundedRangeModel (Java SE 19 & JDK 19) (original) (raw)

All Implemented Interfaces:

[Serializable](../../../java.base/java/io/Serializable.html "interface in java.io"), [BoundedRangeModel](BoundedRangeModel.html "interface in javax.swing")


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 JavaBeans has been added to the java.beans package. Please see XMLEncoder.

Since:

1.2

See Also:

Fields
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
The listeners waiting for model changes.

Constructors
Initializes all of the properties with default values.
[DefaultBoundedRangeModel](#%3Cinit%3E%28int,int,int,int%29)(int value, int extent, int min, int max)
Initializes value, extent, minimum and maximum.

void
protected void
Runs each ChangeListener's stateChanged method.
Returns an array of all the change listeners registered on this DefaultBoundedRangeModel.
int
[getExtent](#getExtent%28%29)()
Returns the model's extent.
[getListeners](#getListeners%28java.lang.Class%29)([Class](../../../java.base/java/lang/Class.html "class in java.lang")<T> listenerType)
Returns an array of all the objects currently registered as_Foo_Listeners upon this model.
int
Returns the model's maximum.
int
Returns the model's minimum.
int
[getValue](#getValue%28%29)()
Returns the model's current value.
boolean
Returns true if the value is in the process of changing as a result of actions being taken by the user.
void
Removes a ChangeListener.
void
[setExtent](#setExtent%28int%29)(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](#setMaximum%28int%29)(int n)
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
void
[setMinimum](#setMinimum%28int%29)(int n)
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
void
[setRangeProperties](#setRangeProperties%28int,int,int,int,boolean%29)(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](#setValue%28int%29)(int n)
Sets the current value of the model.
void
[setValueIsAdjusting](#setValueIsAdjusting%28boolean%29)(boolean b)
Sets the valueIsAdjusting property.
[toString](#toString%28%29)()
Returns a string that displays all of theBoundedRangeModel properties.