|
|
|
|
Working with Scrollbars : Scrolling to an Area
|
|
Step by Step
Define an initializer.
|
private final FacadeInitializer getParameters() {
FacadeInitializer theParameters = new FacadeInitializer(); |
Add the choosen "scroll to" policy to the initializer.
|
theParameters.setInsureVisiblePolicy(
new InsureVisiblePolicy(20,0,0,0)); |
Pass the initializer to the facade on creation.
|
_facade = new AWTFacade(getParameters()); |
Create a path and mark all relevant area
|
PathInterface thePath = new Path();
PathInterface theNextPath = new Path(0);
thePath.addChild(theNextPath);
if ( _selectionFlag1 ) {
PathInterface theFinalPath = new Path(NOISE * 10);
theNextPath.addChild(theFinalPath);
theFinalPath.addOperation(MarkGlyph.INSTANCE); |
Apply the path to the facade
|
_facade.insureVisible(thePath); |
|
|
Example
- Accelerators :
- home, end, page up, page down, left arrow,right arrow, up arrow, down arrow.
- Autoscrolling :
- drag the mouse inside the
text area, approach a border or a corner, and wait.
- Actions :
- xxx
|
|
|
Related Classes
and Methods
|
|
|
What Next ?
Now you can :
|
|
|
|
|
|
|
|
|