All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.BoundedRangeModel

public interface BoundedRangeModel

Method Index

 o addChangeListener(ChangeListener)
Adds x as a listener to changes in the model.
 o getExtent()
Returns the model's extent, the length of the inner range that begins at the model's value.
 o getMaximum()
 o getMinimum()
 o getValue()
Returns the model's value.
 o getValueIsAdjusting()
Returns the state of model.
 o removeChangeListener(ChangeListener)
Removes x as a listener to changes in the model.
 o setExtent(int)
Sets the model's extent to x.
 o setMaximum(int)
Sets the model's maximum to x.
 o setMinimum(int)
Sets the model's minimum to x.
 o setRangeProperties(int, int, int, int, boolean)
This method sets all of the model's data with a single method call.
 o setValue(int)
Sets the model's value to x.
 o setValueIsAdjusting(boolean)
This attribute indicates that any upcoming changes to the value of the model should be considered a single event.

Methods

 o getMinimum
 public abstract int getMinimum()
Returns:
the model's minimum
See Also:
setMinimum
 o setMinimum
 public abstract void setMinimum(int x)
Sets the model's minimum to x. If any of the current maximum, value, or extent are outside of the new minimum, they are adjusted.

Notifies any listeners if the model changes.

Parameters:
x - the model's new minimum
See Also:
getMinimum, addChangeListener
 o getMaximum
 public abstract int getMaximum()
Returns:
the model's maximum
See Also:
setMaximum
 o setMaximum
 public abstract void setMaximum(int x)
Sets the model's maximum to x. If any of the current minimum, value, or extent are outside of the new maximum, they are adjusted.

Notifies any listeners if the model changes.

Parameters:
x - the model's new maximum
See Also:
getMaximum, addChangeListener
 o getValue
 public abstract int getValue()
Returns the model's value. The value is always between the model's minimum and maximum, inclusive.

Returns:
the model's value
See Also:
setValue
 o setValue
 public abstract void setValue(int x)
Sets the model's value to x. If x is less than the minimum or greater than the maximum, or if it causes the extent to extend beyond the maximum, this method throws IllegalArgumentException and the value is not changed.

Notifies any listeners if the model changes.

Parameters:
x - the model's new value
Throws: IllegalArgumentException
if x is outside the legal range
See Also:
getValue
 o setValueIsAdjusting
 public abstract void setValueIsAdjusting(boolean b)
This attribute indicates that any upcoming changes to the value of the model should be considered a single event. This attribute will be set to true at the start of a range of changes to the value, and will be set to false when the value has completed changing. Normally this allows a listener to only take action when the final value change in committed, instead of having to do updates for all intermediate values.

Parameters:
b - the model's new state
See Also:
getValueIsAdjusting
 o getValueIsAdjusting
 public abstract boolean getValueIsAdjusting()
Returns the state of model. If true, the value of the model is currently in flux and further changes are expected. If false, the value of the model is most likely in a final state.

 o getExtent
 public abstract int getExtent()
Returns the model's extent, the length of the inner range that begins at the model's value. The value plus the extent must always be between the model's minimum and maximum, inclusive.

Returns:
the model's extent
See Also:
setExtent, getValue
 o setExtent
 public abstract void setExtent(int x)
Sets the model's extent to x. If x is less than zero, or if the value plus x is greater than the maximum, this method throws IllegalArgumentException and the extent is not changed.

Notifies any listeners if the model changes.

Parameters:
x - the model's new extent
Throws: IllegalArgumentException
if x is negative or causes the inner range to extend beyond the maximum
See Also:
getExtent, getValue
 o setRangeProperties
 public abstract void setRangeProperties(int newValue,
                                         int newExtent,
                                         int newMin,
                                         int newMax,
                                         boolean isAdjusting)
This method sets all of the model's data with a single method call. The method results in a single change event being generated. This is convient when you need to ajust all the model data simulaneously and do not want individual change events to occur.

 o addChangeListener
 public abstract void addChangeListener(ChangeListener x)
Adds x as a listener to changes in the model.

 o removeChangeListener
 public abstract void removeChangeListener(ChangeListener x)
Removes x as a listener to changes in the model.


All Packages  Class Hierarchy  This Package  Previous  Next  Index