FIGUE
*Tutorial *Previous *Current *Next

Working with Resources : Customization of Initial Font, Color and Background

* Step by Step

Import the usual figue packages.
import figue.*;
import figue.box.*;
import figue.path.*;
Import the resource package.
import figue.resource.*;
Define an initializer.
private final FacadeInitializer getParameters() {
  FacadeInitializer theParameters = new FacadeInitializer();
Add to the initializer the name of initial resources.
theParameters.setInitialColor("My color");
theParameters.setInitialBackground("My background");
theParameters.setInitialFont("My font");
return theParameters;
Pass the initializer to the facade on creation.
_facade = new AWTFacade(getParameters());
Create the relevant named resources.
private final void initResources() {
  try {
    _facade.doGetFont("My font",FontFamily.TIMES_ROMAN,
                      FontStyle.BOLD_ITALIC,24,false);
    _facade.doGetColor("My background",BasicColor.RED);
    _facade.doGetColor("My color",BasicColor.YELLOW);

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

*Tutorial *Previous *Current *Next

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