| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.ScrollPane
Unsafe:
| Field Summary | |
| private static String | base | 
| private static boolean | defaultWheelScroll | 
| private  ScrollPaneAdjustable | hAdjustableAn adjustable horizontal scrollbar. | 
| private static int | nameCounter | 
| private  int | scrollbarDisplayPolicyThere are 3 ways in which a scroll bar can be displayed. | 
| static int | SCROLLBARS_ALWAYSEnabled: Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child. | 
| static int | SCROLLBARS_AS_NEEDEDEnabled: Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension. | 
| static int | SCROLLBARS_NEVEREnabled: Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child. | 
| private static long | serialVersionUID | 
| private  ScrollPaneAdjustable | vAdjustableAn adjustable vertical scrollbar. | 
| private  boolean | wheelScrollingEnabledIndicates whether or not scrolling should take place when a MouseWheelEvent is received. | 
| Fields inherited from class java.awt.Container | 
| component, containerListener, descendantsCount, INCLUDE_SELF, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents, SEARCH_HEAVYWEIGHTS | 
| Constructor Summary | |
| ScrollPane()Suppressed: Create a new scrollpane container with a scrollbar display policy of "as needed". | |
| ScrollPane(int scrollbarDisplayPolicy)Suppressed: Create a new scrollpane container. | |
| Method Summary | |
| protected  void | addImpl(Component comp,
        Object constraints,
        int index)Adds the specified component to this scroll pane container. | 
|  void | addNotify()Suppressed: Creates the scroll pane's peer. | 
| (package private)  void | autoProcessMouseWheel(MouseWheelEvent e) | 
| (package private)  Dimension | calculateChildSize()Determine the size to allocate the child component. | 
| (package private)  String | constructComponentName()Construct a name for this component. | 
|  void | doLayout()Suppressed: Lays out this container by resizing its child to its preferred size. | 
| protected  boolean | eventTypeEnabled(int type)If wheel scrolling is enabled, we return true for MouseWheelEvents | 
|  AccessibleContext | getAccessibleContext()Suppressed: Gets the AccessibleContext associated with this ScrollPane. | 
|  Adjustable | getHAdjustable()Suppressed: Returns the ScrollPaneAdjustableobject which
 represents the state of the horizontal scrollbar. | 
|  int | getHScrollbarHeight()Suppressed: Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not. | 
|  int | getScrollbarDisplayPolicy()Suppressed: Returns the display policy for the scrollbars. | 
|  Point | getScrollPosition()Suppressed: Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port. | 
|  Adjustable | getVAdjustable()Suppressed: Returns the ScrollPaneAdjustableobject which
 represents the state of the vertical scrollbar. | 
|  Dimension | getViewportSize()Suppressed: Returns the current size of the scroll pane's view port. | 
|  int | getVScrollbarWidth()Suppressed: Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not. | 
| private static void | initIDs()Initialize JNI field and method IDs | 
|  boolean | isWheelScrollingEnabled()Suppressed: Indicates whether or not scrolling will take place in response to the mouse wheel. | 
|  void | layout()Suppressed: @deprecated As of JDK version 1.1, replaced by doLayout(). | 
|  String | paramString()Suppressed: Returns a string representing the state of this ScrollPane. | 
|  void | printComponents(Graphics g)Suppressed: Prints the component in this scroll pane. | 
| protected  void | processMouseWheelEvent(MouseWheelEvent e)Process mouse wheel events that are delivered to this ScrollPaneby scrolling an appropriate amount. | 
| private  void | readObject(ObjectInputStream s)Reads default serializable fields to stream. | 
|  void | setLayout(LayoutManager mgr)Suppressed: Sets the layout manager for this container. | 
|  void | setScrollPosition(int x,
                  int y)Suppressed: Scrolls to the specified position within the child component. | 
|  void | setScrollPosition(Point p)Suppressed: Scrolls to the specified position within the child component. | 
|  void | setWheelScrollingEnabled(boolean handleWheel)Suppressed: Enables/disables scrolling in response to movement of the mouse wheel. | 
| private  void | writeObject(ObjectOutputStream s)Writes default serializable fields to stream. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final int SCROLLBARS_AS_NEEDED
public static final int SCROLLBARS_ALWAYS
public static final int SCROLLBARS_NEVER
private int scrollbarDisplayPolicy
getScrollbarDisplayPolicy()private ScrollPaneAdjustable vAdjustable
Adjustable methods, namely:
 setMinimum(), setMaximum(),
 setVisibleAmount().
