54 * and extent properties (in that order), to maintain the constraints 55 * specified above. 56 * 57 * <li> 58 * The value and extent set methods "correct" their argument to 59 * fit within the limits defined by the other three properties. 60 * For example if <code>value == maximum</code>, <code>setExtent(10)</code> 61 * would change the extent (back) to zero. 62 * 63 * <li> 64 * The four BoundedRangeModel values are defined as Java Beans properties 65 * however Swing ChangeEvents are used to notify clients of changes rather 66 * than PropertyChangeEvents. This was done to keep the overhead of monitoring 67 * a BoundedRangeModel low. Changes are often reported at MouseDragged rates. 68 * </ul> 69 * 70 * <p> 71 * 72 * For an example of specifying custom bounded range models used by sliders, 73 * see <a 74 href="http://java.sun.com/docs/books/tutorial/uiswing/overview/anatomy.html">The Anatomy of a Swing-Based Program</a> 75 * in <em>The Java Tutorial.</em> 76 * 77 * @author Hans Muller 78 * @see DefaultBoundedRangeModel 79 */ 80 public interface BoundedRangeModel 81 { 82 /** 83 * Returns the minimum acceptable value. 84 * 85 * @return the value of the minimum property 86 * @see #setMinimum 87 */ 88 int getMinimum(); 89 90 91 /** 92 * Sets the model's minimum to <I>newMinimum</I>. The 93 * other three properties may be changed as well, to ensure 94 * that: 95 * <pre> | 54 * and extent properties (in that order), to maintain the constraints 55 * specified above. 56 * 57 * <li> 58 * The value and extent set methods "correct" their argument to 59 * fit within the limits defined by the other three properties. 60 * For example if <code>value == maximum</code>, <code>setExtent(10)</code> 61 * would change the extent (back) to zero. 62 * 63 * <li> 64 * The four BoundedRangeModel values are defined as Java Beans properties 65 * however Swing ChangeEvents are used to notify clients of changes rather 66 * than PropertyChangeEvents. This was done to keep the overhead of monitoring 67 * a BoundedRangeModel low. Changes are often reported at MouseDragged rates. 68 * </ul> 69 * 70 * <p> 71 * 72 * For an example of specifying custom bounded range models used by sliders, 73 * see <a 74 href="http://www.oracle.com/technetwork/java/architecture-142923.html#separable">Separable model architecture</a> 75 * in <em>A Swing Architecture Overview.</em> 76 * 77 * @author Hans Muller 78 * @see DefaultBoundedRangeModel 79 */ 80 public interface BoundedRangeModel 81 { 82 /** 83 * Returns the minimum acceptable value. 84 * 85 * @return the value of the minimum property 86 * @see #setMinimum 87 */ 88 int getMinimum(); 89 90 91 /** 92 * Sets the model's minimum to <I>newMinimum</I>. The 93 * other three properties may be changed as well, to ensure 94 * that: 95 * <pre> |