src/java.desktop/share/classes/java/awt/Scrollbar.java

Print this page




 699      *
 700      * @param       newAmount the new visible amount
 701      * @see         java.awt.Scrollbar#getVisibleAmount
 702      * @see         java.awt.Scrollbar#setValues
 703      * @since       1.1
 704      */
 705     public void setVisibleAmount(int newAmount) {
 706         // Use setValues so that a consistent policy relating
 707         // minimum, maximum, visible amount, and value is enforced.
 708         setValues(value, newAmount, minimum, maximum);
 709     }
 710 
 711     /**
 712      * Sets the unit increment for this scroll bar.
 713      * <p>
 714      * The unit increment is the value that is added or subtracted
 715      * when the user activates the unit increment area of the
 716      * scroll bar, generally through a mouse or keyboard gesture
 717      * that the scroll bar receives as an adjustment event.
 718      * The unit increment must be greater than zero.
 719      * Attepts to set the unit increment to a value lower than 1
 720      * will result in a value of 1 being set.
 721      * <p>
 722      * In some operating systems, this property
 723      * can be ignored by the underlying controls.
 724      *
 725      * @param        v  the amount by which to increment or decrement
 726      *                         the scroll bar's value
 727      * @see          java.awt.Scrollbar#getUnitIncrement
 728      * @since        1.1
 729      */
 730     public void setUnitIncrement(int v) {
 731         setLineIncrement(v);
 732     }
 733 
 734     /**
 735      * Sets the unit increment for this scroll bar.
 736      *
 737      * @param  v the increment value
 738      *
 739      * @deprecated As of JDK version 1.1,


 777     /**
 778      * Returns the unit increment for this scrollbar.
 779      *
 780      * @return the unit increment for this scrollbar
 781      * @deprecated As of JDK version 1.1,
 782      * replaced by <code>getUnitIncrement()</code>.
 783      */
 784     @Deprecated
 785     public int getLineIncrement() {
 786         return lineIncrement;
 787     }
 788 
 789     /**
 790      * Sets the block increment for this scroll bar.
 791      * <p>
 792      * The block increment is the value that is added or subtracted
 793      * when the user activates the block increment area of the
 794      * scroll bar, generally through a mouse or keyboard gesture
 795      * that the scroll bar receives as an adjustment event.
 796      * The block increment must be greater than zero.
 797      * Attepts to set the block increment to a value lower than 1
 798      * will result in a value of 1 being set.
 799      *
 800      * @param        v  the amount by which to increment or decrement
 801      *                         the scroll bar's value
 802      * @see          java.awt.Scrollbar#getBlockIncrement
 803      * @since        1.1
 804      */
 805     public void setBlockIncrement(int v) {
 806         setPageIncrement(v);
 807     }
 808 
 809     /**
 810      * Sets the block increment for this scroll bar.
 811      *
 812      * @param  v the block increment
 813      * @deprecated As of JDK version 1.1,
 814      * replaced by <code>setBlockIncrement()</code>.
 815      */
 816     @Deprecated
 817     public synchronized void setPageIncrement(int v) {




 699      *
 700      * @param       newAmount the new visible amount
 701      * @see         java.awt.Scrollbar#getVisibleAmount
 702      * @see         java.awt.Scrollbar#setValues
 703      * @since       1.1
 704      */
 705     public void setVisibleAmount(int newAmount) {
 706         // Use setValues so that a consistent policy relating
 707         // minimum, maximum, visible amount, and value is enforced.
 708         setValues(value, newAmount, minimum, maximum);
 709     }
 710 
 711     /**
 712      * Sets the unit increment for this scroll bar.
 713      * <p>
 714      * The unit increment is the value that is added or subtracted
 715      * when the user activates the unit increment area of the
 716      * scroll bar, generally through a mouse or keyboard gesture
 717      * that the scroll bar receives as an adjustment event.
 718      * The unit increment must be greater than zero.
 719      * Attempts to set the unit increment to a value lower than 1
 720      * will result in a value of 1 being set.
 721      * <p>
 722      * In some operating systems, this property
 723      * can be ignored by the underlying controls.
 724      *
 725      * @param        v  the amount by which to increment or decrement
 726      *                         the scroll bar's value
 727      * @see          java.awt.Scrollbar#getUnitIncrement
 728      * @since        1.1
 729      */
 730     public void setUnitIncrement(int v) {
 731         setLineIncrement(v);
 732     }
 733 
 734     /**
 735      * Sets the unit increment for this scroll bar.
 736      *
 737      * @param  v the increment value
 738      *
 739      * @deprecated As of JDK version 1.1,


 777     /**
 778      * Returns the unit increment for this scrollbar.
 779      *
 780      * @return the unit increment for this scrollbar
 781      * @deprecated As of JDK version 1.1,
 782      * replaced by <code>getUnitIncrement()</code>.
 783      */
 784     @Deprecated
 785     public int getLineIncrement() {
 786         return lineIncrement;
 787     }
 788 
 789     /**
 790      * Sets the block increment for this scroll bar.
 791      * <p>
 792      * The block increment is the value that is added or subtracted
 793      * when the user activates the block increment area of the
 794      * scroll bar, generally through a mouse or keyboard gesture
 795      * that the scroll bar receives as an adjustment event.
 796      * The block increment must be greater than zero.
 797      * Attempts to set the block increment to a value lower than 1
 798      * will result in a value of 1 being set.
 799      *
 800      * @param        v  the amount by which to increment or decrement
 801      *                         the scroll bar's value
 802      * @see          java.awt.Scrollbar#getBlockIncrement
 803      * @since        1.1
 804      */
 805     public void setBlockIncrement(int v) {
 806         setPageIncrement(v);
 807     }
 808 
 809     /**
 810      * Sets the block increment for this scroll bar.
 811      *
 812      * @param  v the block increment
 813      * @deprecated As of JDK version 1.1,
 814      * replaced by <code>setBlockIncrement()</code>.
 815      */
 816     @Deprecated
 817     public synchronized void setPageIncrement(int v) {