Note : This bug is transfered from BugTraq : BugId 6430527.
A DESCRIPTION OF THE REQUEST :
OrbitBehavior has several properties that are configured at construction time,
using public flag values (i.e., the properties are part of OrbitBehavior's
public API). Some of these properties do not have accessors ("getters") - from
the source code:
private boolean reverseRotate = false;
private boolean reverseTrans = false;
private boolean reverseZoom = false;
private boolean stopZoom = false;
private boolean proportionalZoom = false;
private double minRadius = 0.0;
This makes it unnecessarily difficult to extend OrbitBehavior to implement
different processing of mouse events (i.e., to override processMouseEvent).
In addition, it seems better if the following constants were public:
private static final int ROTATE = 0;
private static final int TRANSLATE = 1;
private static final int ZOOM = 2;
And the corresponding were treated as properties (i.e., accessors and mutators):
private int leftButton = ROTATE;
private int rightButton = TRANSLATE;
private int middleButton = ZOOM;
Finally, these methods have only package-friendly access; they would be useful
to be protected (esp. if the previous suggestion is not implemented):
boolean rotate(MouseEvent evt)
boolean zoom(MouseEvent evt)
boolean translate(MouseEvent evt)
These changes all contribute to making it possible to extend OrbitBehavior (I
don't like how it works, but I want the same interface).
EXPECTED VERSUS ACTUAL BEHAVIOR :
Can't readily extend.
CUSTOMER SUBMITTED WORKAROUND :
Copy the source for OrbitBehavior and modify it.