public class ScrollPanel extends Panel implements java.awt.event.AdjustmentListener, ScrollListener
ScrollPanel class implements horizontal and/or
vertical scrolling panel for a single child component.Scrollable,
ScrollEvent,
ScrollListener,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected Scrollbar |
hScrollbar |
protected Scrollable |
scrollable |
protected int |
scrollbarDisplayPolicy |
static int |
SCROLLBARS_ALWAYS
Specifies that horizontal/vertical scrollbars should always be
shown regardless of the respective sizes of the scrollpane and child.
|
static 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.
|
static int |
SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.
|
static int |
SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.
|
static int |
SCROLLBARS_NONE
Do not create or display any scrollbars.
|
static int |
SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.
|
protected int |
scrollbarVisibility |
protected Scrollbar |
vScrollbar |
insets, PanelInsets, PanelLayoutfocusTraversable| コンストラクタと説明 |
|---|
ScrollPanel(int scrollbarVisibility,
int scrollbarDisplayPolicy)
Constructs a new scroll container with the specified scrollbar
visibility and scrollbar display policy.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Adds the specified component to this scroll container.
|
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Invoked when the value of the adjustable has changed.
|
protected boolean[] |
checkLayout() |
void |
doLayout()
Lays out this panel.
|
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of this panel.
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this panel.
|
int |
getScrollbarDisplayPolicy()
Returns the display policy for the scrollbars.
|
int |
getScrollbarThickness()
Returns the thickness of the scroll bar.
|
int |
getScrollbarVisibility()
Returns the visibility for the scrollbars.
|
void |
paint(java.awt.Graphics g)
Paints this panel.
|
void |
remove(int index)
Removes the component, specified by
index,
from this container. |
void |
scrollValueChanged(ScrollEvent e)
Invoked when the value of the scrollable has changed.
|
void |
setEnabled(boolean b)
Enables or disables this panel.
|
void |
setLayout(java.awt.LayoutManager mgr)
Sets the layout manager for this container.
|
void |
setScrollbarDisplayPolicy(int scrollbarDisplayPolicy)
Sets the display policy for the scrollbars.
|
void |
setScrollbarThickness(int thickness)
Sets the thickness of the scroll bar.
|
void |
setScrollbarVisibility(int scrollbarVisibility)
Sets the visibility for the scrollbars.
|
protected void |
updateHScrollbar(Scrollable s) |
protected void |
updateVScrollbar(Scrollable s) |
addNotify, bounds, disable, enable, enable, getBounds, getFrame, getLocation, getSize, hide, insets, isDirectNotification, isFocusTraversable, layout, location, minimumSize, postOldEvent, preferredSize, repaintNow, requestFocus, reshape, setBounds, setFocusTraversable, setVisible, show, show, size, updateadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMousePosition, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, list, list, locate, paintComponents, paramString, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected int scrollbarVisibility
protected int scrollbarDisplayPolicy
protected Scrollable scrollable
protected Scrollbar vScrollbar
protected Scrollbar hScrollbar
public static final int SCROLLBARS_BOTH
public static final int SCROLLBARS_VERTICAL_ONLY
public static final int SCROLLBARS_HORIZONTAL_ONLY
public static final int SCROLLBARS_NONE
public static final int SCROLLBARS_AS_NEEDED
public static final int SCROLLBARS_ALWAYS
public ScrollPanel(int scrollbarVisibility,
int scrollbarDisplayPolicy)
scrollbarVisibility - constant for what scrollbars are created.scrollbarDisplayPolicy - policy for when scrollbars should be shown.public int getScrollbarVisibility()
public void setScrollbarVisibility(int scrollbarVisibility)
public int getScrollbarDisplayPolicy()
public void setScrollbarDisplayPolicy(int scrollbarDisplayPolicy)
protected void addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
addImpl クラス内 java.awt.Containercomp - the component to be added.constraints - not applicable.index - the position of child component (must be <= 0).public void remove(int index)
index,
from this container.remove クラス内 java.awt.Containerindex - the index of the component to be removed.public void setLayout(java.awt.LayoutManager mgr)
setLayout クラス内 java.awt.Containermgr - the specified layout manager.public void paint(java.awt.Graphics g)
paint クラス内 java.awt.Containerpublic java.awt.Dimension getPreferredSize()
getPreferredSize クラス内 KContainerpublic java.awt.Dimension getMinimumSize()
getMinimumSize クラス内 KContainerpublic void doLayout()
doLayout クラス内 KContainerprotected boolean[] checkLayout()
public void setEnabled(boolean b)
setEnabled クラス内 KContainerpublic int getScrollbarThickness()
public void setScrollbarThickness(int thickness)
getScrollbarThickness()public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged インタフェース内 java.awt.event.AdjustmentListenerpublic void scrollValueChanged(ScrollEvent e)
scrollValueChanged インタフェース内 ScrollListenerprotected void updateVScrollbar(Scrollable s)
protected void updateHScrollbar(Scrollable s)