| public class javax.swing DefaultBoundedRangeModel
|
Java SE 6 |
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 java.beans.XMLEncoder.
| version | 1.48 03/01/06 |
| See also | javax.swing.BoundedRangeModel |
| Fields | |
|---|---|
| protected 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".
|
| protected EventListenerList | listenerList The listeners waiting for model changes. |
| Methods | |||||
|---|---|---|---|---|---|
| public void | addChangeListener(ChangeListener l) Adds a ChangeListener. The change listeners are run each
time any one of the Bounded Range model properties changes.
| ||||
| protected void | fireStateChanged() Runs each ChangeListener's stateChanged method.
| ||||
| public void | removeChangeListener(ChangeListener l) Removes a ChangeListener.
| ||||
| public String | toString() Returns a string that displays all of the BoundedRangeModel properties.
| ||||
| Properties | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public ChangeListener[] | getChangeListeners() Returns an array of all the change listeners registered on this DefaultBoundedRangeModel.
| ||||||||||
| 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
| ||||||||||
| public int | getExtent() Returns the model's extent.
| ||||||||||
| public EventListener[]<T> | getListeners(Class 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 ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));If no such listeners exist, this method returns an empty array.
| ||||||||||
| 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
| ||||||||||
| public int | getMaximum() Returns the model's maximum.
| ||||||||||
| 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
| ||||||||||
| public int | getMinimum() Returns the model's minimum.
| ||||||||||
| 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
| ||||||||||
| 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
| ||||||||||
| public int | getValue() Returns the model's current value.
| ||||||||||
| public void | setValueIsAdjusting(boolean b) Sets the valueIsAdjusting property.
| ||||||||||
| public boolean | getValueIsAdjusting() Returns true if the value is in the process of changing as a result of actions being taken by the user.
| ||||||||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|