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

Variable Index

 o HORIZONTAL
The horizontal Scrollbar variable.
 o slider
The slider size as set by the application.
 o table
the owning table
 o VERTICAL
The vertical Scrollbar variable.

Constructor Index

 o TblScrollbar(Table, int)
Constructs a scrollbar with the specified orientation.

Method Index

 o atEnd()
 o check(int)
 o dragging()
 o drawSlider(Graphics)
Draws the slider.
 o getAWTLock()
Returns the object used to lock layout and repaint.
 o getLineIncrement()
Gets the line increment.
 o getMaximum()
Gets the maximum value.
 o getMinimum()
Gets the minimum value.
 o getOrientation()
Gets the orientation.
 o getPageIncrement()
Gets the page increment.
 o getValue()
Gets the current value.
 o getVisible()
Gets the slider size.
 o keyDown(Event, int)
Moves the slider if HOME, END, PGUP or PGDN key is hit.
 o 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.

 o mouseDrag(Event, int, int)
Handles a mouse drag event in the slider.
 o mouseUp(Event, int, int)
Resets the scrollbar state after some other operation.
 o paint(Graphics)
This method is called to repaint this canvas.
 o paintComponent(Graphics)
Draws the scrollbar.
 o paramString()
This returns the String parameters for this Scrollbar.
 o preferredHeight()
Returns JCTblEnum.SB_SIZE if this is a horizontal scrollbar; 100 otherwise.
 o preferredWidth()
Returns JCTblEnum.SB_SIZE if this is a vertical scrollbar; 100 otherwise.
 o reshape(int, int, int, int)
 o reshape(Rectangle)
 o scroll(Event, int)
 o setFilterTime(long)
If 2 mouse drag events are received within this interval, the 2nd is not reported (i.e.
 o setForeground(Color)
Sets the foreground color of this component.
 o setLineIncrement(int)
Sets the line increment (default: 10).
 o setPageIncrement(int)
Sets the page increment.
 o setValue(int)
Sets the value.
 o setValue(int, boolean)
Sets the value.
 o setValues(int, int, int, int)
Sets the values.
 o toPixels(int)
Converts from scrollbar scale to screen pixels.
 o toValue(int)
Converts from screen pixels to scrollbar scale.

Variables

 o table
 protected Table table
the owning table

 o HORIZONTAL
 public static final int HORIZONTAL
The horizontal Scrollbar variable.

 o VERTICAL
 public static final int VERTICAL
The vertical Scrollbar variable.

 o slider
 protected int slider
The slider size as set by the application.

Constructors

 o TblScrollbar
 public TblScrollbar(Table table,
                     int dir)
Constructs a scrollbar with the specified orientation.

Parameters:
dir - either HORIZONTAL or VERTICAL

Methods

 o getOrientation
 public int getOrientation()
Gets the orientation.

 o 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
 o check
 protected int check(int value)
 o 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
 o 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
 o scroll
 public abstract void scroll(Event event,
                             int value)
 o getMinimum
 public int getMinimum()
Gets the minimum value.

See Also:
getMaximum, getValue
 o getMaximum
 public int getMaximum()
Gets the maximum value.

See Also:
getMinimum, getValue
 o getVisible
 public int getVisible()
Gets the slider size.

 o 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.

 o getLineIncrement
 public int getLineIncrement()
Gets the line increment.

 o 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).

 o getPageIncrement
 public int getPageIncrement()
Gets the page increment.

 o 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
 o atEnd
 public boolean atEnd()
Returns:
true if slider is currently at min or max value
 o dragging
 public boolean dragging()
Returns:
true if the user is currently dragging the scrollbar's thumb
 o 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

 o preferredWidth
 protected int preferredWidth()
Returns JCTblEnum.SB_SIZE if this is a vertical scrollbar; 100 otherwise.

 o preferredHeight
 protected int preferredHeight()
Returns JCTblEnum.SB_SIZE if this is a horizontal scrollbar; 100 otherwise.

 o mouseUp
 public boolean mouseUp(Event ev,
                        int x,
                        int y)
Resets the scrollbar state after some other operation.

Overrides:
mouseUp in class Component
 o 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
 o mouseDrag
 public boolean mouseDrag(Event ev,
                          int x,
                          int y)
Handles a mouse drag event in the slider.

Overrides:
mouseDrag in class Component
 o 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
 o reshape
 public void reshape(Rectangle r)
 o reshape
 public void reshape(int x,
                     int y,
                     int w,
                     int h)
Overrides:
reshape in class Component
 o drawSlider
 protected void drawSlider(Graphics gc)
Draws the slider.

 o paint
 public void paint(Graphics gc)
This method is called to repaint this canvas.

Overrides:
paint in class Canvas
 o paintComponent
 public void paintComponent(Graphics g)
Draws the scrollbar.

 o toPixels
 protected int toPixels(int value)
Converts from scrollbar scale to screen pixels.

 o toValue
 protected int toValue(int value)
Converts from screen pixels to scrollbar scale.

 o setForeground
 public void setForeground(Color c)
Sets the foreground color of this component.

Overrides:
setForeground in class Component
 o paramString
 protected String paramString()
This returns the String parameters for this Scrollbar.

Overrides:
paramString in class Component
 o 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