< prev index next >
src/java.desktop/share/classes/java/awt/ScrollPane.java
Print this page
*** 45,56 ****
* <LI>always: scrollbars created and always shown by the scrollpane
* <LI>never: scrollbars never created or shown by the scrollpane
* </OL>
* <P>
* The state of the horizontal and vertical scrollbars is represented
! * by two <code>ScrollPaneAdjustable</code> objects (one for each
! * dimension) which implement the <code>Adjustable</code> interface.
* The API provides methods to access those objects such that the
* attributes on the Adjustable object (such as unitIncrement, value,
* etc.) can be manipulated.
* <P>
* Certain adjustable properties (minimum, maximum, blockIncrement,
--- 45,56 ----
* <LI>always: scrollbars created and always shown by the scrollpane
* <LI>never: scrollbars never created or shown by the scrollpane
* </OL>
* <P>
* The state of the horizontal and vertical scrollbars is represented
! * by two {@code ScrollPaneAdjustable} objects (one for each
! * dimension) which implement the {@code Adjustable} interface.
* The API provides methods to access those objects such that the
* attributes on the Adjustable object (such as unitIncrement, value,
* etc.) can be manipulated.
* <P>
* Certain adjustable properties (minimum, maximum, blockIncrement,
*** 69,79 ****
* <P>
* The initial size of this container is set to 100x100, but can
* be reset using setSize().
* <P>
* Scrolling with the wheel on a wheel-equipped mouse is enabled by default.
! * This can be disabled using <code>setWheelScrollingEnabled</code>.
* Wheel scrolling can be customized by setting the block and
* unit increment of the horizontal and vertical Adjustables.
* For information on how mouse wheel events are dispatched, see
* the class description for {@link MouseWheelEvent}.
* <P>
--- 69,79 ----
* <P>
* The initial size of this container is set to 100x100, but can
* be reset using setSize().
* <P>
* Scrolling with the wheel on a wheel-equipped mouse is enabled by default.
! * This can be disabled using {@code setWheelScrollingEnabled}.
* Wheel scrolling can be customized by setting the block and
* unit increment of the horizontal and vertical Adjustables.
* For information on how mouse wheel events are dispatched, see
* the class description for {@link MouseWheelEvent}.
* <P>
*** 134,158 ****
private int scrollbarDisplayPolicy;
/**
* An adjustable vertical scrollbar.
* It is important to note that you must <em>NOT</em> call 3
! * <code>Adjustable</code> methods, namely:
! * <code>setMinimum()</code>, <code>setMaximum()</code>,
! * <code>setVisibleAmount()</code>.
*
* @serial
* @see #getVAdjustable
*/
private ScrollPaneAdjustable vAdjustable;
/**
* An adjustable horizontal scrollbar.
* It is important to note that you must <em>NOT</em> call 3
! * <code>Adjustable</code> methods, namely:
! * <code>setMinimum()</code>, <code>setMaximum()</code>,
! * <code>setVisibleAmount()</code>.
*
* @serial
* @see #getHAdjustable
*/
private ScrollPaneAdjustable hAdjustable;
--- 134,158 ----
private int scrollbarDisplayPolicy;
/**
* An adjustable vertical scrollbar.
* It is important to note that you must <em>NOT</em> call 3
! * {@code Adjustable} methods, namely:
! * {@code setMinimum()}, {@code setMaximum()},
! * {@code setVisibleAmount()}.
*
* @serial
* @see #getVAdjustable
*/
private ScrollPaneAdjustable vAdjustable;
/**
* An adjustable horizontal scrollbar.
* It is important to note that you must <em>NOT</em> call 3
! * {@code Adjustable} methods, namely:
! * {@code setMinimum()}, {@code setMaximum()},
! * {@code setVisibleAmount()}.
*
* @serial
* @see #getHAdjustable
*/
private ScrollPaneAdjustable hAdjustable;
*** 316,342 ****
}
return w;
}
/**
! * Returns the <code>ScrollPaneAdjustable</code> object which
* represents the state of the vertical scrollbar.
* The declared return type of this method is
! * <code>Adjustable</code> to maintain backward compatibility.
*
* @see java.awt.ScrollPaneAdjustable
* @return the vertical scrollbar state
*/
public Adjustable getVAdjustable() {
return vAdjustable;
}
/**
! * Returns the <code>ScrollPaneAdjustable</code> object which
* represents the state of the horizontal scrollbar.
* The declared return type of this method is
! * <code>Adjustable</code> to maintain backward compatibility.
*
* @see java.awt.ScrollPaneAdjustable
* @return the horizontal scrollbar state
*/
public Adjustable getHAdjustable() {
--- 316,342 ----
}
return w;
}
/**
! * Returns the {@code ScrollPaneAdjustable} object which
* represents the state of the vertical scrollbar.
* The declared return type of this method is
! * {@code Adjustable} to maintain backward compatibility.
*
* @see java.awt.ScrollPaneAdjustable
* @return the vertical scrollbar state
*/
public Adjustable getVAdjustable() {
return vAdjustable;
}
/**
! * Returns the {@code ScrollPaneAdjustable} object which
* represents the state of the horizontal scrollbar.
* The declared return type of this method is
! * {@code Adjustable} to maintain backward compatibility.
*
* @see java.awt.ScrollPaneAdjustable
* @return the horizontal scrollbar state
*/
public Adjustable getHAdjustable() {
*** 486,496 ****
return childSize;
}
/**
* @deprecated As of JDK version 1.1,
! * replaced by <code>doLayout()</code>.
*/
@Deprecated
public void layout() {
if (getComponentCount()==0) {
return;
--- 486,496 ----
return childSize;
}
/**
* @deprecated As of JDK version 1.1,
! * replaced by {@code doLayout()}.
*/
@Deprecated
public void layout() {
if (getComponentCount()==0) {
return;
*** 571,585 ****
}
}
/**
* Returns a string representing the state of this
! * <code>ScrollPane</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
! * <code>null</code>.
*
* @return the parameter string of this scroll pane
*/
public String paramString() {
String sdpStr;
--- 571,585 ----
}
}
/**
* Returns a string representing the state of this
! * {@code ScrollPane}. 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
! * {@code null}.
*
* @return the parameter string of this scroll pane
*/
public String paramString() {
String sdpStr;
*** 608,619 ****
processMouseWheelEvent(e);
}
/**
* Process mouse wheel events that are delivered to this
! * <code>ScrollPane</code> by scrolling an appropriate amount.
! * <p>Note that if the event parameter is <code>null</code>
* the behavior is unspecified and may result in an
* exception.
*
* @param e the mouse wheel event
* @since 1.4
--- 608,619 ----
processMouseWheelEvent(e);
}
/**
* Process mouse wheel events that are delivered to this
! * {@code ScrollPane} by scrolling an appropriate amount.
! * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the mouse wheel event
* @since 1.4
*** 641,653 ****
/**
* Enables/disables scrolling in response to movement of the mouse wheel.
* Wheel scrolling is enabled by default.
*
! * @param handleWheel <code>true</code> if scrolling should be done
* automatically for a MouseWheelEvent,
! * <code>false</code> otherwise.
* @see #isWheelScrollingEnabled
* @see java.awt.event.MouseWheelEvent
* @see java.awt.event.MouseWheelListener
* @since 1.4
*/
--- 641,653 ----
/**
* Enables/disables scrolling in response to movement of the mouse wheel.
* Wheel scrolling is enabled by default.
*
! * @param handleWheel {@code true} if scrolling should be done
* automatically for a MouseWheelEvent,
! * {@code false} otherwise.
* @see #isWheelScrollingEnabled
* @see java.awt.event.MouseWheelEvent
* @see java.awt.event.MouseWheelListener
* @since 1.4
*/
*** 681,692 ****
}
/**
* Reads default serializable fields to stream.
* @exception HeadlessException if
! * <code>GraphicsEnvironment.isHeadless()</code> returns
! * <code>true</code>
* @see java.awt.GraphicsEnvironment#isHeadless
*/
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException, HeadlessException
{
--- 681,692 ----
}
/**
* Reads default serializable fields to stream.
* @exception HeadlessException if
! * {@code GraphicsEnvironment.isHeadless()} returns
! * {@code true}
* @see java.awt.GraphicsEnvironment#isHeadless
*/
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException, HeadlessException
{
*** 777,787 ****
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * <code>ScrollPane</code> class. It provides an implementation of the
* Java Accessibility API appropriate to scroll pane user-interface
* elements.
* @since 1.3
*/
protected class AccessibleAWTScrollPane extends AccessibleAWTContainer
--- 777,787 ----
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * {@code ScrollPane} class. It provides an implementation of the
* Java Accessibility API appropriate to scroll pane user-interface
* elements.
* @since 1.3
*/
protected class AccessibleAWTScrollPane extends AccessibleAWTContainer
< prev index next >