|
||||||||||
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.LwScrollPan
This is scroll panel component. The scroll panel is a container that implements automatic horizontal and/or vertical scrolling for a single child component. The horizontal and vertical scrollbars are shown only if it is necessary, the properties of the scroll bar components are computed with the component accordingly the metrical characteristics of the child component. There are two types of the scrolling child components:
setLocation
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 | |
LwScrollPan(LwComponent c)
Constructs a scroll panel component with the specified child component to be scrolled. |
|
LwScrollPan(LwComponent c,
int barMask)
Constructs a scroll panel component with the specified child component to be scrolled and the given scroll bar mask. |
Method Summary | |
java.awt.Dimension |
calcPreferredSize(LayoutContainer target)
Calculates the preferred size dimension of the layout container. |
void |
componentAdded(java.lang.Object id,
Layoutable comp,
int index)
Invoked when the specified layoutable component is added to the layout container (that uses the layout manager). |
void |
componentRemoved(Layoutable comp,
int index)
Invoked when the specified layoutable component is removed from the layout container, that uses the layout manager. |
protected LwLayout |
getDefaultLayout()
Gets the default layout manager that is set with the container during initialization. |
java.awt.Point |
getSOLocation()
Gets the scroll object location. |
java.awt.Dimension |
getSOSize()
Gets the scroll object size. |
void |
layout(LayoutContainer target)
Lays out the child layoutable components inside the layout container. |
void |
makeVisible(int x,
int y)
Makes visible the specified location of the scrolled component. |
boolean |
moveContent()
Tests if the scroll component performs scrolling by changing its location or moving view. |
void |
posChanged(PosEvent e)
Invoked when a virtual position has been changed. |
void |
scrollObjMoved(int x,
int y)
Invoked when a scroll object has been moved. |
void |
scrollObjResized(int w,
int h)
Invoked when a scroll object has been resized. |
void |
setIncrements(int hUnit,
int hPage,
int vUnit,
int vPage)
Set the horizontal & vertical unit & page increments. |
void |
setScrollMan(ScrollMan m)
Sets the specified scroll manager for the scroll object. |
void |
setSOLocation(int x,
int y)
Sets the specified scroll object location. |
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, paint, 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, paint, 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 LwScrollPan(LwComponent c)
c
- the specified child component.public LwScrollPan(LwComponent c, int barMask)
c
- the specified child component.barMask
- the specified scroll bar mask.Method Detail |
public void setIncrements(int hUnit, int hPage, int vUnit, int vPage)
hUnit
- the horizontal scroll unit increment (-1 for no change)hPage
- the horizontal scroll page increment (-1 for no change)vUnit
- the vertical scroll unit increment (-1 for no change)vPage
- the vertical scroll page increment (-1 for no change)public void posChanged(PosEvent e)
PosListener
posChanged
in interface PosListener
org.zaval.misc.event.PosListener
e
- the specified pos event.public java.awt.Point getSOLocation()
ScrollObj
getSOLocation
in interface ScrollObj
org.zaval.misc.ScrollObj
public void setSOLocation(int x, int y)
ScrollObj
setSOLocation
in interface ScrollObj
org.zaval.misc.ScrollObj
x
- the specified x coordinate.y
- the specified y coordinate.public java.awt.Dimension getSOSize()
ScrollObj
getSOSize
in interface ScrollObj
org.zaval.misc.ScrollObj
public void setScrollMan(ScrollMan m)
ScrollObj
setScrollMan
in interface ScrollObj
org.zaval.misc.ScrollObj
m
- the specified scroll manager.public void scrollObjMoved(int x, int y)
ScrollMan
scrollObjMoved
in interface ScrollMan
org.zaval.misc.ScrollMan
x
- the x coordinate of a new scroll object location.y
- the y coordinate of a new scroll object location.public void scrollObjResized(int w, int h)
ScrollMan
scrollObjResized
in interface ScrollMan
org.zaval.misc.ScrollMan
w
- the new width of the scroll object.h
- the new height of the scroll object.public boolean moveContent()
ScrollObj
moveContent
in interface ScrollObj
org.zaval.misc.ScrollObj
true
if the scroll component organizes scrolling by moving
its view; otherwise false
.public void componentAdded(java.lang.Object id, Layoutable comp, int index)
LwLayout
componentAdded
in interface LwLayout
org.zaval.lw.LwLayout
id
- the layoutable component constraints.lw
- the layoutable component that has been added.index
- the child index.public void componentRemoved(Layoutable comp, int index)
LwLayout
componentRemoved
in interface LwLayout
org.zaval.lw.LwLayout
lw
- the layoutable component that has been removed.index
- the child component index.public java.awt.Dimension calcPreferredSize(LayoutContainer target)
calcPreferredSize
in interface LwLayout
target
- the layout container.public void makeVisible(int x, int y)
x
- the "x" coordinate of the scrolled component. Pass -1 to ignore.y
- the "y" coordinate of the scrolled component. Pass -1 to ignore.public void layout(LayoutContainer target)
layout
in interface LwLayout
target
- the layout container that needs to be laid out.protected LwLayout getDefaultLayout()
getDefaultLayout
in class LwPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |