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
-
SCROLLBARS_ALWAYS
- Specifies that horizontal/vertical scrollbars should always be
shown regardless of the respective sizes of the scrollpane and child.
-
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.
-
SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
-
SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
-
SCROLLBARS_NONE
- Do not create or display any scrollbars.
-
SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
-
ScrollPanel(int, int)
- Constructs a new scroll container with the specified scrollbar
visibility and scrollbar display policy.
-
adjustmentValueChanged(AdjustmentEvent)
- Invoked when the value of the adjustable has changed.
-
doLayout()
- Lays out this panel.
-
getMinimumSize()
- Returns the minimum size of this panel.
-
getPreferredSize()
- Returns the preferred size of this panel.
-
getScrollbarDisplayPolicy()
- Returns the display policy for the scrollbars.
-
getScrollbarThickness()
- Returns the thickness of the scroll bar.
-
getScrollbarVisibility()
- Returns the visibility for the scrollbars.
-
paint(Graphics)
- Paints this panel.
-
remove(int)
- Removes the component, specified by
index
,
from this container.
-
scrollValueChanged(ScrollEvent)
- Invoked when the value of the scrollable has changed.
-
setEnabled(boolean)
- Enables or disables this panel.
-
setLayout(LayoutManager)
- Sets the layout manager for this container.
-
setScrollbarDisplayPolicy(int)
- Sets the display policy for the scrollbars.
-
setScrollbarThickness(int)
- Sets the thickness of the scroll bar.
-
setScrollbarVisibility(int)
- Sets the visibility for the scrollbars.
SCROLLBARS_BOTH
public static final int SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
SCROLLBARS_VERTICAL_ONLY
public static final int SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
SCROLLBARS_HORIZONTAL_ONLY
public static final int SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
SCROLLBARS_NONE
public static final int SCROLLBARS_NONE
- Do not create or display any scrollbars.
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.
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.
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.
getScrollbarVisibility
public int getScrollbarVisibility()
- Returns the visibility for the scrollbars.
- See Also:
- setScrollbarVisibility, SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE
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
getScrollbarDisplayPolicy
public int getScrollbarDisplayPolicy()
- Returns the display policy for the scrollbars.
- See Also:
- setScrollbarDisplayPolicy, SCROLLBARS_AS_NEEDED, SCROLLBARS_ALWAYS
setScrollbarDisplayPolicy
public void setScrollbarDisplayPolicy(int scrollbarDisplayPolicy)
- Sets the display policy for the scrollbars.
- See Also:
- getScrollbarDisplayPolicy, SCROLLBARS_AS_NEEDED, SCROLLBARS_ALWAYS
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
setLayout
public void setLayout(LayoutManager mgr)
- Sets the layout manager for this container.
- Parameters:
- mgr - the specified layout manager.
- Overrides:
- setLayout in class Container
paint
public void paint(Graphics g)
- Paints this panel.
- Overrides:
- paint in class Container
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of this panel.
- Overrides:
- getPreferredSize in class KContainer
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this panel.
- Overrides:
- getMinimumSize in class KContainer
doLayout
public void doLayout()
- Lays out this panel.
- Overrides:
- doLayout in class KContainer
setEnabled
public synchronized void setEnabled(boolean b)
- Enables or disables this panel.
- Overrides:
- setEnabled in class KContainer
getScrollbarThickness
public int getScrollbarThickness()
- Returns the thickness of the scroll bar.
- See Also:
- setScrollbarThickness
setScrollbarThickness
public synchronized void setScrollbarThickness(int thickness)
- Sets the thickness of the scroll bar.
- See Also:
- getScrollbarThickness
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
- Invoked when the value of the adjustable has changed.
scrollValueChanged
public void scrollValueChanged(ScrollEvent e)
- Invoked when the value of the scrollable has changed.
All Packages Class Hierarchy This Package Previous Next Index