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

edu::hws::jcm::draw::LimitControlPanel Class Reference

Inheritance diagram for edu::hws::jcm::draw::LimitControlPanel:

edu::hws::jcm::awt::InputObject edu::hws::jcm::awt::Tieable edu::hws::jcm::awt::Limits

List of all members.

Detailed Description

A LimitControlPanel has four input boxes for specifying the xmin, xmax, ymin, and ymax of a CoodinateRect. You can actually add more than one CoordinteRect to the LimitControlPanel. This will synchronize the coordinate systems on the all the CoordinateRects that is controlls.

A LimitControlPanel can also contain a number of standard buttons, such as buttons for zooming the coordinates in and out. The buttons are specfied using constants defined in this class. It is possible to obtain standard buttons so that they can be displayed outside the LimitControlPanel. Furthermore, it is also possible to add other components to the panel, using the addRange(), addComponent(), and addComponentPair() methods. (The standard add() method from the Component class is overridded to call addComponent().) Any VariableInput added to the LimitControl Panel will appear with its name as a label, just above the input box.

Ordinarily, all the components are just stacked up vertically. However, if you set the useTwoColumnsIfPossible property to true, then they will be in two columns, unless the width of the Panel is too small for two columns. Pairs of items added with addRange() or addComponentPair() will appear on the same row. An item added with addComponent() will appear on a row by itself. As for the standard buttons, the following pairs will appear together, IF they are added at the same time: SET_LIMITS and EQUALUIZE; ZOOM_IN and ZOOM_OUT; SAVE and RESTORE.

A LimitControlPanel can have an error reporter, which is used to report any errors that are found in the input boxes for xmin, xmax, ymin, ymax (or other VariableInputs added with addRange()). Except for these input boxes, other coponents are NOT checked for errors.

Definition at line 61 of file LimitControlPanel.java.

Public Member Functions

void actionPerformed (ActionEvent evt)
Component add (Component c)
void addButtons (int buttonSet)
void addComponent (Component c)
void addComponentPair (Component c1, Component c2)
void addCoords (DisplayCanvas canvas)
void addCoords (CoordinateRect coords)
void addRange (final VariableInput v1, final VariableInput v2)
void checkInput ()
Button getButton (int buttonCode)
ErrorReporter getErrorReporter ()
double[] getLimits ()
Dimension getPreferredSize ()
long getSerialNumber ()
boolean getUseTwoColumnsIfPossible ()
 LimitControlPanel (String xminName, String xmaxName, String yminName, String ymaxName, int buttonsToAdd, boolean useTwoColumnsIfPossible)
 LimitControlPanel (int buttonsToAdd, boolean useTwoColumnsIfPossible)
 LimitControlPanel ()
void notifyControllerOnChange (Controller c)
void paint (Graphics g)
void processComponentEvent (ComponentEvent evt)
void setErrorReporter (ErrorReporter rep)
void setLimits (double[] limits)
void setUseTwoColumnsIfPossible (boolean two)
void sync (Tie t, Tieable newest)

Static Public Attributes

static final int ALL_BUTTONS = 0x3F
static final int EQUALIZE = 2
static final int RESTORE = 32
static final int SAVE = 16
static final int SET_LIMITS = 1
static final int ZOOM_IN = 4
static final int ZOOM_OUT = 8

Protected Attributes

int buttons
CoordinateRect coords
ErrorReporter errorReporter
Vector items = new Vector()
long serialNumber = -1
Tie syncWith
boolean twoColumn
VariableInput xmax
VariableInput xmin
VariableInput ymax
VariableInput ymin

Private Member Functions

Button makeButton (int i)

Static Private Attributes

static final String[] buttonNames

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

Generated by  Doxygen 1.6.0   Back to index