|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpalmed.edit.scrollbar.VerticalScrollbar
public final class VerticalScrollbar
This class provides a vertical scrollbar.
Constructor Summary | |
---|---|
VerticalScrollbar(IViewport viewport)
Create a vertical scrollbar. |
Method Summary | |
---|---|
boolean |
click(int x,
int y)
Handle a click event. |
void |
drag(int x,
int y)
Handle a drag event. |
void |
drawArrow(javax.microedition.lcdui.Graphics g,
int end,
int from,
int to)
Draw an arrow. |
void |
drawBackground(javax.microedition.lcdui.Graphics g,
int size,
int width)
Draw the background. |
void |
drawBody(javax.microedition.lcdui.Graphics g,
int start,
int end,
int from,
int to)
Draw the body. |
void |
drawCursor(javax.microedition.lcdui.Graphics g,
int start,
int width,
int from,
int length)
Draw the cursor. |
int |
getHeight()
Retrieve the current height. |
int |
getLayout()
Retrieve the layout. |
int |
getWidth()
Retrieve the current width. |
void |
paint(javax.microedition.lcdui.Graphics g)
Paint the component. |
void |
resize(int width,
int height)
Request a component resize. |
void |
scroll(int steps)
Scroll the component. |
void |
scrolled(Coordinate position)
The content has scrolled to the given position. |
void |
unclick(int x,
int y)
Handle an unclick event. |
void |
update(int visible,
int max)
Change the length of the cursor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VerticalScrollbar(IViewport viewport)
viewport
- the viewport to manageMethod Detail |
---|
public void paint(javax.microedition.lcdui.Graphics g)
paint
in interface IComponent
g
- the graphicspublic void update(int visible, int max)
update
in interface IScrollbar
visible
- the number of visible elementsmax
- the total number of elementspublic void resize(int width, int height)
resize
in interface IComponent
width
- the new widthheight
- the new heightpublic boolean click(int x, int y)
click
in interface IComponent
x
- the pointer abscissay
- the pointer ordinate
public void drag(int x, int y)
The component must have claimed focus upon click in order to receive this event.
drag
in interface IComponent
x
- the pointer abscissay
- the pointer ordinatepublic void unclick(int x, int y)
The component must have claimed focus upon click ini order to receive this event.
unclick
in interface IComponent
x
- the pointer abscissay
- the pointer ordinatepublic void scrolled(Coordinate position)
scrolled
in interface IScrollView
position
- the upper-left content positionpublic void scroll(int steps)
scroll
in interface IScrollable
steps
- the number of steps to scrollpublic void drawArrow(javax.microedition.lcdui.Graphics g, int end, int from, int to)
drawArrow
in interface IDrawer
g
- the graphicsend
- the offset where to end at perpendiculary of the axis of the scrollbarfrom
- the offset where to start at on the axis of the scrollbarto
- the offset where to end at on the axis of the scrollbarpublic void drawBody(javax.microedition.lcdui.Graphics g, int start, int end, int from, int to)
drawBody
in interface IDrawer
g
- the graphicsstart
- the offset where to start at perpendiculary of the axis of the scrollbarend
- the offset where to end at perpendiculary of the axis of the scrollbarfrom
- the offset where to start at on the axis of the scrollbarto
- the offset where to end at on the axis of the scrollbarpublic void drawCursor(javax.microedition.lcdui.Graphics g, int start, int width, int from, int length)
drawCursor
in interface IDrawer
g
- the graphicsstart
- the offset to start at perpendiculary of the axis of the scrollbarwidth
- the width of the cursorfrom
- the offset to start at on the axis of the scrollbarlength
- the length of the cursorpublic void drawBackground(javax.microedition.lcdui.Graphics g, int size, int width)
drawBackground
in interface IDrawer
g
- the graphicssize
- the size of the scrollbarwidth
- the width of the scrollbarpublic int getLayout()
Supported layouts are :
getLayout
in interface IComponent
public int getWidth()
getWidth
in interface IComponent
public int getHeight()
getHeight
in interface IComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |