JLOW - Java Libraries fOr Workflow - Release 1.0

Author : Cyril Pestel - Read before any use of available Java classes
  1. JLOW - Java Libraries fOr Workflow - Release 1.0
    1. Requirements
    2. First application with JLOW
      1. How to create a window ?
      2. How to use the class GraphJ ?
      3. How to add a descriptor ?
      4. How to show the result ?
    3. What we have learnt
    4. Download and links


First application with JLOW

In a first step we will use JLOW in a very simple application in which  the  Workflow  is just one box.

 How to create a window ?

You must create the window in which the Workflow will be displayed :

     public HelloWorldFrame() {

          Container content = getContentPane();

          content.setLayout(new BorderLayout());

          setSize(400, 300);

          setTitle("Hello World");         



Don't forget the main :

public static void main(String args[]) {

          HelloWorldFrame frame = new HelloWorldFrame();



How to use the class JGraph ?

You must create a GraphJ object which offer the display zone of the Workflow :

IRegisterer register = new Registerer();

GraphJ graph = new GraphJ(register);

content.add(graph, "Center");

How to add a descriptor ?

You must create a descriptor for your task Hello World and specify its display features with an Attributs object :

Attributs atts = new Attributs("AttHW", new Color(141, 90, 99), Attributs.TASK, new Dimension(80, 100));

atts.putAtt(Attributs.GRADIENTCOLOR, new GradientPaint(0, 0, new Color(141, 90, 99), 175,175, new Color(255, 255, 255, 200), true));

register.putAtt("CatHW", atts);

Creation of a descriptor for “Hello World” and adding to the registry :

TaskDescriptor desc = new TaskDescriptor("Hello World", "CatHW");

register.putDescriptor("Helloworld", desc);

The task is now known from the graph and it can be inserted with insert method (of GraphJ) :

graph.insert(new Point(10,10), "Helloworld");

How to show the result ?

Execute your application :


Remark : the "Name : Hello World" is only shown when the mouse is on the bow "Hello World".

What we have learnt

Download and links

Download corner

©ULP/CNRS - CDS, 11 rue de l'Université, 67000 Strasbourg, France Question@simbad