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

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:

*** 159,169 **** * positioning. * * @author Sami Shaio * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since JDK1.0 */ public class Scrollbar extends Component implements Adjustable, Accessible { /** * A constant that indicates a horizontal scroll bar. --- 159,169 ---- * positioning. * * @author Sami Shaio * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since 1.0 */ public class Scrollbar extends Component implements Adjustable, Accessible { /** * A constant that indicates a horizontal scroll bar.
*** 458,468 **** * <code>Scrollbar.VERTICAL</code> * @see java.awt.Scrollbar#getOrientation * @exception IllegalArgumentException if the value supplied * for <code>orientation</code> is not a * legal value ! * @since JDK1.1 */ public void setOrientation(int orientation) { synchronized (getTreeLock()) { if (orientation == this.orientation) { return; --- 458,468 ---- * <code>Scrollbar.VERTICAL</code> * @see java.awt.Scrollbar#getOrientation * @exception IllegalArgumentException if the value supplied * for <code>orientation</code> is not a * legal value ! * @since 1.1 */ public void setOrientation(int orientation) { synchronized (getTreeLock()) { if (orientation == this.orientation) { return;
*** 564,574 **** * <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 ! * @since JDK1.1 */ public void setMinimum(int newMinimum) { // No checks are necessary in this method since minimum is // the first variable checked in the setValues function. --- 564,574 ---- * <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 ! * @since 1.1 */ public void setMinimum(int newMinimum) { // No checks are necessary in this method since minimum is // the first variable checked in the setValues function.
*** 609,619 **** * * @param newMaximum the new maximum value * for this scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMinimum ! * @since JDK1.1 */ public void setMaximum(int newMaximum) { // minimum is checked first in setValues, so we need to // enforce minimum and maximum checks here. if (newMaximum == Integer.MIN_VALUE) { --- 609,619 ---- * * @param newMaximum the new maximum value * for this scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMinimum ! * @since 1.1 */ public void setMaximum(int newMaximum) { // minimum is checked first in setValues, so we need to // enforce minimum and maximum checks here. if (newMaximum == Integer.MIN_VALUE) {
*** 647,657 **** * 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 ! * @since JDK1.1 */ public int getVisibleAmount() { return getVisible(); } --- 647,657 ---- * 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 ! * @since 1.1 */ public int getVisibleAmount() { return getVisible(); }
*** 695,705 **** * mutually consistent. * * @param newAmount the new visible amount * @see java.awt.Scrollbar#getVisibleAmount * @see java.awt.Scrollbar#setValues ! * @since JDK1.1 */ public void setVisibleAmount(int newAmount) { // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. setValues(value, newAmount, minimum, maximum); --- 695,705 ---- * mutually consistent. * * @param newAmount the new visible amount * @see java.awt.Scrollbar#getVisibleAmount * @see java.awt.Scrollbar#setValues ! * @since 1.1 */ public void setVisibleAmount(int newAmount) { // Use setValues so that a consistent policy relating // minimum, maximum, visible amount, and value is enforced. setValues(value, newAmount, minimum, maximum);
*** 720,730 **** * can be ignored by the underlying controls. * * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getUnitIncrement ! * @since JDK1.1 */ public void setUnitIncrement(int v) { setLineIncrement(v); } --- 720,730 ---- * can be ignored by the underlying controls. * * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getUnitIncrement ! * @since 1.1 */ public void setUnitIncrement(int v) { setLineIncrement(v); }
*** 759,769 **** * In some operating systems, this property * can be ignored by the underlying controls. * * @return the unit increment of this scroll bar * @see java.awt.Scrollbar#setUnitIncrement ! * @since JDK1.1 */ public int getUnitIncrement() { return getLineIncrement(); } --- 759,769 ---- * In some operating systems, this property * can be ignored by the underlying controls. * * @return the unit increment of this scroll bar * @see java.awt.Scrollbar#setUnitIncrement ! * @since 1.1 */ public int getUnitIncrement() { return getLineIncrement(); }
*** 788,798 **** * will result in a value of 1 being set. * * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getBlockIncrement ! * @since JDK1.1 */ public void setBlockIncrement(int v) { setPageIncrement(v); } --- 788,798 ---- * will result in a value of 1 being set. * * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getBlockIncrement ! * @since 1.1 */ public void setBlockIncrement(int v) { setPageIncrement(v); }
*** 824,834 **** * 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 ! * @since JDK1.1 */ public int getBlockIncrement() { return getPageIncrement(); } --- 824,834 ---- * 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 ! * @since 1.1 */ public int getBlockIncrement() { return getPageIncrement(); }
*** 970,980 **** * @param l the adjustment listener * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since JDK1.1 */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } --- 970,980 ---- * @param l the adjustment listener * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since 1.1 */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; }
*** 993,1003 **** * @param l the adjustment listener * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } --- 993,1003 ---- * @param l the adjustment listener * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener ! * @since 1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l) { if (l == null) { return; }
*** 1084,1094 **** * exception. * * @param e the event * @see java.awt.event.AdjustmentEvent * @see java.awt.Scrollbar#processAdjustmentEvent ! * @since JDK1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof AdjustmentEvent) { processAdjustmentEvent((AdjustmentEvent)e); return; --- 1084,1094 ---- * exception. * * @param e the event * @see java.awt.event.AdjustmentEvent * @see java.awt.Scrollbar#processAdjustmentEvent ! * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof AdjustmentEvent) { processAdjustmentEvent((AdjustmentEvent)e); return;
*** 1116,1126 **** * @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 ! * @since JDK1.1 */ protected void processAdjustmentEvent(AdjustmentEvent e) { AdjustmentListener listener = adjustmentListener; if (listener != null) { listener.adjustmentValueChanged(e); --- 1116,1126 ---- * @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 ! * @since 1.1 */ protected void processAdjustmentEvent(AdjustmentEvent e) { AdjustmentListener listener = adjustmentListener; if (listener != null) { listener.adjustmentValueChanged(e);