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

edu::hws::jcm::draw::Panner Class Reference

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


List of all members.

Detailed Description

When a Panner object is added to a CoordinateRect, it becomes possible to "grab" the coordinate rectangle and pan it (that is, slide it around by moving it with the mouse). By default, the user must right-click-and-drag to pan the coordinates, but this can be changed by providing an argument to the constructor. It is possible to set a Controller to be notified each time the mouse moves while the user is dragging. Alternatively, or in addition, you can set a Controller to be notified when the user finishes dragging. However, for the most part this is unnecessary, since the Drawables in the CoordinateRect will for the most part redraw themselves properly when the limits on the CoordinateRect change. However, if you have Computable objects that depend on the coordinate limits, then they will need to be recomputed. (This will be the case if you use value objects returned by the getValueObject() method in the CoordinateRect class.)

A Panner, p, is inactive if its "visible" property has been set to false. (This is done by calling p.setVisible(false).)

Definition at line 49 of file Panner.java.

Public Member Functions

void draw (Graphics g, boolean coordsChanged)
Controller getOnFinishDrag ()
Controller getOnUserAction ()
boolean getVisible ()
void mouseClicked (MouseEvent evt)
void mouseDragged (MouseEvent evt)
void mouseEntered (MouseEvent evt)
void mouseExited (MouseEvent evt)
void mouseMoved (MouseEvent evt)
void mousePressed (MouseEvent evt)
void mouseReleased (MouseEvent evt)
void needsRedraw ()
 Panner (int modifierSet)
 Panner ()
void setOnFinishDrag (Controller c)
void setOnUserAction (Controller c)
void setVisible (boolean show)

Protected Member Functions

void setOwnerData (DisplayCanvas canvas, CoordinateRect coords)

Protected Attributes

DisplayCanvas canvas
CoordinateRect coords

Private Attributes

boolean dragging
int modifiers
Controller onFinishDrag
Controller onUserAction
int prevX
int prevY

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

Generated by  Doxygen 1.6.0   Back to index