2362N/A * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. 1822N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1822N/A * This code is free software; you can redistribute it and/or modify it 1822N/A * under the terms of the GNU General Public License version 2 only, as 1822N/A * published by the Free Software Foundation. Oracle designates this 1822N/A * particular file as subject to the "Classpath" exception as provided 1822N/A * by Oracle in the LICENSE file that accompanied this code. 1822N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1822N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1822N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1822N/A * version 2 for more details (a copy is included in the LICENSE file that 1822N/A * You should have received a copy of the GNU General Public License version 1822N/A * 2 along with this work; if not, write to the Free Software Foundation, 2362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1822N/A * or visit www.oracle.com if you need additional information or have any 1822N/A * The <code>Scrollbar</code> class embodies a scroll bar, a 1822N/A * familiar user-interface object. A scroll bar provides a 1822N/A * convenient means for allowing a user to select from a 1822N/A * range of values. The following three vertical 1822N/A * scroll bars could be used as slider controls to pick 1822N/A * the red, green, and blue components of a color: 1822N/A * ALIGN=center HSPACE=10 VSPACE=7> 1822N/A * Each scroll bar in this example could be created with 1822N/A * code similar to the following: 1822N/A * redSlider=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255); 1822N/A * Alternatively, a scroll bar can represent a range of values. For 1822N/A * example, if a scroll bar is used for scrolling through text, the 1822N/A * width of the "bubble" (also called the "thumb" or "scroll box") 1822N/A * can be used to represent the amount of text that is visible. 1822N/A * Here is an example of a scroll bar that represents a range: 1822N/A * alt="Image shows horizontal slider with starting range of 0 and ending range of 300. The slider thumb is labeled 60." 1822N/A * ALIGN=center HSPACE=10 VSPACE=7> 1822N/A * The value range represented by the bubble in this example 1822N/A * is the <em>visible amount</em>. The horizontal scroll bar 1822N/A * in this example could be created with code like the following: 1822N/A * ranger = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300); 1822N/A * Note that the actual maximum value of the scroll bar is the 1822N/A * <code>maximum</code> minus the <code>visible amount</code>. 1822N/A * In the previous example, because the <code>maximum</code> is 1822N/A * 300 and the <code>visible amount</code> is 60, the actual maximum 1822N/A * value is 240. The range of the scrollbar track is 0 - 300. 1822N/A * The left side of the bubble indicates the value of the 1822N/A * Normally, the user changes the value of the scroll bar by 1822N/A * making a gesture with the mouse. For example, the user can 1822N/A * drag the scroll bar's bubble up and down, or click in the 1822N/A * scroll bar's unit increment or block increment areas. Keyboard 1822N/A * gestures can also be mapped to the scroll bar. By convention, 1822N/A * the <b>Page Up</b> and <b>Page Down</b> 1822N/A * keys are equivalent to clicking in the scroll bar's block 1822N/A * increment and block decrement areas. 1822N/A * When the user changes the value of the scroll bar, the scroll bar 1822N/A * receives an instance of <code>AdjustmentEvent</code>. 1822N/A * The scroll bar processes this event, passing it along to 1822N/A * any registered listeners. 1822N/A * Any object that wishes to be notified of changes to the 1822N/A * scroll bar's value should implement 1822N/A * <code>AdjustmentListener</code>, an interface defined in 1822N/A * the package <code>java.awt.event</code>. 1822N/A * Listeners can be added and removed dynamically by calling 1822N/A * the methods <code>addAdjustmentListener</code> and 1822N/A * <code>removeAdjustmentListener</code>. 1822N/A * The <code>AdjustmentEvent</code> class defines five types 1822N/A * of adjustment event, listed here: 1822N/A * <li><code>AdjustmentEvent.TRACK</code> is sent out when the 1822N/A * user drags the scroll bar's bubble. 1822N/A * <li><code>AdjustmentEvent.UNIT_INCREMENT</code> is sent out 1822N/A * when the user clicks in the left arrow of a horizontal scroll 1822N/A * bar, or the top arrow of a vertical scroll bar, or makes the 1822N/A * equivalent gesture from the keyboard. 1822N/A * <li><code>AdjustmentEvent.UNIT_DECREMENT</code> is sent out 1822N/A * when the user clicks in the right arrow of a horizontal scroll 1822N/A * bar, or the bottom arrow of a vertical scroll bar, or makes the 1822N/A * equivalent gesture from the keyboard. 1822N/A * <li><code>AdjustmentEvent.BLOCK_INCREMENT</code> is sent out 1822N/A * when the user clicks in the track, to the left of the bubble * on a horizontal scroll bar, or above the bubble on a vertical * scroll bar. By convention, the <b>Page Up</b> * key is equivalent, if the user is using a keyboard that * defines a <b>Page Up</b> key. * <li><code>AdjustmentEvent.BLOCK_DECREMENT</code> is sent out * when the user clicks in the track, to the right of the bubble * on a horizontal scroll bar, or below the bubble on a vertical * scroll bar. By convention, the <b>Page Down</b> * key is equivalent, if the user is using a keyboard that * defines a <b>Page Down</b> key. * The JDK 1.0 event system is supported for backwards * compatibility, but its use with newer versions of the platform is * discouraged. The five types of adjustment events introduced * with JDK 1.1 correspond to the five event types * that are associated with scroll bars in previous platform versions. * The following list gives the adjustment event type, * and the corresponding JDK 1.0 event type it replaces. * <li><code>AdjustmentEvent.TRACK</code> replaces * <code>Event.SCROLL_ABSOLUTE</code> * <li><code>AdjustmentEvent.UNIT_INCREMENT</code> replaces * <code>Event.SCROLL_LINE_UP</code> * <li><code>AdjustmentEvent.UNIT_DECREMENT</code> replaces * <code>Event.SCROLL_LINE_DOWN</code> * <li><code>AdjustmentEvent.BLOCK_INCREMENT</code> replaces * <code>Event.SCROLL_PAGE_UP</code> * <li><code>AdjustmentEvent.BLOCK_DECREMENT</code> replaces * <code>Event.SCROLL_PAGE_DOWN</code> * <b>Note</b>: We recommend using a <code>Scrollbar</code> * for value selection only. If you want to implement * a scrollable component inside a container, we recommend you use * a {@link ScrollPane ScrollPane}. If you use a * <code>Scrollbar</code> for this purpose, you are likely to * encounter issues with painting, key handling, sizing and * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener * A constant that indicates a horizontal scroll bar. * A constant that indicates a vertical scroll bar. * The value of the <code>Scrollbar</code>. * This property must be greater than or equal to <code>minimum</code> * and less than or equal to * <code>maximum - visibleAmount</code> * The maximum value of the <code>Scrollbar</code>. * This value must be greater than the <code>minimum</code> * The minimum value of the <code>Scrollbar</code>. * This value must be less than the <code>maximum</code> * The size of the <code>Scrollbar</code>'s bubble. * When a scroll bar is used to select a range of values, * the visibleAmount represents the size of this range. * Depending on platform, this may be visually indicated * by the size of the bubble. * The <code>Scrollbar</code>'s orientation--being either horizontal * This value should be specified when the scrollbar is created.<BR> * orientation can be either : <code>VERTICAL</code> or * <code>HORIZONTAL</code> only. * The amount by which the scrollbar value will change when going * This value must be greater than zero. * The amount by which the scrollbar value will change when going * This value must be greater than zero. * The adjusting status of the <code>Scrollbar</code>. * True if the value is in the process of changing as a result of * actions being taken by the user. * @see #getValueIsAdjusting * @see #setValueIsAdjusting * JDK 1.1 serialVersionUID * Initialize JNI field and method IDs. private static native void initIDs();
/* ensure that the necessary native libraries are loaded */ * Constructs a new vertical scroll bar. * The default properties of the scroll bar are listed in * <table border=1 summary="Scrollbar default properties"> * <td>indicates whether the scroll bar is vertical * <td><code>Scrollbar.VERTICAL</code></td> * <td>value which controls the location * <br>of the scroll bar's bubble</td> * <td>visible amount</td> * <td>visible amount of the scroll bar's range, * <br>typically represented by the size of the * <br>scroll bar's bubble</td> * <td>minimum value of the scroll bar</td> * <td>maximum value of the scroll bar</td> * <td>unit increment</td> * <td>amount the value changes when the * <br>Line Up or Line Down key is pressed, * <br>or when the end arrows of the scrollbar * <td>block increment</td> * <td>amount the value changes when the * <br>Page Up or Page Down key is pressed, * <br>or when the scrollbar track is clicked * <br>on either side of the bubble </td> * @exception HeadlessException if GraphicsEnvironment.isHeadless() * @see java.awt.GraphicsEnvironment#isHeadless * Constructs a new scroll bar with the specified orientation. * The <code>orientation</code> argument must take one of the two * values <code>Scrollbar.HORIZONTAL</code>, * or <code>Scrollbar.VERTICAL</code>, * indicating a horizontal or vertical scroll bar, respectively. * @param orientation indicates the orientation of the scroll bar * @exception IllegalArgumentException when an illegal value for * the <code>orientation</code> argument is supplied * @exception HeadlessException if GraphicsEnvironment.isHeadless() * @see java.awt.GraphicsEnvironment#isHeadless * Constructs a new scroll bar with the specified orientation, * initial value, visible amount, and minimum and maximum values. * The <code>orientation</code> argument must take one of the two * values <code>Scrollbar.HORIZONTAL</code>, * or <code>Scrollbar.VERTICAL</code>, * indicating a horizontal or vertical scroll bar, respectively. * The parameters supplied to this constructor are subject to the * constraints described in {@link #setValues(int, int, int, int)}. * @param orientation indicates the orientation of the scroll bar. * @param value the initial value of the scroll bar * @param visible the visible amount of the scroll bar, typically * represented by the size of the bubble * @param minimum the minimum value of the scroll bar * @param maximum the maximum value of the scroll bar * @exception IllegalArgumentException when an illegal value for * the <code>orientation</code> argument is supplied * @exception HeadlessException if GraphicsEnvironment.isHeadless() * @see java.awt.GraphicsEnvironment#isHeadless * Constructs a name for this component. Called by <code>getName</code> * when the name is <code>null</code>. * Creates the <code>Scrollbar</code>'s peer. The peer allows you to modify * the appearance of the <code>Scrollbar</code> without changing any of its * Returns the orientation of this scroll bar. * @return the orientation of this scroll bar, either * <code>Scrollbar.HORIZONTAL</code> or * <code>Scrollbar.VERTICAL</code> * @see java.awt.Scrollbar#setOrientation * Sets the orientation for this scroll bar. * @param orientation the orientation of this scroll bar, either * <code>Scrollbar.HORIZONTAL</code> or * <code>Scrollbar.VERTICAL</code> * @see java.awt.Scrollbar#getOrientation * @exception IllegalArgumentException if the value supplied * for <code>orientation</code> is not a /* Create a new peer with the specified orientation. */ * Gets the current value of this scroll bar. * @return the current value of this scroll bar * @see java.awt.Scrollbar#getMinimum * @see java.awt.Scrollbar#getMaximum * Sets the value of this scroll bar to the specified value. * If the value supplied is less than the current <code>minimum</code> * or greater than the current <code>maximum - visibleAmount</code>, * then either <code>minimum</code> or <code>maximum - visibleAmount</code> * is substituted, as appropriate. * Normally, a program should change a scroll bar's * value only by calling <code>setValues</code>. * The <code>setValues</code> method simultaneously * and synchronously sets the minimum, maximum, visible amount, * and value properties of a scroll bar, so that they are * Calling this method does not fire an * <code>AdjustmentEvent</code>. * @param newValue the new value of the scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#getValue * @see java.awt.Scrollbar#getMinimum * @see java.awt.Scrollbar#getMaximum // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. * Gets the minimum value of this scroll bar. * @return the minimum value of this scroll bar * @see java.awt.Scrollbar#getValue * @see java.awt.Scrollbar#getMaximum * Sets the minimum value of this scroll bar. * When <code>setMinimum</code> is called, the minimum value * is changed, and other values (including the maximum, the * visible amount, and the current scroll bar value) * are changed to be consistent with the new minimum. * Normally, a program should change a scroll bar's minimum * value only by calling <code>setValues</code>. * The <code>setValues</code> method simultaneously * and synchronously sets the minimum, maximum, visible amount, * and value properties of a scroll bar, so that they are * Note that setting the minimum value to <code>Integer.MAX_VALUE</code> * will result in the new minimum value being set to * <code>Integer.MAX_VALUE - 1</code>. * @param newMinimum the new minimum value for this scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMaximum // No checks are necessary in this method since minimum is // the first variable checked in the setValues function. // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. * Gets the maximum value of this scroll bar. * @return the maximum value of this scroll bar * @see java.awt.Scrollbar#getValue * @see java.awt.Scrollbar#getMinimum * Sets the maximum value of this scroll bar. * When <code>setMaximum</code> is called, the maximum value * is changed, and other values (including the minimum, the * visible amount, and the current scroll bar value) * are changed to be consistent with the new maximum. * Normally, a program should change a scroll bar's maximum * value only by calling <code>setValues</code>. * The <code>setValues</code> method simultaneously * and synchronously sets the minimum, maximum, visible amount, * and value properties of a scroll bar, so that they are * Note that setting the maximum value to <code>Integer.MIN_VALUE</code> * will result in the new maximum value being set to * <code>Integer.MIN_VALUE + 1</code>. * @param newMaximum the new maximum value * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMinimum // minimum is checked first in setValues, so we need to // enforce minimum and maximum checks here. // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. * Gets the visible amount of this scroll bar. * When a scroll bar is used to select a range of values, * the visible amount is used to represent the range of values * that are currently visible. The size of the scroll bar's * bubble (also called a thumb or scroll box), usually gives a * visual representation of the relationship of the visible * amount to the range of the scroll bar. * Note that depending on platform, the value of the visible amount property * may not be visually indicated by the size of the bubble. * The scroll bar's bubble may not be displayed when it is not * moveable (e.g. when it takes up the entire length of the * scroll bar's track, or when the scroll bar is disabled). * Whether the bubble is displayed or not will not affect * the value returned by <code>getVisibleAmount</code>. * @return the visible amount of this scroll bar * @see java.awt.Scrollbar#setVisibleAmount * @deprecated As of JDK version 1.1, * replaced by <code>getVisibleAmount()</code>. * Sets the visible amount of this scroll bar. * When a scroll bar is used to select a range of values, * the visible amount is used to represent the range of values * that are currently visible. The size of the scroll bar's * bubble (also called a thumb or scroll box), usually gives a * visual representation of the relationship of the visible * amount to the range of the scroll bar. * Note that depending on platform, the value of the visible amount property * may not be visually indicated by the size of the bubble. * The scroll bar's bubble may not be displayed when it is not * moveable (e.g. when it takes up the entire length of the * scroll bar's track, or when the scroll bar is disabled). * Whether the bubble is displayed or not will not affect * the value returned by <code>getVisibleAmount</code>. * If the visible amount supplied is less than <code>one</code> * or greater than the current <code>maximum - minimum</code>, * then either <code>one</code> or <code>maximum - minimum</code> * is substituted, as appropriate. * Normally, a program should change a scroll bar's * value only by calling <code>setValues</code>. * The <code>setValues</code> method simultaneously * and synchronously sets the minimum, maximum, visible amount, * and value properties of a scroll bar, so that they are * @param newAmount the new visible amount * @see java.awt.Scrollbar#getVisibleAmount * @see java.awt.Scrollbar#setValues // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. * Sets the unit increment for this scroll bar. * The unit increment is the value that is added or subtracted * when the user activates the unit increment area of the * scroll bar, generally through a mouse or keyboard gesture * that the scroll bar receives as an adjustment event. * The unit increment must be greater than zero. * Attepts to set the unit increment to a value lower than 1 * will result in a value of 1 being set. * @param v the amount by which to increment or decrement * @see java.awt.Scrollbar#getUnitIncrement * @deprecated As of JDK version 1.1, * replaced by <code>setUnitIncrement(int)</code>. int tmp = (v <
1) ?
1 : v;
* Gets the unit increment for this scrollbar. * The unit increment is the value that is added or subtracted * when the user activates the unit increment area of the * scroll bar, generally through a mouse or keyboard gesture * that the scroll bar receives as an adjustment event. * The unit increment must be greater than zero. * @return the unit increment of this scroll bar * @see java.awt.Scrollbar#setUnitIncrement * @deprecated As of JDK version 1.1, * replaced by <code>getUnitIncrement()</code>. * Sets the block increment for this scroll bar. * The block increment is the value that is added or subtracted * when the user activates the block increment area of the * scroll bar, generally through a mouse or keyboard gesture * that the scroll bar receives as an adjustment event. * The block increment must be greater than zero. * Attepts to set the block increment to a value lower than 1 * will result in a value of 1 being set. * @param v the amount by which to increment or decrement * @see java.awt.Scrollbar#getBlockIncrement * @deprecated As of JDK version 1.1, * replaced by <code>setBlockIncrement()</code>. int tmp = (v <
1) ?
1 : v;
* Gets the block increment of this scroll bar. * The block increment is the value that is added or subtracted * when the user activates the block increment area of the * scroll bar, generally through a mouse or keyboard gesture * that the scroll bar receives as an adjustment event. * The block increment must be greater than zero. * @return the block increment of this scroll bar * @see java.awt.Scrollbar#setBlockIncrement * @deprecated As of JDK version 1.1, * replaced by <code>getBlockIncrement()</code>. * Sets the values of four properties for this scroll bar: * <code>value</code>, <code>visibleAmount</code>, * <code>minimum</code>, and <code>maximum</code>. * If the values supplied for these properties are inconsistent * or incorrect, they will be changed to ensure consistency. * This method simultaneously and synchronously sets the values * of four scroll bar properties, assuring that the values of * these properties are mutually consistent. It enforces the * <code>maximum</code> must be greater than <code>minimum</code>, * <code>maximum - minimum</code> must not be greater * than <code>Integer.MAX_VALUE</code>, * <code>visibleAmount</code> must be greater than zero. * <code>visibleAmount</code> must not be greater than * <code>maximum - minimum</code>, * <code>value</code> must not be less than <code>minimum</code>, * and <code>value</code> must not be greater than * <code>maximum - visibleAmount</code> * Calling this method does not fire an * <code>AdjustmentEvent</code>. * @param value is the position in the current window * @param visible is the visible amount of the scroll bar * @param minimum is the minimum value of the scroll bar * @param maximum is the maximum value of the scroll bar * Returns true if the value is in the process of changing as a * result of actions being taken by the user. * @return the value of the <code>valueIsAdjusting</code> property * @see #setValueIsAdjusting * Sets the <code>valueIsAdjusting</code> property. * @param b new adjustment-in-progress status * @see #getValueIsAdjusting * Adds the specified adjustment listener to receive instances of * <code>AdjustmentEvent</code> from this scroll bar. * If l is <code>null</code>, no exception is thrown and no * >AWT Threading Issues</a> for details on AWT's threading model. * @param l the adjustment listener * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener * Removes the specified adjustment listener so that it no longer * receives instances of <code>AdjustmentEvent</code> from this scroll bar. * If l is <code>null</code>, no exception is thrown and no action * >AWT Threading Issues</a> for details on AWT's threading model. * @param l the adjustment listener * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener * Returns an array of all the adjustment listeners * registered on this scrollbar. * @return all of this scrollbar's <code>AdjustmentListener</code>s * or an empty array if no adjustment * listeners are currently registered * @see #addAdjustmentListener * @see #removeAdjustmentListener * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener * Returns an array of all the objects currently registered * as <code><em>Foo</em>Listener</code>s * upon this <code>Scrollbar</code>. * <code><em>Foo</em>Listener</code>s are registered using the * <code>add<em>Foo</em>Listener</code> method. * You can specify the <code>listenerType</code> argument * with a class literal, such as * <code><em>Foo</em>Listener.class</code>. * For example, you can query a * <code>Scrollbar</code> <code>c</code> * for its mouse listeners with the following code: * <pre>MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class));</pre> * If no such listeners exist, this method returns an empty array. * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from * <code>java.util.EventListener</code> * @return an array of all objects registered as * <code><em>Foo</em>Listener</code>s on this component, * or an empty array if no such listeners have been added * @exception ClassCastException if <code>listenerType</code> * doesn't specify a class or interface that implements * <code>java.util.EventListener</code> // REMIND: remove when filtering is done at lower level * Processes events on this scroll bar. If the event is an * instance of <code>AdjustmentEvent</code>, it invokes the * <code>processAdjustmentEvent</code> method. * Otherwise, it invokes its superclass's * <code>processEvent</code> method. * <p>Note that if the event parameter is <code>null</code> * the behavior is unspecified and may result in an * @see java.awt.event.AdjustmentEvent * @see java.awt.Scrollbar#processAdjustmentEvent * Processes adjustment events occurring on this * scrollbar by dispatching them to any registered * <code>AdjustmentListener</code> objects. * This method is not called unless adjustment events are * enabled for this component. Adjustment events are enabled * when one of the following occurs: * <li>An <code>AdjustmentListener</code> object is registered * via <code>addAdjustmentListener</code>. * <li>Adjustment events are enabled via <code>enableEvents</code>. * <p>Note that if the event parameter is <code>null</code> * the behavior is unspecified and may result in an * @param e the adjustment event * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener * @see java.awt.Scrollbar#addAdjustmentListener * @see java.awt.Component#enableEvents * Returns a string representing the state of this <code>Scrollbar</code>. * This method is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not be * @return the parameter string of this scroll bar /* Serialization support. * The scroll bar's serialized Data Version. * Writes default serializable fields to stream. Writes * a list of serializable <code>AdjustmentListeners</code> * as optional data. The non-serializable listeners are * detected and no attempt is made to serialize them. * @param s the <code>ObjectOutputStream</code> to write * @serialData <code>null</code> terminated sequence of 0 * or more pairs; the pair consists of a <code>String</code> * and an <code>Object</code>; the <code>String</code> indicates * the type of object and is one of the following: * <code>adjustmentListenerK</code> indicating an * <code>AdjustmentListener</code> object * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#adjustmentListenerK * @see #readObject(ObjectInputStream) * Reads the <code>ObjectInputStream</code> and if * it isn't <code>null</code> adds a listener to * receive adjustment events fired by the * <code>Scrollbar</code>. * Unrecognized keys or values will be ignored. * @param s the <code>ObjectInputStream</code> to read * @exception HeadlessException if * <code>GraphicsEnvironment.isHeadless</code> returns * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject(ObjectOutputStream) else // skip value for unrecognized key * Gets the <code>AccessibleContext</code> associated with this * <code>Scrollbar</code>. For scrollbars, the * <code>AccessibleContext</code> takes the form of an * <code>AccessibleAWTScrollBar</code>. A new * <code>AccessibleAWTScrollBar</code> instance is created if necessary. * @return an <code>AccessibleAWTScrollBar</code> that serves as the * <code>AccessibleContext</code> of this <code>ScrollBar</code> * This class implements accessibility support for the * <code>Scrollbar</code> class. It provides an implementation of * the Java Accessibility API appropriate to scrollbar * user-interface elements. * JDK 1.3 serialVersionUID * Get the state set of this object. * @return an instance of <code>AccessibleState</code> * containing the current state of the object * Get the role of this object. * @return an instance of <code>AccessibleRole</code> * describing the role of the object * Get the <code>AccessibleValue</code> associated with this * object. In the implementation of the Java Accessibility * API for this class, return this object, which is * responsible for implementing the * <code>AccessibleValue</code> interface on behalf of itself. * Get the accessible value of this object. * @return The current value of this object. * Set the value of this object as a Number. * @return True if the value was set. * Get the minimum accessible value of this object. * @return The minimum value of this object. * Get the maximum accessible value of this object. * @return The maximum value of this object. }
// AccessibleAWTScrollBar