FIGUE
*Design *Boxes *Combinator *Formatting *Geometry *Reuse
*Selections *Paths *Concurrency *Exception *Interaction *Utility
*Resource *Drawing *Incremental *Customize *Various

Drawing

The API cross references give an immediate access to relevant interfaces and classes.

* Draw

A drawable element knows how to draw itself on a graphical context with or without active selection. The box coordinates are relative to the given transformation and the drawing area is restricted to a refresh zone.

Efficiency explains the presence of method signature with or without selection, as in most cases the selection path will be very light. The "draw clean" methods address problems relative to multi-threading. We do not talk of the only (temporary ?!) cost of synchonized code in current java implementation, but also of the cost bind to design. For example, there is no need to check every child before drawing it, if we already know that the father is clean (i.e. formatted). We could also draw a cleaned and ordered combinator (like vertical) with a dichotomy algorithm relative to the refresh area.

DRAWABLE

* Graphical Context

A graphical context is an area on which a drawable component could draw itself. The current font, color and background are used when drawing and formatting. The current resources are masked by active selections and decorating boxes. We use the priority level of the selection to choose between multiple selections. A selection prevail on a Decoration. We save and restore the current resources within a context memento.
The concrete implementation for AWT provides display operations without flash by the adoption of a classical double buffer

Here is the reason to reify the graphical context.
Here is the reason we draw array of bytes instead of simple strings.

GRAPHICAL CONTEXT
A graphical context carrys also some operations used for Thread Synchronization. The graphical context is indeed a pivot used by both threads when they are working at the box level. So for example, when the draw thread (respectively the format thread) is waiting for the advance of the format thread (respectively the build thread) for a given box, it is natural to use the graphical context to notify of some advance. Without this protocol we will be forced to go through the box structure from parent to parent, until we reach the root and get the Facade and its other pivot : the notifying thread state. These methods are typical guarded methods awaiting that their condition holds.

* Context Memento

A context memento provides a convenient way to save and restore the state of a graphical context (i.e. current font, color and background).

CONTEXT MEMENTO

* API Cross References


*Design *Boxes *Combinator *Formatting *Geometry *Reuse
*Selections *Paths *Concurrency *Exception *Interaction *Utility
*Resource *Drawing *Incremental *Customize *Various

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