getVAdjustable()private ScrollPaneAdjustable hAdjustable
Adjustable methods, namely:
 setMinimum(), setMaximum(),
 setVisibleAmount().
getHAdjustable()private static final String base
private static int nameCounter
private static final boolean defaultWheelScroll
private boolean wheelScrollingEnabled
private static final long serialVersionUID
| Constructor Detail | 
public ScrollPane()
           throws HeadlessException
HeadlessException - if GraphicsEnvironment.isHeadless()
     returns truejava.awt.GraphicsEnvironment#isHeadless
public ScrollPane(int scrollbarDisplayPolicy)
           throws HeadlessException
scrollbarDisplayPolicy - policy for when scrollbars should be shown
IllegalArgumentException - if the specified scrollbar
     display policy is invalid
HeadlessException - if GraphicsEnvironment.isHeadless()
     returns truejava.awt.GraphicsEnvironment#isHeadless| Method Detail | 
private static void initIDs()
String constructComponentName()
constructComponentName in class Component
protected final void addImpl(Component comp,
                             Object constraints,
                             int index)
addImpl in class Containercomp - the component to be addedconstraints - not applicableindex - position of child component (must be <= 0)Container.add(Component), 
Container.add(Component, int), 
Container.add(Component, java.lang.Object), 
LayoutManager, 
LayoutManager2public int getScrollbarDisplayPolicy()
public Dimension getViewportSize()
public int getHScrollbarHeight()
public int getVScrollbarWidth()
public Adjustable getVAdjustable()
ScrollPaneAdjustable object which
 represents the state of the vertical scrollbar.
 The declared return type of this method is
 Adjustable to maintain backward compatibility.
java.awt.ScrollPaneAdjustablepublic Adjustable getHAdjustable()
ScrollPaneAdjustable object which
 represents the state of the horizontal scrollbar.
 The declared return type of this method is
 Adjustable to maintain backward compatibility.
java.awt.ScrollPaneAdjustable
public void setScrollPosition(int x,
                              int y)
x - the x position to scroll toy - the y position to scroll to
NullPointerException - if the scrollpane does not contain
     a childpublic void setScrollPosition(Point p)
p - the Point representing the position to scroll topublic Point getScrollPosition()
NullPointerException - if the scrollpane does not contain
     a childpublic final void setLayout(LayoutManager mgr)
setLayout in class Containermgr - the specified layout managerContainer.doLayout(), 
Container.getLayout()public void doLayout()
doLayout in class ContainerComponent.validate()Dimension calculateChildSize()
public void layout()
doLayout().
layout in class Containerpublic void printComponents(Graphics g)
printComponents in class Containerg - the specified Graphics windowComponent.print(java.awt.Graphics), 
Component.printAll(java.awt.Graphics)public void addNotify()
addNotify in class ContainerComponent.isDisplayable(), 
Container.removeNotify()public String paramString()
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 
 null.
paramString in class Containervoid autoProcessMouseWheel(MouseWheelEvent e)
autoProcessMouseWheel in class Componentprotected void processMouseWheelEvent(MouseWheelEvent e)
ScrollPane by scrolling an appropriate amount.
 Note that if the event parameter is null
 the behavior is unspecified and may result in an
 exception.
processMouseWheelEvent in class Componente - the mouse wheel eventjava.awt.event.MouseWheelEvent, 
java.awt.event.MouseWheelListener, 
Component.addMouseWheelListener(java.awt.event.MouseWheelListener), 
Component.enableEvents(long)protected boolean eventTypeEnabled(int type)
eventTypeEnabled in class Componentpublic void setWheelScrollingEnabled(boolean handleWheel)
handleWheel - true if scrolling should be done
                      automatically for a MouseWheelEvent,
                      false otherwise.isWheelScrollingEnabled(), 
java.awt.event.MouseWheelEvent, 
java.awt.event.MouseWheelListenerpublic boolean isWheelScrollingEnabled()
setWheelScrollingEnabled(boolean)
private void writeObject(ObjectOutputStream s)
                  throws IOException
s - the ObjectOutputStream to write
IOExceptionAWTEventMulticaster.save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener), 
Component.containerListenerK, 
Container.readObject(java.io.ObjectInputStream)
private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
s - the ObjectInputStream to read
ClassNotFoundException
IOException
HeadlessExceptionjava.awt.GraphicsEnvironment#isHeadlesspublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class Component| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
