Logo Search packages:      
Sourcecode: wims version File versions  Download package

edu::hws::jcm::awt::JCMPanel Class Reference

Inherits java::awt::Panel.

List of all members.


Detailed Description

A JCMPanel is a Panel with an associated Controller. When an InputObject or Computable is added to the JCMPanel, it is automatically added to the controller. When a sub-JCMPanel is added, the Controller of the sub-panel is "attatched" to the controller of the main panel so that objects in the sub-panel will also be controlled by the Controller of the main panel. So, if you build an interface entirely from JCMPanels, a lot of the control setup is done automatically. Note that to make this work, you will need a "mainPanel" that fills the entire window or applet (or at least the part that holds JCM components). You should also call the gatherInputs() method of the main JCMPanel after it is completely set up, so that changes in input objects will cause the panel's controller to be notified, or, alternatively, you can register the Controller by hand with InputObjects so that the Controller will be notified when they change.

The disadvantage of this is that all the data used in the interface is recomputed, even if the input objects that they depend on have not changed. For example. if the user changes the value in a VarialbleInput, all the points on a graph will be recomputed even if the function has not changed. The alternative is to use regular Panels for all or part of the interface and configure some Controllers by hand.

Definition at line 54 of file JCMPanel.java.


Public Member Functions

void gatherInputs ()
Controller getController ()
Insets getInsets ()
 JCMPanel (int rows, int columns, int gap)
 JCMPanel (int rows, int columns)
 JCMPanel (int gap)
 JCMPanel ()
 JCMPanel (LayoutManager layout)
void processContainerEvent (ContainerEvent evt)
void setInsetGap (int x)

Private Attributes

Controller controller
int insetGap

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index