Class KeyAdapter3D

java.lang.Object
edu.cnu.mdi.mdi3D.adapter3D.KeyAdapter3D

public final class KeyAdapter3D extends Object
Shared static logic for MDI-3D's fixed keyboard/legend commands: pan (L/R/U/D), dolly (J/K), incremental rotation (X/Y/Z, tripled when shifted), and four canonical axis-aligned views (1-4).

This class holds only handleVK(edu.cnu.mdi.mdi3D.panel.Panel3D, int, boolean). Both real keyboard input (via KeyBindings3D, which registers Swing InputMap/ ActionMap bindings) and the on-screen KeyboardLabel legend — whose buttons let a user click a key's effect instead of pressing it — route through this one method, so a keystroke and its corresponding legend button can never disagree about what they do.

  • Method Details

    • handleVK

      public static void handleVK(Panel3D panel3D, int keyCode, boolean shifted)
      Respond to a key stroke, or a KeyboardLabel button mimicking one.
      Parameters:
      panel3D - the owner panel
      keyCode - the key code
      shifted - whether it was shifted (e.g., capitalized)