All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.ScrollPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.Panel
                                   |
                                   +----jp.kyasu.awt.ScrollPanel

public class ScrollPanel
extends Panel
implements AdjustmentListener, ScrollListener
The ScrollPanel class implements horizontal and/or vertical scrolling panel for a single child component.

Version:
10 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
Scrollable, ScrollEvent, ScrollListener

Variable Index

 o SCROLLBARS_ALWAYS
Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.
 o SCROLLBARS_AS_NEEDED
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.
 o SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.
 o SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.
 o SCROLLBARS_NONE
Do not create or display any scrollbars.
 o SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.

Constructor Index

 o ScrollPanel(int, int)
Constructs a new scroll container with the specified scrollbar visibility and scrollbar display policy.

Method Index

 o adjustmentValueChanged(AdjustmentEvent)
Invoked when the value of the adjustable has changed.
 o doLayout()
Lays out this panel.
 o getMinimumSize()
Returns the minimum size of this panel.
 o getPreferredSize()
Returns the preferred size of this panel.
 o getScrollbarDisplayPolicy()
Returns the display policy for the scrollbars.
 o getScrollbarThickness()
Returns the thickness of the scroll bar.
 o getScrollbarVisibility()
Returns the visibility for the scrollbars.
 o paint(Graphics)
Paints this panel.
 o remove(int)
Removes the component, specified by index, from this container.
 o scrollValueChanged(ScrollEvent)
Invoked when the value of the scrollable has changed.
 o setEnabled(boolean)
Enables or disables this panel.
 o setLayout(LayoutManager)
Sets the layout manager for this container.
 o setScrollbarDisplayPolicy(int)
Sets the display policy for the scrollbars.
 o setScrollbarThickness(int)
Sets the thickness of the scroll bar.
 o setScrollbarVisibility(int)
Sets the visibility for the scrollbars.

Variables

 o SCROLLBARS_BOTH
 public static final int SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.

 o SCROLLBARS_VERTICAL_ONLY
 public static final int SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.

 o SCROLLBARS_HORIZONTAL_ONLY
 public static final int SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.

 o SCROLLBARS_NONE
 public static final int SCROLLBARS_NONE
Do not create or display any scrollbars.

 o SCROLLBARS_AS_NEEDED
 public static final int SCROLLBARS_AS_NEEDED
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.

 o SCROLLBARS_ALWAYS
 public static final int SCROLLBARS_ALWAYS
Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.

Constructors

 o ScrollPanel
 public ScrollPanel(int scrollbarVisibility,
                    int scrollbarDisplayPolicy)
Constructs a new scroll container with the specified scrollbar visibility and scrollbar display policy.

Parameters:
scrollbarVisibility - constant for what scrollbars are created.
scrollbarDisplayPolicy - policy for when scrollbars should be shown.

Methods

 o getScrollbarVisibility
 public int getScrollbarVisibility()
Returns the visibility for the scrollbars.

See Also:
setScrollbarVisibility, SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE
 o setScrollbarVisibility
 public void setScrollbarVisibility(int scrollbarVisibility)
Sets the visibility for the scrollbars.

See Also:
getScrollbarVisibility, SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE
 o getScrollbarDisplayPolicy
 public int getScrollbarDisplayPolicy()
Returns the display policy for the scrollbars.

See Also:
setScrollbarDisplayPolicy, SCROLLBARS_AS_NEEDED, SCROLLBARS_ALWAYS
 o setScrollbarDisplayPolicy
 public void setScrollbarDisplayPolicy(int scrollbarDisplayPolicy)
Sets the display policy for the scrollbars.

See Also:
getScrollbarDisplayPolicy, SCROLLBARS_AS_NEEDED, SCROLLBARS_ALWAYS
 o remove
 public void remove(int index)
Removes the component, specified by index, from this container.

Parameters:
index - the index of the component to be removed.
Overrides:
remove in class Container
 o setLayout
 public void setLayout(LayoutManager mgr)
Sets the layout manager for this container.

Parameters:
mgr - the specified layout manager.
Overrides:
setLayout in class Container
 o paint
 public void paint(Graphics g)
Paints this panel.

Overrides:
paint in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this panel.

Overrides:
getPreferredSize in class KContainer
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this panel.

Overrides:
getMinimumSize in class KContainer
 o doLayout
 public void doLayout()
Lays out this panel.

Overrides:
doLayout in class KContainer
 o setEnabled
 public synchronized void setEnabled(boolean b)
Enables or disables this panel.

Overrides:
setEnabled in class KContainer
 o getScrollbarThickness
 public int getScrollbarThickness()
Returns the thickness of the scroll bar.

See Also:
setScrollbarThickness
 o setScrollbarThickness
 public synchronized void setScrollbarThickness(int thickness)
Sets the thickness of the scroll bar.

See Also:
getScrollbarThickness
 o adjustmentValueChanged
 public void adjustmentValueChanged(AdjustmentEvent e)
Invoked when the value of the adjustable has changed.

 o scrollValueChanged
 public void scrollValueChanged(ScrollEvent e)
Invoked when the value of the scrollable has changed.


All Packages  Class Hierarchy  This Package  Previous  Next  Index