FIGUE
*Tutorial *Previous *Current *Next

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.

* The Whole Program

* Related Classes and Methods

* What Next ?

Now you can :

*Tutorial *Previous *Current *Next

Comments or suggestions?
Need some help?
Copyright ©1998 INRIA
Last updated 4 November 1998 by Bruno Conductier
FIGUE