Class NavControl2

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class NavControl2 extends JComponent
A navigation control which appears as a screen overlay. It can fire rotation, translation and scale events.
Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • NavControl2

      public NavControl2()
  • Method Details

    • getRotationAngle

      public double getRotationAngle()
      Gets the model's current rotation angle in degrees.
      Returns:
      the model's current rotation angle in degrees.
    • setRotationAngle

      public void setRotationAngle(double rotationAngle)
      Sets the current rotation angle in degrees.
      Parameters:
      rotationAngle - the model's current rotation angle in degrees.
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class JComponent
    • getMaximumSize

      public Dimension getMaximumSize()
      Overrides:
      getMaximumSize in class JComponent
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • contains

      public boolean contains(int x, int y)
      Overrides:
      contains in class JComponent
    • addSelectionListener

      public void addSelectionListener(NavControl2.SelectionListener l)
    • removeSelectionListener

      public void removeSelectionListener(NavControl2.SelectionListener l)
    • getSelectionListeners

      public NavControl2.SelectionListener[] getSelectionListeners()
    • fireRotate

      protected void fireRotate(double rotationAngle)
    • fireMove

      protected void fireMove(double moveDirX, double moveDirY)
    • fireScale

      protected void fireScale(double scaleDir)
    • main

      public static void main(String[] args)