|
|
|
|
Working with Selections : Simple Selection
|
|
Step by Step
Import the usual figue packages.
|
import figue.*;
import figue.box.*;
import figue.path.*;
import figue.resource.* |
Import the selection package.
|
import figue.selection.*; |
Define a selection
|
try {
_facade.doGetSelection("current selection",
Priority.MEDIUM,
null,
"green"); |
Deal with wrong selection allocation.
|
catch ( WrongSelectionException anException ) { |
Create a modification path.
|
PathInterface thePath = new Path();
PathInterface theNextPath = new Path(0);
thePath.addChild(theNextPath);
PathInterface theFinalPath = new Path(2);
theNextPath.addChild(theFinalPath); |
Add the selection to the path.
|
theFinalPath.addOperation(
new ExtendSelection(
_facade.getSelection("current selection")); |
Or remove it.
|
theFinalPath.addOperation(
new ShrinkSelection(
_facade.getSelection("current selection")); |
Apply the path to the facade.
|
_facade.updateSelectionAndRedisplay(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 :
- alternatively show/hide the selection with the selection button.
|
|
|
Related Classes
and Methods
|
|
|
What Next ?
Now you can :
|
|
|
|
|
|
|
|
|