jdk/src/share/classes/javax/swing/BoundedRangeModel.java
author malenkov
Wed, 07 May 2008 23:20:32 +0400
changeset 466 6acd5ec503a8
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
4935607: RFE: LTP: Should be possible to set the TRANSIENT attribute of propertiies to FALSE Summary: Add the Transient annotation and support it (JSR-273) Reviewed-by: peterz, loneid
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.swing;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import javax.swing.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Defines the data model used by components like <code>Slider</code>s
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * and <code>ProgressBar</code>s.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * Defines four interrelated integer properties: minimum, maximum, extent
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * and value.  These four integers define two nested ranges like this:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * minimum &lt;= value &lt;= value+extent &lt;= maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * The outer range is <code>minimum,maximum</code> and the inner
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * range is <code>value,value+extent</code>.  The inner range
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * must lie within the outer one, i.e. <code>value</code> must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * less than or equal to <code>maximum</code> and <code>value+extent</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * must greater than or equal to <code>minimum</code>, and <code>maximum</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * must be greater than or equal to <code>minimum</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * There are a few features of this model that one might find a little
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * surprising.  These quirks exist for the convenience of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * Swing BoundedRangeModel clients, such as <code>Slider</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * <code>ScrollBar</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *   The minimum and maximum set methods "correct" the other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *   three properties to accommodate their new value argument.  For
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *   example setting the model's minimum may change its maximum, value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *   and extent properties (in that order), to maintain the constraints
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *   specified above.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * <li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 *   The value and extent set methods "correct" their argument to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *   fit within the limits defined by the other three properties.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *   For example if <code>value == maximum</code>, <code>setExtent(10)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *   would change the extent (back) to zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * <li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 *   The four BoundedRangeModel values are defined as Java Beans properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 *   however Swing ChangeEvents are used to notify clients of changes rather
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 *   than PropertyChangeEvents. This was done to keep the overhead of monitoring
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 *   a BoundedRangeModel low. Changes are often reported at MouseDragged rates.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * For an example of specifying custom bounded range models used by sliders,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * see <a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 href="http://java.sun.com/docs/books/tutorial/uiswing/overview/anatomy.html">The Anatomy of a Swing-Based Program</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * in <em>The Java Tutorial.</em>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * @author Hans Muller
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * @see DefaultBoundedRangeModel
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
public interface BoundedRangeModel
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * Returns the minimum acceptable value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * @return the value of the minimum property
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * @see #setMinimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    int getMinimum();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * Sets the model's minimum to <I>newMinimum</I>.   The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * other three properties may be changed as well, to ensure
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * that:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * minimum &lt;= value &lt;= value+extent &lt;= maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * Notifies any listeners if the model changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * @param newMinimum the model's new minimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * @see #getMinimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * @see #addChangeListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    void setMinimum(int newMinimum);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * Returns the model's maximum.  Note that the upper
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * limit on the model's value is (maximum - extent).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * @return the value of the maximum property.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * @see #setMaximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * @see #setExtent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    int getMaximum();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * Sets the model's maximum to <I>newMaximum</I>. The other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * three properties may be changed as well, to ensure that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * minimum &lt;= value &lt;= value+extent &lt;= maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * Notifies any listeners if the model changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * @param newMaximum the model's new maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * @see #getMaximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * @see #addChangeListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    void setMaximum(int newMaximum);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * Returns the model's current value.  Note that the upper
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * limit on the model's value is <code>maximum - extent</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * and the lower limit is <code>minimum</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * @return  the model's value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * @see     #setValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    int getValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * Sets the model's current value to <code>newValue</code> if <code>newValue</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * satisfies the model's constraints. Those constraints are:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * minimum &lt;= value &lt;= value+extent &lt;= maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * Otherwise, if <code>newValue</code> is less than <code>minimum</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * it's set to <code>minimum</code>, if its greater than
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * <code>maximum</code> then it's set to <code>maximum</code>, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * if it's greater than <code>value+extent</code> then it's set to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * <code>value+extent</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * When a BoundedRange model is used with a scrollbar the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * specifies the origin of the scrollbar knob (aka the "thumb" or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * "elevator").  The value usually represents the origin of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * visible part of the object being scrolled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * Notifies any listeners if the model changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * @param newValue the model's new value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * @see #getValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    void setValue(int newValue);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * This attribute indicates that any upcoming changes to the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * of the model should be considered a single event. This attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * will be set to true at the start of a series of changes to the value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * and will be set to false when the value has finished changing.  Normally
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * this allows a listener to only take action when the final value change in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * committed, instead of having to do updates for all intermediate values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * Sliders and scrollbars use this property when a drag is underway.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * @param b true if the upcoming changes to the value property are part of a series
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    void setValueIsAdjusting(boolean b);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * Returns true if the current changes to the value property are part
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * of a series of changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     * @return the valueIsAdjustingProperty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * @see #setValueIsAdjusting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    boolean getValueIsAdjusting();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * Returns the model's extent, the length of the inner range that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * begins at the model's value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * @return  the value of the model's extent property
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * @see     #setExtent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * @see     #setValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    int getExtent();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * Sets the model's extent.  The <I>newExtent</I> is forced to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * be greater than or equal to zero and less than or equal to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * maximum - value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * When a BoundedRange model is used with a scrollbar the extent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * defines the length of the scrollbar knob (aka the "thumb" or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * "elevator").  The extent usually represents how much of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * object being scrolled is visible. When used with a slider,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * the extent determines how much the value can "jump", for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * example when the user presses PgUp or PgDn.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * Notifies any listeners if the model changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * @param  newExtent the model's new extent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * @see #getExtent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * @see #setValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    void setExtent(int newExtent);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * This method sets all of the model's data with a single method call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * The method results in a single change event being generated. This is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * convenient when you need to adjust all the model data simultaneously and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * do not want individual change events to occur.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * @param value  an int giving the current value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * @param extent an int giving the amount by which the value can "jump"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * @param min    an int giving the minimum value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     * @param max    an int giving the maximum value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * @param adjusting a boolean, true if a series of changes are in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *                    progress
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * @see #setValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * @see #setExtent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * @see #setMinimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * @see #setMaximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * @see #setValueIsAdjusting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    void setRangeProperties(int value, int extent, int min, int max, boolean adjusting);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * Adds a ChangeListener to the model's listener list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * @param x the ChangeListener to add
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * @see #removeChangeListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    void addChangeListener(ChangeListener x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * Removes a ChangeListener from the model's listener list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * @param x the ChangeListener to remove
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * @see #addChangeListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    void removeChangeListener(ChangeListener x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
}