All Packages Class Hierarchy This Package Previous Next Index
Class jclass.table.TblScrollbar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jclass.table.TblScrollbar
- public abstract class TblScrollbar
- extends Canvas
-
HORIZONTAL
- The horizontal Scrollbar variable.
-
slider
- The slider size as set by the application.
-
table
- the owning table
-
VERTICAL
- The vertical Scrollbar variable.
-
TblScrollbar(Table, int)
- Constructs a scrollbar with the specified orientation.
-
atEnd()
-
-
check(int)
-
-
dragging()
-
-
drawSlider(Graphics)
- Draws the slider.
-
getAWTLock()
- Returns the object used to lock layout and repaint.
-
getLineIncrement()
- Gets the line increment.
-
getMaximum()
- Gets the maximum value.
-
getMinimum()
- Gets the minimum value.
-
getOrientation()
- Gets the orientation.
-
getPageIncrement()
- Gets the page increment.
-
getValue()
- Gets the current value.
-
getVisible()
- Gets the slider size.
-
keyDown(Event, int)
- Moves the slider if HOME, END, PGUP or PGDN key is hit.
-
mouseDown(Event, int, int)
- If an arrow button is pressed, the slider will move by one line.
If the trough is clicked with the CTRL key down, the slider will move to the beginning or end.
If the trough is clicked, the slider will move by one page.
-
mouseDrag(Event, int, int)
- Handles a mouse drag event in the slider.
-
mouseUp(Event, int, int)
- Resets the scrollbar state after some other operation.
-
paint(Graphics)
- This method is called to repaint this canvas.
-
paintComponent(Graphics)
- Draws the scrollbar.
-
paramString()
- This returns the String parameters for this Scrollbar.
-
preferredHeight()
- Returns JCTblEnum.SB_SIZE if this is a horizontal scrollbar; 100 otherwise.
-
preferredWidth()
- Returns JCTblEnum.SB_SIZE if this is a vertical scrollbar; 100 otherwise.
-
reshape(int, int, int, int)
-
-
reshape(Rectangle)
-
-
scroll(Event, int)
-
-
setFilterTime(long)
- If 2 mouse drag events are received within this interval,
the 2nd is not reported (i.e.
-
setForeground(Color)
-
Sets the foreground color of this component.
-
setLineIncrement(int)
- Sets the line increment (default: 10).
-
setPageIncrement(int)
- Sets the page increment.
-
setValue(int)
- Sets the value.
-
setValue(int, boolean)
- Sets the value.
-
setValues(int, int, int, int)
- Sets the values.
-
toPixels(int)
- Converts from scrollbar scale to screen pixels.
-
toValue(int)
- Converts from screen pixels to scrollbar scale.
table
protected Table table
- the owning table
HORIZONTAL
public static final int HORIZONTAL
- The horizontal Scrollbar variable.
VERTICAL
public static final int VERTICAL
- The vertical Scrollbar variable.
slider
protected int slider
- The slider size as set by the application.
TblScrollbar
public TblScrollbar(Table table,
int dir)
- Constructs a scrollbar with the specified orientation.
- Parameters:
- dir - either HORIZONTAL or VERTICAL
getOrientation
public int getOrientation()
- Gets the orientation.
getValue
public int getValue()
- Gets the current value. This will be between the minimum value and the
maximum value minus the slider size.
- See Also:
- getMinimum, getMaximum
check
protected int check(int value)
setValue
public void setValue(int value)
- Sets the value.
- Parameters:
- value - the new value. If this value is
below the current min or above the current max, it becomes the
new one of those values, respectively.
- See Also:
- getValue
setValue
public void setValue(int value,
boolean notify)
- Sets the value.
- Parameters:
- notify - if true, a SCROLL_ABSOLUTE event is sent and the callback is called
scroll
public abstract void scroll(Event event,
int value)
getMinimum
public int getMinimum()
- Gets the minimum value.
- See Also:
- getMaximum, getValue
getMaximum
public int getMaximum()
- Gets the maximum value.
- See Also:
- getMinimum, getValue
getVisible
public int getVisible()
- Gets the slider size.
setLineIncrement
public void setLineIncrement(int l)
- Sets the line increment (default: 10). This is the amount that is
scrolled up or down when the user clicks the arrow buttons.
getLineIncrement
public int getLineIncrement()
- Gets the line increment.
setPageIncrement
public void setPageIncrement(int l)
- Sets the page increment. This is the amount that will
be scrolled up or down when the user clicks above/below the slider
(default: slider size).
getPageIncrement
public int getPageIncrement()
- Gets the page increment.
setValues
public void setValues(int value,
int visible,
int min,
int max)
- Sets the values.
- Parameters:
- value - the scrollbar's value
- visible - the amount visible per page (the slider size).
The page increment this is also set to this value.
- min - the minimum value of the scrollbar
- max - the maximum value of the scrollbar
- See Also:
- setPageIncrement
atEnd
public boolean atEnd()
- Returns:
- true if slider is currently at min or max value
dragging
public boolean dragging()
- Returns:
- true if the user is currently dragging the scrollbar's thumb
setFilterTime
public void setFilterTime(long t)
- If 2 mouse drag events are received within this interval,
the 2nd is not reported (i.e. no events are dispatched) (default: 0 ms).
To specify that no events are to
be reported until the user releases the mouse, set this value to JCTblEnum.MAXINT.
HTML param name/value: "FilterTime"/int
preferredWidth
protected int preferredWidth()
- Returns JCTblEnum.SB_SIZE if this is a vertical scrollbar; 100 otherwise.
preferredHeight
protected int preferredHeight()
- Returns JCTblEnum.SB_SIZE if this is a horizontal scrollbar; 100 otherwise.
mouseUp
public boolean mouseUp(Event ev,
int x,
int y)
- Resets the scrollbar state after some other operation.
- Overrides:
- mouseUp in class Component
mouseDown
public boolean mouseDown(Event ev,
int x,
int y)
- If an arrow button is pressed, the slider will move by one line.
If the trough is clicked with the CTRL key down, the slider will move to the beginning or end.
If the trough is clicked, the slider will move by one page.
- Overrides:
- mouseDown in class Component
mouseDrag
public boolean mouseDrag(Event ev,
int x,
int y)
- Handles a mouse drag event in the slider.
- Overrides:
- mouseDrag in class Component
keyDown
public boolean keyDown(Event ev,
int key)
- Moves the slider if HOME, END, PGUP or PGDN key is hit.
- Overrides:
- keyDown in class Component
reshape
public void reshape(Rectangle r)
reshape
public void reshape(int x,
int y,
int w,
int h)
- Overrides:
- reshape in class Component
drawSlider
protected void drawSlider(Graphics gc)
- Draws the slider.
paint
public void paint(Graphics gc)
- This method is called to repaint this canvas.
- Overrides:
- paint in class Canvas
paintComponent
public void paintComponent(Graphics g)
- Draws the scrollbar.
toPixels
protected int toPixels(int value)
- Converts from scrollbar scale to screen pixels.
toValue
protected int toValue(int value)
- Converts from screen pixels to scrollbar scale.
setForeground
public void setForeground(Color c)
- Sets the foreground color of this component.
- Overrides:
- setForeground in class Component
paramString
protected String paramString()
- This returns the String parameters for this Scrollbar.
- Overrides:
- paramString in class Component
getAWTLock
public Object getAWTLock()
- Returns the object used to lock layout and repaint.
For JDK 1.0.2, it is the object instance. For JDK 1.1, it
is Component.getTreeLock()
All Packages Class Hierarchy This Package Previous Next Index