|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--dog.gui.DContainer
|
+--dog.gui.DScrollPane
A container class which implements automatic horizontal and/or vertical scrolling for a single child component. The display policy for the scrollbars can be set to:
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected int |
policy
The scrollbar display policy. |
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_NEVER
Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child. |
| Fields inherited from class dog.gui.DContainer |
cancelButton, CENTER, defaultButton, EAST, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, tooltip, WEST |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DScrollPane()
Create a new scrollpane container with an as-needed scrollbar display policy. |
|
DScrollPane(int policy)
Create a new scrollpane container. |
|
| Method Summary | |
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Adds the specified component to this scroll pane container. |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
A scrollbar was moved. |
void |
doLayout()
Lays out this container by resizing its child to its preferred size. |
java.awt.Adjustable |
getHAdjustable()
Returns the Adjustable object which represents the state of the horizontal scrollbar. |
int |
getHScrollbarHeight()
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 |
getPolicy()
Returns the display policy for the scrollbars. |
java.awt.Dimension |
getPreferredSize()
|
java.awt.Point |
getScrollPosition()
Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port. |
java.awt.Adjustable |
getVAdjustable()
Returns the Adjustable object which represents the state of the vertical scrollbar. |
java.awt.Dimension |
getViewportSize()
Returns the current size of the scroll pane's view port. |
int |
getVScrollbarWidth()
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. |
void |
paint(java.awt.Graphics g)
|
java.lang.String |
paramString()
Returns a parameter string for this component. |
void |
setLayout(java.awt.LayoutManager mgr)
Overrides setting the layout manager for this container, as this is controlled by the scrollpane. |
void |
setScrollPosition(int x,
int y)
Scrolls to the specified position within the view. |
void |
setScrollPosition(java.awt.Point p)
Scrolls to the specified position within the child component. |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus |
| 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
protected int policy
| Constructor Detail |
public DScrollPane()
public DScrollPane(int policy)
policy - policy for when scrollbars should be shown| Method Detail |
protected final void addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
addImpl in class DContainercomp - the component to be addedconstraints - not applicableindex - position of child component (must be <= 0)public int getPolicy()
public java.awt.Dimension getViewportSize()
public int getHScrollbarHeight()
public int getVScrollbarWidth()
public java.awt.Adjustable getVAdjustable()
public java.awt.Adjustable getHAdjustable()
public void setScrollPosition(int x,
int y)
x - the x position to scroll toy - the y position to scroll topublic void setScrollPosition(java.awt.Point p)
p - the Point representing the position to scroll topublic java.awt.Point getScrollPosition()
public final void setLayout(java.awt.LayoutManager mgr)
setLayout in class java.awt.Containermgr - the specified layout managerpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic void doLayout()
doLayout in class java.awt.ContainerComponent.validate()public void paint(java.awt.Graphics g)
paint in class java.awt.Containerpublic void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
adjustmentValueChanged in interface java.awt.event.AdjustmentListenerpublic java.lang.String paramString()
paramString in class DContainer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||