|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--dog.gui.DComponent | +--dog.gui.DScrollbar
An adjustable scrollbar component.
The scrollbar can be in one of two orientations: horizontal or vertical. In horizontal mode, it indicates its value from left to right; in vertical, from top to bottom.
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.awt.event.AdjustmentListener |
adjustmentListener
|
protected int |
blockIncrement
The amount by which the scrollbar value will change when the user clicks above or below the block indicator. |
protected boolean |
dimpled
Whether to draw a NeXT-like dimple on the scrollbar. |
static int |
HORIZONTAL
The horizontal scrollbar variable. |
protected int |
maximum
The maximum value of the scrollbar. |
protected int |
minimum
The minimum value of the scrollbar. |
protected int |
orientation
The scrollbar's orientation, either horizontal or vertical. |
protected static int |
PREFERREDWIDTH
The preferred width for scrollbars. |
protected java.lang.Object |
reference
The object reference. |
protected int |
unitIncrement
The amount by which the scrollbar value will change when the user clicks one of the up or down buttons. |
protected int |
value
The value of the scrollbar. |
static int |
VERTICAL
The vertical scrollbar variable. |
protected int |
visibleAmount
The size of the visible portion of the scrollbar. |
Fields inherited from class dog.gui.DComponent |
CENTER, CENTER_TILE, changes, EAST, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, NORTH, NORTHEAST, NORTHWEST, SOUTH, SOUTHEAST, SOUTHWEST, TILE, 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 | |
DScrollbar()
Constructs a new vertical scrollbar. |
|
DScrollbar(int orientation)
Constructs a new scrollbar with the specified orientation. |
|
DScrollbar(int orientation,
int value,
int visibleAmount,
int minimum,
int maximum)
Constructs a new scrollbar with the specified orientation, value, page size, and minumum and maximum values. |
Method Summary | |
void |
addAdjustmentListener(java.awt.event.AdjustmentListener listener)
Adds the specified adjustment listener to receive adjustment events from this scrollbar. |
int |
getBlockIncrement()
Gets the block increment for this scrollbar. |
int |
getMaximum()
Returns the maximum value of this scrollbar. |
int |
getMinimum()
Returns the minimum value of this scrollbar. |
int |
getOrientation()
Returns the orientation for this scrollbar. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of a scrollbar. |
java.lang.Object |
getReference()
Returns the object reference. |
int |
getUnitIncrement()
Gets the unit increment for this scrollbar. |
int |
getValue()
Returns the current value of this scrollbar. |
int |
getVisibleAmount()
Returns the visible amount of this scrollbar. |
boolean |
isDimpled()
Indicates whether to draw a dimple on the scrollbar. |
boolean |
isDragging()
Indicates whether this scrollbar's value is being dragged by the user. |
void |
paint(java.awt.Graphics g)
Paints this scrollbar. |
protected java.lang.String |
paramString()
Returns the String parameters for this scrollbar. |
protected void |
processAdjustmentEvent(java.awt.event.AdjustmentEvent event)
Processes adjustment events on this scrollbar by dispatching them to any registered AdjustmentListener objects. |
protected void |
processEvent(java.awt.AWTEvent event)
Processes events on this scrollbar. |
protected void |
processMouseEvent(java.awt.event.MouseEvent event)
Processes mouse events on this scrollbar by dispatching them to any registered MouseListener objects. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
Processes mouse motion events on this scrollbar by dispatching them to any registered MouseMotionListener objects. |
void |
removeAdjustmentListener(java.awt.event.AdjustmentListener listener)
Removes the specified adjustment listener so that it no longer receives adjustment events from this scrollbar. |
void |
setBlockIncrement(int blockIncrement)
Sets the block increment for this scrollbar. |
void |
setDimpled(boolean flag)
Sets whether to draw a dimple on the scrollbar. |
void |
setMaximum(int maximum)
Sets the maximum value for this scrollbar. |
void |
setMinimum(int minimum)
Sets the minimum value for this scrollbar. |
void |
setOrientation(int orientation)
Sets the orientation for this scrollbar. |
void |
setParameters(int minimum,
int maximum,
int visibleAmount,
int unitIncrement,
int blockIncrement)
Sets the parameters for this scrollbar. |
void |
setReference(java.lang.Object reference)
Sets the object reference. |
void |
setUnitIncrement(int unitIncrement)
Sets the unit increment for this scrollbar. |
void |
setValue(int value)
Sets the value of this scrollbar to the specified value. |
void |
setValues(int value,
int visibleAmount,
int minimum,
int maximum)
Sets the values for this scrollbar. |
void |
setVisibleAmount(int visibleAmount)
Sets the visible amount of this scrollbar, which is the range of values represented by the width of the scroll bar's bubble. |
void |
timerFired(TimerEvent event)
The timer fired. |
void |
update(java.awt.Graphics g)
Updates the graphics context for this scrollbar. |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int HORIZONTAL
public static final int VERTICAL
protected static int PREFERREDWIDTH
protected int value
protected int maximum
protected int minimum
protected int visibleAmount
protected int orientation
protected int unitIncrement
protected int blockIncrement
protected boolean dimpled
protected java.lang.Object reference
protected transient java.awt.event.AdjustmentListener adjustmentListener
Constructor Detail |
public DScrollbar()
public DScrollbar(int orientation)
orientation
- either DScrollbar.HORIZONTAL or DScrollbar.VERTICALjava.lang.IllegalArgumentException
- When an illegal scrollbar orientation is given.public DScrollbar(int orientation, int value, int visibleAmount, int minimum, int maximum)
orientation
- either DScrollbar.HORIZONTAL or DScrollbar.VERTICALvalue
- the scrollbar's valuevisible
- the size of the visible portion of the
scrollable area. The scrollbar will use this value when paging up
or down by a page.minimum
- the minimum value of the scrollbarmaximum
- the maximum value of the scrollbarMethod Detail |
public int getOrientation()
getOrientation
in interface java.awt.Adjustable
public void setOrientation(int orientation)
orientation
- the orientation (HORIZONTAL or VERTICAL) of
this scrollbar.public int getValue()
getValue
in interface java.awt.Adjustable
getMinimum()
,
getMaximum()
public void setValue(int value)
setValue
in interface java.awt.Adjustable
value
- the new value of the scrollbar. If this value is
below the current minimum or above the current maximum minus
the visible amount, it becomes the new one of those values,
respectively.getValue()
public int getMinimum()
getMinimum
in interface java.awt.Adjustable
getMaximum()
,
getValue()
public void setMinimum(int minimum)
setMinimum
in interface java.awt.Adjustable
minimum
- the minimum value of the scrollbarpublic int getMaximum()
getMaximum
in interface java.awt.Adjustable
getMinimum()
,
getValue()
public void setMaximum(int maximum)
setMaximum
in interface java.awt.Adjustable
maximum
- the maximum value of the scrollbarpublic int getVisibleAmount()
getVisibleAmount
in interface java.awt.Adjustable
public void setVisibleAmount(int visibleAmount)
setVisibleAmount
in interface java.awt.Adjustable
visible
- the amount visible per pagepublic void setUnitIncrement(int unitIncrement)
setUnitIncrement
in interface java.awt.Adjustable
public int getUnitIncrement()
getUnitIncrement
in interface java.awt.Adjustable
public void setBlockIncrement(int blockIncrement)
setBlockIncrement
in interface java.awt.Adjustable
public int getBlockIncrement()
getBlockIncrement
in interface java.awt.Adjustable
public void setParameters(int minimum, int maximum, int visibleAmount, int unitIncrement, int blockIncrement)
minimum
- is the minimum value of the scrollbarmaximum
- is the maximum value of the scrollbarunitIncrement
- is the unit increment of the scrollbarblockIncrement
- is the block increment of the scrollbarpublic void setValues(int value, int visibleAmount, int minimum, int maximum)
value
- is the position in the current window.visibleAmount
- is the amount visible per pageminimum
- is the minimum value of the scrollbarmaximum
- is the maximum value of the scrollbarpublic boolean isDimpled()
public void setDimpled(boolean flag)
flag
- true if the dimple is to be drawnpublic java.lang.Object getReference()
getReference
in class DComponent
public void setReference(java.lang.Object reference)
setReference
in class DComponent
reference
- the object reference to store.public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public boolean isDragging()
public void update(java.awt.Graphics g)
update
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
public void addAdjustmentListener(java.awt.event.AdjustmentListener listener)
addAdjustmentListener
in interface java.awt.Adjustable
listener
- the adjustment listenerpublic void removeAdjustmentListener(java.awt.event.AdjustmentListener listener)
removeAdjustmentListener
in interface java.awt.Adjustable
listener
- the adjustment listenerprotected void processEvent(java.awt.AWTEvent event)
processEvent
in class DComponent
event
- the eventprotected void processAdjustmentEvent(java.awt.event.AdjustmentEvent event)
event
- the adjustment eventprotected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent
in class DComponent
event
- the mouse eventprotected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent
in class DComponent
event
- the mouse motion eventpublic void timerFired(TimerEvent event)
timerFired
in interface TimerListener
protected java.lang.String paramString()
paramString
in class DComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |