FIGUE
*Tutorial *Previous *Current *Next

Getting Started : The Hello World Application

* Step by Step

Import the main figue package.
import figue.*;
Import the box package.
import figue.box.*;
Import the path package.
import figue.path.*;
Create the usual java application.
public class MyApplication extends java.awt.Frame {
Keep a reference to an AWT facade.
private AWTFacade _facade;
Initialize the AWT facade.
_facade = new AWTFacade();
Add the facade's AWT component to the layout.
add(BorderLayout.CENTER,_facade.getAwtComponent())
Build an atom.
GlyphInterface theMessage = Atom.newAtom("Hello World");
Create a modification path.
PathInterface thePath = new Path();
Add the atom to the path.
thePath.addOperation(new InsertGlyph(theMessage,0));
Apply the path to the facade.
_facade.buildInit(thePath);
_facade.buildComplete();
Free all resources when done.
Button theButton = new Button("Close");
...
theButton.addActionListener(new ActionListener() {
   public void actionPerformed(ActionEvent anEvent) {
                    _facade.disposeWhenInactive();
                    _facade = null;

* 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 :
- close the window with the close button.

* The Whole Program

* Related Classes and Methods

* What Next ?

Now you can :
  • continue on this lesson to learn about lines
  • 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