|
|
|
|
Working with Resources : Styles
|
|
Step by Step
Import the usual figue packages.
|
import figue.*;
import figue.box.*;
import figue.path.*; |
Import the resource package.
Define a style.
|
_facade.doGetStyle("style",
_facade.getFont("italic"),
_facade.getColor("green"),
null);
_facade.doGetStyle("style hot",
_facade.getFont("big font"),
_facade.getColor("red"),
_facade.getColor("yellow")); |
Use the style name instead of concrete resources.
|
final GlyphInterface theFirstContext
= new ChangeGraphicalContextNamed("style");
final GlyphInterface theLine = new Horizontal(10);
theFirstContext.addChild(theLine);
theLine.addChild(Atom.newAtom("It's"));
theLine.addChild(Atom.newAtom('a'));
final GlyphInterface theSecondContext
= new ChangeGraphicalContextNamed("style hot");
theLine.addChild(theSecondContext);
theSecondContext.addChild(Atom.newAtom("wonderful"));
theLine.addChild(Atom.newAtom("world")); |
|
|
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 :
|
|
|
|
|
|
|
|
|