|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.zaval.util.ValidationObject
|
+--org.zaval.lw.LwCanvas
|
+--org.zaval.lw.LwPanel
|
+--org.zaval.lw.LwScroll
This is scrollbar component. The component is used as the scrollbar component in the scroll bar panel (LwScrollPan) or it can be used for other purposes. The following resources are used with the component:
The scrollbar component defines a value that should be less than certain maximal value and
cannot be less zero. The maximal possible value and the current value are defined with
a pos controller of the component. Use getMaxOffset, setMaxOffset
methods of the component and getOffset, setOffset methods of the
pos controller to control the scrollbar properties. The sample below illustrates the scrollbar
properties usage:
... LwScroll scroll = new LwScroll(LwToolkit.VERTICAL); scroll.setMaxOffset(100); // Setting the maximal posiible value of the scrollbar scroll.getPosController().getOffset(); // Getting the current value of the scrollbar scroll.getPosController().setOffset(10); // Setting the current value of the scrollbar ...
A user can interact with the component using following actions:
setPageIncremet
and setUnitIncremet methods.
It is possible to change bundle element view using setBundleView method.
| Fields inherited from class org.zaval.lw.LwPanel |
children |
| Fields inherited from class org.zaval.lw.LwCanvas |
bits, height, insets, parent, psHeight, psWidth, skins, width, x, y |
| Fields inherited from class org.zaval.util.ValidationObject |
isValidFlag |
| Constructor Summary | |
LwScroll(int t)
Constructs a scrollbar component with the specified orientation. |
|
| Method Summary | |
void |
actionPerformed(LwActionEvent e)
Invoked when an action event occured. |
void |
endDragged(LwMouseMotionEvent e)
Invoked when the mouse ends dragged. |
protected LwLayout |
getDefaultLayout()
Gets the default layout manager that is set with the container during initialization. |
int |
getExtraSize()
|
int |
getLines()
Gets the number of lines. |
int |
getLineSize(int line)
Gets the line size for the specified line number. |
int |
getMaxOffset()
Gets the maximal offset. |
PosController |
getPosController()
Gets the position controller. |
void |
mouseClicked(LwMouseEvent e)
Invoked when the mouse button has been clicked on a light weight component. |
void |
mouseDragged(LwMouseMotionEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(LwMouseEvent e)
Invoked when the mouse enters a light weight component. |
void |
mouseExited(LwMouseEvent e)
Invoked when the mouse exits a light weight component. |
void |
mouseMoved(LwMouseMotionEvent e)
Invoked when the mouse pointer has been moved on a light weight component (with no buttons no down). |
void |
mousePressed(LwMouseEvent e)
Invoked when the mouse button has been pressed on a light weight component. |
void |
mouseReleased(LwMouseEvent e)
Invoked when the mouse button has been released on a light weight component. |
void |
paint(java.awt.Graphics g)
Paints this drawable component. |
void |
posChanged(PosEvent e)
Invoked when a virtual position has been changed. |
void |
setBundleSize(int s)
Sets the bundle size. |
void |
setBundleView(LwView v)
Sets the bundle view. |
void |
setExtraSize(int e)
|
void |
setMaximum(int m)
Sets the specified maximal value for the scrollbar component. |
void |
setPageIncrement(int pi)
Sets the page increment value. |
void |
setPosController(PosController p)
Sets the specified position controller. |
void |
setUnitIncrement(int li)
Sets the unit increment value. |
void |
startDragged(LwMouseMotionEvent e)
Invoked when the mouse starts dragged. |
| Methods inherited from class org.zaval.lw.LwPanel |
add, add, calcPreferredSize, count, get, getLayoutOffset, getLwComponentAt, getLwLayout, indexOf, insert, insert, invalidate, paintOnTop, recalc, remove, remove, removeAll, setBackground, setLwLayout, setOpaque, toFront, updateCashedPs |
| Methods inherited from class org.zaval.lw.LwCanvas |
canHaveFocus, getBackground, getBounds, getHeight, getInsets, getLocation, getLwParent, getOrigin, getPreferredSize, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isVisible, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp |
| Methods inherited from class org.zaval.util.ValidationObject |
isValid |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zaval.lw.LwComponent |
canHaveFocus, getLwParent, getViewMan, getVisiblePart, setEnabled, setLwParent, setViewMan, setVisible |
| Methods inherited from interface org.zaval.lw.Drawable |
getBackground, getOrigin, isEnabled, isOpaque, repaint, repaint, update |
| Methods inherited from interface org.zaval.util.Validationable |
isValid, validate |
| Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
| Constructor Detail |
public LwScroll(int t)
t - the specified orientation.| Method Detail |
public void setMaximum(int m)
m - the specified maximal value.public void setBundleSize(int s)
s - the specified bundle size.public void setPageIncrement(int pi)
pi - the specified page increment.public void setUnitIncrement(int li)
li - the specified unit increment.public void setBundleView(LwView v)
v - the specified bundle view.public void setPosController(PosController p)
p - the specified position controller.public PosController getPosController()
public void paint(java.awt.Graphics g)
Drawablepaint in class LwCanvasorg.zaval.lw.Drawableg - the graphics context to be used for painting.public void actionPerformed(LwActionEvent e)
LwActionListeneractionPerformed in interface LwActionListenerorg.zaval.lw.event.LwActionListenere - the specified action event.public void mouseClicked(LwMouseEvent e)
LwMouseListenermouseClicked in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere - the specified mouse event.public void mouseEntered(LwMouseEvent e)
LwMouseListenermouseEntered in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere - the specified mouse event.public void mouseExited(LwMouseEvent e)
LwMouseListenermouseExited in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere - the specified mouse event.public void mouseReleased(LwMouseEvent e)
LwMouseListenermouseReleased in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere - the specified mouse event.public void mouseMoved(LwMouseMotionEvent e)
LwMouseMotionListenermouseMoved in interface LwMouseMotionListenerorg.zaval.lw.event.LwMouseMotionListenere - the specified mouse motion event.public void startDragged(LwMouseMotionEvent e)
LwMouseMotionListenerstartDragged in interface LwMouseMotionListenerorg.zaval.lw.event.LwMouseMotionListenere - the specified mouse motion event.public void endDragged(LwMouseMotionEvent e)
LwMouseMotionListenerendDragged in interface LwMouseMotionListenerorg.zaval.lw.event.LwMouseMotionListenere - the specified mouse motion event.public void mouseDragged(LwMouseMotionEvent e)
LwMouseMotionListenermouseDragged in interface LwMouseMotionListenerorg.zaval.lw.event.LwMouseMotionListenere - the specified mouse motion event.public void mousePressed(LwMouseEvent e)
LwMouseListenermousePressed in interface LwMouseListenerorg.zaval.lw.event.LwMouseListenere - the specified mouse event.public void posChanged(PosEvent e)
PosListenerposChanged in interface PosListenerorg.zaval.misc.event.PosListenere - the specified pos event.public int getLines()
PosInfogetLines in interface PosInfoorg.zaval.misc.PosInfopublic int getLineSize(int line)
PosInfogetLineSize in interface PosInfoorg.zaval.misc.PosInfoline - the specified line number.public int getMaxOffset()
PosInfogetMaxOffset in interface PosInfoorg.zaval.misc.PosInfopublic int getExtraSize()
public void setExtraSize(int e)
protected LwLayout getDefaultLayout()
LwPanelgetDefaultLayout in class LwPanelorg.zaval.lw.LwPanel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||