FIGUE
*Tutorial *Previous *Current *Next

Working with Resources : Defered Resources

* Step by Step

Import the usual figue packages.
import figue.*;
import figue.box.*;
import figue.path.*;
Import the resource package.
import figue.resource.*;
Use names instead of concrete resources.
final GlyphInterface theFirstContext 
           = new ChangeGraphicalContextAnonymous("italic",
                                                 "blue",
                                                 null);
final GlyphInterface theLine = new Horizontal(10);
theFirstContext.addChild(theLine);
theLine.addChild(Atom.newAtom("It's"));
theLine.addChild(Atom.newAtom('a'));
Define the named resources before applying the modification.
final GlyphInterface theBox = buildBox();
initResources();
PathInterface thePath = new Path();
thePath.addOperation(new InsertGlyph(theBox,0));
_facade.buildInit(thePath);
_facade.buildComplete();
...
private final void initResources() {
  try {
    _facade.doGetFont("italic",FontFamily.TIMES_ROMAN,
                      FontStyle.BOLD_ITALIC,24,false);
    _facade.doGetFont("big font",FontFamily.COURIER,
                      FontStyle.BOLD,46,false);
    _facade.doGetColor("red",BasicColor.RED);

* 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.

* The Whole Program

* Related Classes and Methods

* What Next ?

Now you can :
  • continue on this lesson to learn about styles
  • go back to the previous lesson if you are interested in basic concepts
  • learn more about :
    • [PENDING : links to related issue]
  • go back to the table of contents

*Tutorial *Previous *Current *Next

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