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 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 setValue(int)
Sets the model's value to x.

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 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 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