JSlider.java revision 343
0N/A * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * A component that lets the user graphically select a value by sliding 0N/A * a knob within a bounded interval. 0N/A * The slider can show both 0N/A * major tick marks, and minor tick marks between the major ones. The number of 0N/A * values between the tick marks is controlled with 0N/A * <code>setMajorTickSpacing</code> and <code>setMinorTickSpacing</code>. 0N/A * Painting of tick marks is controlled by {@code setPaintTicks}. 0N/A * Sliders can also print text labels at regular intervals (or at 0N/A * arbitrary locations) along the slider track. Painting of labels is 0N/A * controlled by {@code setLabelTable} and {@code setPaintLabels}. 0N/A * For further information and examples see 0N/A * a section in <em>The Java Tutorial.</em> 0N/A * <strong>Warning:</strong> Swing is not thread safe. For more 0N/A * information see <a 0N/A * <strong>Warning:</strong> 0N/A * Serialized objects of this class will not be compatible with 0N/A * future Swing releases. The current serialization support is 0N/A * appropriate for short term storage or RMI between applications running 0N/A * the same version of Swing. As of 1.4, support for long term storage 0N/A * of all JavaBeans<sup><font size="-2">TM</font></sup> 0N/A * has been added to the <code>java.beans</code> package. 0N/A * attribute: isContainer false 0N/A * description: A component that supports selecting a integer value from a range. 0N/A * @author David Kloba 0N/A * @see #getUIClassID 0N/A * The data model that handles the numeric maximum value, 0N/A * minimum value, and current-position value for the slider. 0N/A * The number of values between the major tick marks -- the 0N/A * larger marks that break up the minor tick marks. 0N/A * The number of values between the minor tick marks -- the 0N/A * smaller marks that occur between the major tick marks. 0N/A * @see #setMinorTickSpacing 0N/A * If true, the knob (and the data value it represents) 0N/A * resolve to the closest tick mark next to where the user 0N/A * positioned the knob. The default is false. 0N/A * @see #setSnapToTicks 0N/A * If true, the knob (and the data value it represents) 0N/A * resolve to the closest slider value next to where the user 0N/A * positioned the knob. 0N/A * Whether the slider is horizontal or vertical 0N/A * The default is horizontal. 0N/A * @see #setOrientation 0N/A * {@code Dictionary} of what labels to draw at which values 0N/A * The changeListener (no suffix) is the listener we add to the 0N/A * slider's model. This listener is initialized to the 0N/A * {@code ChangeListener} returned from {@code createChangeListener}, 0N/A * which by default just forwards events 0N/A * to {@code ChangeListener}s (if any) added directly to the slider. 0N/A * @see #addChangeListener 0N/A * @see #createChangeListener 0N/A * Only one <code>ChangeEvent</code> is needed per slider instance since the 0N/A * event's only (read-only) state is the source property. The source 0N/A * of events generated here is always "this". The event is lazily 0N/A * created the first time that an event notification is fired. 0N/A * @see #fireStateChanged 0N/A * Creates a horizontal slider with the range 0 to 100 and 0N/A * an initial value of 50. 0N/A * Creates a slider using the specified orientation with the 0N/A * range {@code 0} to {@code 100} and an initial value of {@code 50}. 0N/A * The orientation can be 0N/A * either <code>SwingConstants.VERTICAL</code> or 0N/A * <code>SwingConstants.HORIZONTAL</code>. 0N/A * @param orientation the orientation of the slider 0N/A * @throws IllegalArgumentException if orientation is not one of {@code VERTICAL}, {@code HORIZONTAL} 0N/A * @see #setOrientation 0N/A * Creates a horizontal slider using the specified min and max 0N/A * with an initial value equal to the average of the min plus max. 0N/A * The <code>BoundedRangeModel</code> that holds the slider's data 0N/A * handles any issues that may arise from improperly setting the 0N/A * minimum and maximum values on the slider. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * @param min the minimum value of the slider 0N/A * @param max the maximum value of the slider 0N/A * @see BoundedRangeModel 0N/A * Creates a horizontal slider using the specified min, max and value. 0N/A * The <code>BoundedRangeModel</code> that holds the slider's data 0N/A * handles any issues that may arise from improperly setting the 0N/A * minimum, initial, and maximum values on the slider. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * @param min the minimum value of the slider 0N/A * @param max the maximum value of the slider 0N/A * @param value the initial value of the slider 0N/A * @see BoundedRangeModel 0N/A * Creates a slider with the specified orientation and the 0N/A * specified minimum, maximum, and initial values. 0N/A * The orientation can be 0N/A * either <code>SwingConstants.VERTICAL</code> or 0N/A * <code>SwingConstants.HORIZONTAL</code>. 0N/A * The <code>BoundedRangeModel</code> that holds the slider's data 0N/A * handles any issues that may arise from improperly setting the 0N/A * minimum, initial, and maximum values on the slider. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * @param orientation the orientation of the slider 0N/A * @param min the minimum value of the slider 0N/A * @param max the maximum value of the slider 0N/A * @param value the initial value of the slider 0N/A * @throws IllegalArgumentException if orientation is not one of {@code VERTICAL}, {@code HORIZONTAL} 0N/A * @see BoundedRangeModel 0N/A * @see #setOrientation 0N/A * Creates a horizontal slider using the specified 0N/A * BoundedRangeModel. 0N/A * Gets the UI object which implements the L&F for this component. 0N/A * @return the SliderUI object that implements the Slider L&F 0N/A * Sets the UI object which implements the L&F for this component. 0N/A * @param ui the SliderUI L&F object 0N/A * @see UIDefaults#getUI 0N/A * attribute: visualUpdate true 0N/A * description: The UI object that implements the slider's LookAndFeel. 0N/A * Resets the UI property to a value from the current look and feel. 0N/A * @see JComponent#updateUI 0N/A // The labels preferred size may be derived from the font 0N/A // of the slider, so we must update the UI of the slider first, then 0N/A // that of labels. This way when setSize is called the right 0N/A * Returns the name of the L&F class that renders this component. 0N/A * @return "SliderUI" 0N/A * @see JComponent#getUIClassID 0N/A * @see UIDefaults#getUI 0N/A * We pass Change events along to the listeners with the 0N/A * the slider (instead of the model itself) as the event source. 0N/A * Subclasses that want to handle {@code ChangeEvent}s 0N/A * from the model differently 0N/A * can override this to return 0N/A * an instance of a custom <code>ChangeListener</code> implementation. 0N/A * The default {@code ChangeListener} simply calls the 0N/A * {@code fireStateChanged} method to forward {@code ChangeEvent}s 0N/A * to the {@code ChangeListener}s that have been added directly to the 0N/A * @see #changeListener 0N/A * @see #fireStateChanged 0N/A * @see javax.swing.event.ChangeListener 0N/A * @see javax.swing.BoundedRangeModel 0N/A * Adds a ChangeListener to the slider. 0N/A * @param l the ChangeListener to add 0N/A * @see #fireStateChanged 0N/A * @see #removeChangeListener 0N/A * Removes a ChangeListener from the slider. 0N/A * @param l the ChangeListener to remove 0N/A * @see #fireStateChanged 0N/A * @see #addChangeListener 0N/A * Returns an array of all the <code>ChangeListener</code>s added 0N/A * to this JSlider with addChangeListener(). 0N/A * @return all of the <code>ChangeListener</code>s added or an empty 0N/A * array if no listeners have been added 0N/A * Send a {@code ChangeEvent}, whose source is this {@code JSlider}, to 0N/A * all {@code ChangeListener}s that have registered interest in 0N/A * {@code ChangeEvent}s. 0N/A * This method is called each time a {@code ChangeEvent} is received from 0N/A * The event instance is created if necessary, and stored in 0N/A * {@code changeEvent}. 0N/A * @see #addChangeListener 0N/A * @see EventListenerList 0N/A * Returns the {@code BoundedRangeModel} that handles the slider's three 0N/A * fundamental properties: minimum, maximum, value. 0N/A * @return the data model for this component 0N/A * @see BoundedRangeModel 0N/A * Sets the {@code BoundedRangeModel} that handles the slider's three 0N/A * fundamental properties: minimum, maximum, value. 0N/A * Attempts to pass a {@code null} model to this method result in 0N/A * undefined behavior, and, most likely, exceptions. 0N/A * @param newModel the new, {@code non-null} <code>BoundedRangeModel</code> to use 0N/A * @see BoundedRangeModel 0N/A * description: The sliders BoundedRangeModel. 0N/A * Returns the slider's current value 0N/A * from the {@code BoundedRangeModel}. 0N/A * @return the current value of the slider 0N/A * @see BoundedRangeModel#getValue 0N/A * Sets the slider's current value to {@code n}. This method 0N/A * forwards the new value to the model. 0N/A * The data model (an instance of {@code BoundedRangeModel}) 0N/A * handles any mathematical 0N/A * issues arising from assigning faulty values. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * If the new value is different from the previous value, 0N/A * all change listeners are notified. 0N/A * @param n the new value 0N/A * @see #addChangeListener 0N/A * @see BoundedRangeModel#setValue 0N/A * description: The sliders current value. 0N/A * Returns the minimum value supported by the slider 0N/A * from the <code>BoundedRangeModel</code>. 0N/A * @return the value of the model's minimum property 0N/A * @see BoundedRangeModel#getMinimum 0N/A * Sets the slider's minimum value to {@code minimum}. This method 0N/A * forwards the new minimum value to the model. 0N/A * The data model (an instance of {@code BoundedRangeModel}) 0N/A * handles any mathematical 0N/A * issues arising from assigning faulty values. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * If the new minimum value is different from the previous minimum value, 0N/A * all change listeners are notified. 0N/A * @param minimum the new minimum 0N/A * @see #addChangeListener 0N/A * @see BoundedRangeModel#setMinimum 0N/A * description: The sliders minimum value. 0N/A * Returns the maximum value supported by the slider 0N/A * from the <code>BoundedRangeModel</code>. 0N/A * @return the value of the model's maximum property 0N/A * @see BoundedRangeModel#getMaximum 0N/A * Sets the slider's maximum value to {@code maximum}. This method 0N/A * forwards the new maximum value to the model. 0N/A * The data model (an instance of {@code BoundedRangeModel}) 0N/A * handles any mathematical 0N/A * issues arising from assigning faulty values. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * If the new maximum value is different from the previous maximum value, 0N/A * all change listeners are notified. 0N/A * @param maximum the new maximum 0N/A * @see #addChangeListener 0N/A * @see BoundedRangeModel#setMaximum 0N/A * description: The sliders maximum value. 0N/A * Returns the {@code valueIsAdjusting} property from the model. For 0N/A * details on how this is used, see the {@code setValueIsAdjusting} 0N/A * @return the value of the model's {@code valueIsAdjusting} property 0N/A * @see #setValueIsAdjusting 0N/A * Sets the model's {@code valueIsAdjusting} property. Slider look and 0N/A * feel implementations should set this property to {@code true} when 0N/A * a knob drag begins, and to {@code false} when the drag ends. The 0N/A * slider model will not generate {@code ChangeEvent}s while 0N/A * {@code valueIsAdjusting} is {@code true}. 0N/A * @param b the new value for the {@code valueIsAdjusting} property 0N/A * @see #getValueIsAdjusting 0N/A * @see BoundedRangeModel#setValueIsAdjusting 0N/A * description: True if the slider knob is being dragged. 0N/A * Returns the "extent" from the <code>BoundedRangeModel</code>. 0N/A * This respresents the range of values "covered" by the knob. 0N/A * @return an int representing the extent 0N/A * @see BoundedRangeModel#getExtent 0N/A * Sets the size of the range "covered" by the knob. Most look 0N/A * and feel implementations will change the value by this amount 0N/A * if the user clicks on either side of the knob. This method just 0N/A * forwards the new extent value to the model. 0N/A * The data model (an instance of {@code BoundedRangeModel}) 0N/A * handles any mathematical 0N/A * issues arising from assigning faulty values. See the 0N/A * {@code BoundedRangeModel} documentation for details. 0N/A * If the new extent value is different from the previous extent value, 0N/A * all change listeners are notified. 0N/A * @param extent the new extent 0N/A * @see BoundedRangeModel#setExtent 0N/A * description: Size of the range covered by the knob. 0N/A * Return this slider's vertical or horizontal orientation. 0N/A * @return {@code SwingConstants.VERTICAL} or 0N/A * {@code SwingConstants.HORIZONTAL} 0N/A * @see #setOrientation 0N/A * Set the slider's orientation to either {@code SwingConstants.VERTICAL} or 0N/A * {@code SwingConstants.HORIZONTAL}. 0N/A * @param orientation {@code HORIZONTAL} or {@code VERTICAL} 0N/A * @throws IllegalArgumentException if orientation is not one of {@code VERTICAL}, {@code HORIZONTAL} 0N/A * @see #getOrientation 0N/A * attribute: visualUpdate true 0N/A * description: Set the scrollbars orientation to either VERTICAL or HORIZONTAL. 0N/A * enum: VERTICAL JSlider.VERTICAL 0N/A * HORIZONTAL JSlider.HORIZONTAL 343N/A // Check that there is a label with such image 0N/A * Returns the dictionary of what labels to draw at which values. 0N/A * @return the <code>Dictionary</code> containing labels and 0N/A * where to draw them 0N/A if ( labelTable == null && getMajorTickSpacing() > 0 ) { 0N/A setLabelTable( createStandardLabels( getMajorTickSpacing() ) ); 0N/A * Used to specify what label will be drawn at any given value. 0N/A * The key-value pairs are of this format: 0N/A * <code>{ Integer value, java.swing.JComponent label }</code>. 0N/A * An easy way to generate a standard table of value labels is by using the 0N/A * {@code createStandardLabels} method. 0N/A * Once the labels have been set, this method calls {@link #updateLabelUIs}. 0N/A * Note that the labels are only painted if the {@code paintLabels} 0N/A * property is {@code true}. 0N/A * @param labels new {@code Dictionary} of labels, or {@code null} to 0N/A * @see #createStandardLabels(int) 0N/A * @see #getLabelTable 0N/A * @see #setPaintLabels 0N/A * attribute: visualUpdate true 0N/A * description: Specifies what labels will be drawn for any given value. 0N/A * Updates the UIs for the labels in the label table by calling 0N/A * {@code updateUI} on each label. The UIs are updated from 0N/A * the current look and feel. The labels are also set to their 0N/A * @see #setLabelTable 0N/A * @see JComponent#updateUI 0N/A * Creates a {@code Hashtable} of numerical text labels, starting at the 0N/A * slider minimum, and using the increment specified. 0N/A * For example, if you call <code>createStandardLabels( 10 )</code> 0N/A * and the slider minimum is zero, 0N/A * then labels will be created for the values 0, 10, 20, 30, and so on. 0N/A * For the labels to be drawn on the slider, the returned {@code Hashtable} 0N/A * must be passed into {@code setLabelTable}, and {@code setPaintLabels} 0N/A * must be set to {@code true}. 0N/A * For further details on the makeup of the returned {@code Hashtable}, see 0N/A * the {@code setLabelTable} documentation. 0N/A * @param increment distance between labels in the generated hashtable 0N/A * @return a new {@code Hashtable} of labels 0N/A * @see #setLabelTable 0N/A * @see #setPaintLabels 0N/A * @throws IllegalArgumentException if {@code increment} is less than or 0N/A * Creates a {@code Hashtable} of numerical text labels, starting at the 0N/A * starting point specified, and using the increment specified. 0N/A * For example, if you call 0N/A * <code>createStandardLabels( 10, 2 )</code>, 0N/A * then labels will be created for the values 2, 12, 22, 32, and so on. 0N/A * For the labels to be drawn on the slider, the returned {@code Hashtable} 0N/A * must be passed into {@code setLabelTable}, and {@code setPaintLabels} 0N/A * must be set to {@code true}. 0N/A * For further details on the makeup of the returned {@code Hashtable}, see 0N/A * the {@code setLabelTable} documentation. 0N/A * @param increment distance between labels in the generated hashtable 0N/A * @param start value at which the labels will begin 0N/A * @return a new {@code Hashtable} of labels 0N/A * @see #setLabelTable 0N/A * @see #setPaintLabels 0N/A * @exception IllegalArgumentException if {@code start} is 0N/A * out of range, or if {@code increment} is less than or equal 0N/A // Save the labels that were added by the developer 0N/A // Add the saved labels 0N/A * Returns true if the value-range shown for the slider is reversed, 0N/A * @return true if the slider values are reversed from their normal order 0N/A * Specify true to reverse the value-range shown for the slider and false to 0N/A * put the value range in the normal order. The order depends on the 0N/A * slider's <code>ComponentOrientation</code> property. Normal (non-inverted) 0N/A * horizontal sliders with a <code>ComponentOrientation</code> value of 0N/A * <code>LEFT_TO_RIGHT</code> have their maximum on the right. 0N/A * Normal horizontal sliders with a <code>ComponentOrientation</code> value of 0N/A * <code>RIGHT_TO_LEFT</code> have their maximum on the left. Normal vertical 0N/A * sliders have their maximum on the top. These labels are reversed when the 0N/A * slider is inverted. 0N/A * By default, the value of this property is {@code false}. 0N/A * @param b true to reverse the slider values from their normal order 0N/A * attribute: visualUpdate true 0N/A * description: If true reverses the slider values from their normal order 0N/A * This method returns the major tick spacing. The number that is returned 0N/A * represents the distance, measured in values, between each major tick mark. 0N/A * If you have a slider with a range from 0 to 50 and the major tick spacing 0N/A * is set to 10, you will get major ticks next to the following values: 0N/A * 0, 10, 20, 30, 40, 50. 0N/A * @return the number of values between major ticks 0N/A * @see #setMajorTickSpacing 0N/A * This method sets the major tick spacing. The number that is passed in 0N/A * represents the distance, measured in values, between each major tick mark. 0N/A * If you have a slider with a range from 0 to 50 and the major tick spacing 0N/A * is set to 10, you will get major ticks next to the following values: 0N/A * 0, 10, 20, 30, 40, 50. 0N/A * In order for major ticks to be painted, {@code setPaintTicks} must be 0N/A * set to {@code true}. 0N/A * This method will also set up a label table for you. 0N/A * If there is not already a label table, and the major tick spacing is 0N/A * {@code > 0}, and {@code getPaintLabels} returns 0N/A * {@code true}, a standard label table will be generated (by calling 0N/A * {@code createStandardLabels}) with labels at the major tick marks. 0N/A * For the example above, you would get text labels: "0", 0N/A * "10", "20", "30", "40", "50". 0N/A * The label table is then set on the slider by calling 0N/A * {@code setLabelTable}. 0N/A * @param n new value for the {@code majorTickSpacing} property 0N/A * @see #getMajorTickSpacing 0N/A * @see #setPaintTicks 0N/A * @see #setLabelTable 0N/A * @see #createStandardLabels(int) 0N/A * attribute: visualUpdate true 0N/A * description: Sets the number of values between major tick marks. 0N/A * This method returns the minor tick spacing. The number that is returned 0N/A * represents the distance, measured in values, between each minor tick mark. 0N/A * If you have a slider with a range from 0 to 50 and the minor tick spacing 0N/A * is set to 10, you will get minor ticks next to the following values: 0N/A * 0, 10, 20, 30, 40, 50. 0N/A * @return the number of values between minor ticks 0N/A * @see #getMinorTickSpacing 0N/A * This method sets the minor tick spacing. The number that is passed in 0N/A * represents the distance, measured in values, between each minor tick mark. 0N/A * If you have a slider with a range from 0 to 50 and the minor tick spacing 0N/A * is set to 10, you will get minor ticks next to the following values: 0N/A * 0, 10, 20, 30, 40, 50. 0N/A * In order for minor ticks to be painted, {@code setPaintTicks} must be 0N/A * set to {@code true}. 0N/A * @param n new value for the {@code minorTickSpacing} property 0N/A * @see #getMinorTickSpacing 0N/A * @see #setPaintTicks 0N/A * attribute: visualUpdate true 0N/A * description: Sets the number of values between minor tick marks. 0N/A * Returns true if the knob (and the data value it represents) 0N/A * resolve to the closest tick mark next to where the user 0N/A * positioned the knob. 0N/A * @return true if the value snaps to the nearest tick mark, else false 0N/A * @see #setSnapToTicks 0N/A * Returns true if the knob (and the data value it represents) 0N/A * resolve to the closest slider value next to where the user 0N/A * positioned the knob. 0N/A * @return true if the value snaps to the nearest slider value, else false 0N/A * @see #setSnapToValue 0N/A * Specifying true makes the knob (and the data value it represents) 0N/A * resolve to the closest tick mark next to where the user 0N/A * positioned the knob. 0N/A * By default, this property is {@code false}. 0N/A * @param b true to snap the knob to the nearest tick mark 0N/A * @see #getSnapToTicks 0N/A * description: If true snap the knob to the nearest tick mark. 0N/A * Specifying true makes the knob (and the data value it represents) 0N/A * resolve to the closest slider value next to where the user 0N/A * positioned the knob. If the {@code snapToTicks} property has also been 0N/A * set to {@code true}, the snap-to-ticks behavior will prevail. 0N/A * By default, the snapToValue property is {@code true}. 0N/A * @param b true to snap the knob to the nearest slider value 0N/A * @see #getSnapToValue 0N/A * @see #setSnapToTicks 0N/A * description: If true snap the knob to the nearest slider value. 0N/A * Tells if tick marks are to be painted. 0N/A * @return true if tick marks are painted, else false 0N/A * @see #setPaintTicks 0N/A * Determines whether tick marks are painted on the slider. 0N/A * By default, this property is {@code false}. 0N/A * @param b whether or not tick marks should be painted 0N/A * @see #getPaintTicks 0N/A * attribute: visualUpdate true 0N/A * description: If true tick marks are painted on the slider. 0N/A * Tells if the track (area the slider slides in) is to be painted. 0N/A * @return true if track is painted, else false 0N/A * @see #setPaintTrack 0N/A * Determines whether the track is painted on the slider. 0N/A * By default, this property is {@code true}. 0N/A * @param b whether or not to paint the slider track 0N/A * @see #getPaintTrack 0N/A * attribute: visualUpdate true 0N/A * description: If true, the track is painted on the slider. 0N/A * Tells if labels are to be painted. 0N/A * @return true if labels are painted, else false 0N/A * @see #setPaintLabels 0N/A * Determines whether labels are painted on the slider. 0N/A * This method will also set up a label table for you. 0N/A * If there is not already a label table, and the major tick spacing is 0N/A * a standard label table will be generated (by calling 0N/A * {@code createStandardLabels}) with labels at the major tick marks. 0N/A * The label table is then set on the slider by calling 0N/A * {@code setLabelTable}. 0N/A * By default, this property is {@code false}. 0N/A * @param b whether or not to paint labels 0N/A * @see #getPaintLabels 0N/A * @see #getLabelTable 0N/A * @see #createStandardLabels(int) 0N/A * attribute: visualUpdate true 0N/A * description: If true labels are painted on the slider. 0N/A * See readObject() and writeObject() in JComponent for more 0N/A * information about serialization in Swing. 0N/A * Returns a string representation of this JSlider. This method 0N/A * is intended to be used only for debugging purposes, and the 0N/A * content and format of the returned string may vary between 0N/A * implementations. The returned string may be empty but may not 0N/A * be <code>null</code>. 0N/A * @return a string representation of this JSlider. 0N/A "HORIZONTAL" :
"VERTICAL");
0N/A// Accessibility support 0N/A * Gets the AccessibleContext associated with this JSlider. 0N/A * For sliders, the AccessibleContext takes the form of an 0N/A * AccessibleJSlider. 0N/A * A new AccessibleJSlider instance is created if necessary. 0N/A * @return an AccessibleJSlider that serves as the 0N/A * AccessibleContext of this JSlider 0N/A * This class implements accessibility support for the 0N/A * <code>JSlider</code> class. It provides an implementation of the 0N/A * Java Accessibility API appropriate to slider user-interface elements. 0N/A * <strong>Warning:</strong> 0N/A * Serialized objects of this class will not be compatible with 0N/A * future Swing releases. The current serialization support is 0N/A * appropriate for short term storage or RMI between applications running 0N/A * the same version of Swing. As of 1.4, support for long term storage 0N/A * of all JavaBeans<sup><font size="-2">TM</font></sup> 0N/A * has been added to the <code>java.beans</code> package. 0N/A * Get the state set of this object. 0N/A * @return an instance of AccessibleState containing the current state 0N/A * @see AccessibleState 0N/A * Get the role of this object. 0N/A * @return an instance of AccessibleRole describing the role of the object 0N/A * Get the AccessibleValue associated with this object. In the 0N/A * implementation of the Java Accessibility API for this class, 0N/A * return this object, which is responsible for implementing the 0N/A * AccessibleValue interface on behalf of itself. 0N/A * @return this object 0N/A * Get the accessible value of this object. 0N/A * @return The current value of this object. 0N/A * Set the value of this object as a Number. 0N/A * @return True if the value was set. 0N/A * Get the minimum accessible value of this object. 0N/A * @return The minimum value of this object. 0N/A * Get the maximum accessible value of this object. 0N/A * @return The maximum value of this object. 0N/A }
// AccessibleJSlider