[ Previous] [Cookbook Index]

How to write for Sieve

How to write a component for Sieve

To add a new component to Sieve, you will have to write your component as a class, and maybe a link class too.

There are 3 levels of Components that can be used inside Sieve:

  1. A class that descends from java.awt.Component: You do not need to do anything special to use this class, but it will not be able interact with the objects of this class in any way other than the interface the object provides, and this object will not interact with other components in Sieve.
  2. A class that is a Java Bean and descends from java.awt.Component: Again you do not need to do anything special to use this class. Any bound property exposed will be recognized by Sieve and broadcasted to other members of the same collaborative session.
  3. A Java Bean and descends from java.awt.Component and can be linked to other components: In order to use the output of a component as inputs of other components, it is necessary to implement Link classes, that work as adapters between two components. Sieve takes care of finding compatible links once a source and destination component is indicated.

How to write a Link for Sieve

You may need to add new link types to sieve to make your new component to work with other ones. You do not need to write a new link for every component, as long as there is a link from one of the component superclasses that work as intended with your component.
In order to implement a Link, you need to implement the sieve.workbech.Link interface. Note that Sieve does not provide with a Look and Feel for your link, so your class must provide it.
The way a link manage to notify the destination about an event in the source is application-dependent. A certain application may choose to set the link as a listener of the source, while other may choose to make the link to set the destination a direct listener to the source, bypassing the link. There is nothing in the Link class that suggest a determinate link policy.

In addition, to write a Link for Sieve inetBench...

...You need your link class to inherit from sieve.workbench.SimpleLink, which provides the standard look and feel for the all links in this application. Again, there is nothing in SimpleLink that forces a determinate link policy.

[ TO DO: List all modifications from version 1 to version 2, even those that do not affect a component writer.]


[ Previous] [Cookbook Index]