|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--brf.j2me.dynaworks.ui.BasicWidget
|
+--brf.j2me.dynaworks.ui.ScrollBar
Custom user control widget for a scrollbar.
Implements a horizontally or vertically oriented scroll control. The size of the scroll marker is proportional to the size of the view.
BasicWidget,
UserWidget| Field Summary | |
private static Bitmap[] |
button
"button" bitmaps |
private int |
scrollMax
range value (maximum). |
private int |
scrollMin
range value (minimum). |
private int |
scrollPos
position of the scroll. |
private int |
scrollSize
size of the scroll area. |
static int |
SIZE
size (width/height) of the control in non-scrolling direction. |
private boolean |
vertMode
vertical / horizontal scrollbar. |
| Fields inherited from class brf.j2me.dynaworks.ui.BasicWidget |
g, h, w, x, y |
| Constructor Summary | |
ScrollBar(int x,
int y,
int len,
boolean vertical)
constructor. |
|
| Method Summary | |
(package private) static void |
|
int |
checkPosition(int pos,
int size)
check if a marker at position 'pos' and size 'size' fits into the scrollbar. |
int |
getCorrespondingPosition(int xc,
int yc)
compute the corresponding scroll marker position for a point 'pt'. |
int |
getPosition()
get the current position. |
int |
getSize()
get the current size. |
ActionEvent |
handlePenDown(int xc,
int yc)
Handle a "pen down" event. |
ActionEvent |
handlePenMove(int xc,
int yc)
Handle a "pen move" event. |
void |
paint()
Paint the user control. |
int |
setPosition(int pos,
boolean redraw)
set the position of the scroll marker. |
void |
setRange(int min,
int max,
boolean redraw)
set the range for the ScrollBar. |
int |
setSize(int size,
boolean redraw)
set the size of the scroll marker. |
| Methods inherited from class brf.j2me.dynaworks.ui.BasicWidget |
contains, handleKeyDown, handlePenUp, handleSysKeyDown, hasFocus, loseFocus, setFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
public static final int SIZE
private int scrollMin
private int scrollMax
private int scrollPos
private int scrollSize
private boolean vertMode
private static Bitmap[] button
| Constructor Detail |
public ScrollBar(int x,
int y,
int len,
boolean vertical)
x - int - x coordinate of upper-left corner.y - int - y coordinate of upper-left corner.length - int - length of scrollbar.vert - boolean - vertical orientation?| Method Detail |
static void()
public int checkPosition(int pos,
int size)
pos - int - check positionsize - int - check size
public int getCorrespondingPosition(int xc,
int yc)
xc - int - x-coordinate of point pt.yc - int - y-coordinate of point pt.
public void setRange(int min,
int max,
boolean redraw)
min - int - minimum scroll value.max - int - maximum scroll value.redraw - boolean - redraw the control?pos - int - start position for scroll marker.
public int setPosition(int pos,
boolean redraw)
pos - int - new position of scroll marker.redraw - boolean - redraw the control?
public int setSize(int size,
boolean redraw)
size - int - new size of scroll marker.redraw - boolean - redraw the control?public int getPosition()
public int getSize()
public ActionEvent handlePenDown(int xc,
int yc)
handlePenDown in class BasicWidgetxc - int - x coordinate of hit point.yc - int - y coordinate of hit point.ActionEvent
public ActionEvent handlePenMove(int xc,
int yc)
handlePenMove in class BasicWidgetxc - int - x coordinate of pen point.yc - int - y coordinate of pen point.ActionEventpublic void paint()
paint in class BasicWidget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||