next up previous contents index
Next: A simple example Up: Getting Started Previous: Getting Started

Structure of DJ programs

DJ is a very simple language. A DJ program consists of several classes and optionally several constraint definitions. One of the classes must be declared as main that specifies how the main panel is constructed. All other classes specify sub-panels which are pasted on the main panel.  

The body of each class is a sequence of class member declarations. Besides field declarations that declare member variables and method declarations that declare methods, a class member declaration may also be one of the following: component declaration, attribute declaration, and constraint.      

A component declaration in a class declares one or more graphical components of some class that comprise the class. An attribute declaration in a class declares one or more attribute variables of the class. An attribute variable has a type and also a domain from which the variable can take a value. A constraint is a relation among attributes.



Neng-Fa ZHOU
Sat Apr 18 16:14:29 JST 1998