User interface modules are a little different from the modules that do computations. These modules are actually coupled with elements of the user interface subsystem of the Java platform. The user interface subsystem does most of the work of managing the layout and display of these D2K specific user interface components. The modules that manage these components are notified when certain events transpire that would cause the user interface component to go away.
Additionally, they have no doit() method, or if they do, it
is never invoked by the infrastructure. However, they do have some other required
methods. Obviously, these modules need to be able to provide a
user interface component to the infrastructure; such a method is abstract
in the superclass.
For typical user interfaces, the developer will only need to provide code to lay out the component. The user interface widgets provided in the D2K infrastructure facilitate the collection and passing of outputs automatically, so that the developer need only use these existing widgets, and the infrastructure will then know how to collect and pass the outputs.
The modules are triggered in the same way that other modules are. All the information
described in the section on enabling modules still
applies -- including the functionality associated with the isReady()
method. Let's look first at the module associated with user interfaces, then
we will explore the user interface components themselves.
![]() |