|
||||||||||
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)
Drawable
paint
in class LwCanvas
org.zaval.lw.Drawable
g
- the graphics context to be used for painting.public void actionPerformed(LwActionEvent e)
LwActionListener
actionPerformed
in interface LwActionListener
org.zaval.lw.event.LwActionListener
e
- the specified action event.public void mouseClicked(LwMouseEvent e)
LwMouseListener
mouseClicked
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseEntered(LwMouseEvent e)
LwMouseListener
mouseEntered
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseExited(LwMouseEvent e)
LwMouseListener
mouseExited
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseReleased(LwMouseEvent e)
LwMouseListener
mouseReleased
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseMoved(LwMouseMotionEvent e)
LwMouseMotionListener
mouseMoved
in interface LwMouseMotionListener
org.zaval.lw.event.LwMouseMotionListener
e
- the specified mouse motion event.public void startDragged(LwMouseMotionEvent e)
LwMouseMotionListener
startDragged
in interface LwMouseMotionListener
org.zaval.lw.event.LwMouseMotionListener
e
- the specified mouse motion event.public void endDragged(LwMouseMotionEvent e)
LwMouseMotionListener
endDragged
in interface LwMouseMotionListener
org.zaval.lw.event.LwMouseMotionListener
e
- the specified mouse motion event.public void mouseDragged(LwMouseMotionEvent e)
LwMouseMotionListener
mouseDragged
in interface LwMouseMotionListener
org.zaval.lw.event.LwMouseMotionListener
e
- the specified mouse motion event.public void mousePressed(LwMouseEvent e)
LwMouseListener
mousePressed
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void posChanged(PosEvent e)
PosListener
posChanged
in interface PosListener
org.zaval.misc.event.PosListener
e
- the specified pos event.public int getLines()
PosInfo
getLines
in interface PosInfo
org.zaval.misc.PosInfo
public int getLineSize(int line)
PosInfo
getLineSize
in interface PosInfo
org.zaval.misc.PosInfo
line
- the specified line number.public int getMaxOffset()
PosInfo
getMaxOffset
in interface PosInfo
org.zaval.misc.PosInfo
public int getExtraSize()
public void setExtraSize(int e)
protected LwLayout getDefaultLayout()
LwPanel
getDefaultLayout
in class LwPanel
org.zaval.lw.LwPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |