java3d
  1. java3d
  2. JAVA3D-309

OrbitBehavior needs accessors for several properties

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.3.2
    • Fix Version/s: not determined
    • Component/s: j3d-core-utils
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      309
    • Status Whiteboard:
      Hide

      owner-needed

      Show
      owner-needed

      Description

      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)

      JUSTIFICATION :
      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 :
      EXPECTED -
      See above.
      ACTUAL -
      Can't readily extend.

      CUSTOMER SUBMITTED WORKAROUND :
      Copy the source for OrbitBehavior and modify it.

        Activity

        Hide
        kcr added a comment -

        Change issue type to FEATURE & mark as "owner-needed".

        Show
        kcr added a comment - Change issue type to FEATURE & mark as "owner-needed".

          People

          • Assignee:
            java3d-issues
            Reporter:
            jada
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: