Class JPanelFlythruMove

All Implemented Interfaces:
ActionListener, FocusListener, ItemListener, KeyListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelFlythruMove extends JPanelRendererBase implements ActionListener, MouseListener

Title: JPanelFlythruMove

Description: Fly thru user control panel that manipulate the movements.

Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • STOP_MODE

      public static final int STOP_MODE
      Recorder/Player is stopped.
      See Also:
    • RECORD_MODE

      public static final int RECORD_MODE
      Recorder/Player is recording.
      See Also:
    • PAUSE_MODE

      public static final int PAUSE_MODE
      Recorder/Player is paused.
      See Also:
    • PLAY_MODE

      public static final int PLAY_MODE
      Recorder/Player is playing.
      See Also:
    • AVI_MODE

      public static final int AVI_MODE
      AVI is recording.
      See Also:
    • first

      public boolean first
      Flag to indicate first event.
    • mode

      public int mode
      Current mode, init to stop.
    • changedMode

      boolean changedMode
      flag to indicate current mode being changed.
    • current

      int current
      index to the item list.
    • currEventTime

      long currEventTime
      Current mouse press event time stamp.
    • isPlaying

      boolean isPlaying
      Flag to indicating play mouse is running or not.
    • mouseCount

      int mouseCount
      Mouse event counter.
    • prevEventTime

      long prevEventTime
      Previous mouse press event time stamp.
    • annotationNextButton

      private JButton annotationNextButton
      DOCUMENT ME!
    • annotationPrevButton

      private JButton annotationPrevButton
      DOCUMENT ME!
    • autoRunButton

      private JButton autoRunButton
      Auto Run Button.
    • aviPlayButton

      private JToggleButton aviPlayButton
      AVI Recorder Play button.
    • aviRecordButton

      private JToggleButton aviRecordButton
      AVI Recorder record button.
    • aviStopButton

      private JToggleButton aviStopButton
      AVI Recorder Stop button.
    • branchButton

      private JButton branchButton
      DOCUMENT ME!
    • contButton

      private JToggleButton contButton
      Continue play button.
    • endButton

      private JButton endButton
      DOCUMENT ME!
    • eventVector

      private MouseEventVector eventVector
      Seqence of mouse events ( press, shift,and release as individual mouse event).
    • gazeDecreaseButton

      private JButton gazeDecreaseButton
      DOCUMENT ME!
    • gazeIncrButton

      private JButton gazeIncrButton
      DOCUMENT ME!
    • homeButton

      private JButton homeButton
      DOCUMENT ME!
    • leftRotateButton

      private JButton leftRotateButton
      DOCUMENT ME!
    • mediaPlayerButton

      private JButton mediaPlayerButton
      MS media player button to play AVI file.
    • middleDownButton

      private JButton middleDownButton
      DOCUMENT ME!
    • middleLeftButton

      private JButton middleLeftButton
      DOCUMENT ME!
    • middleLeftButtonEmpty

      private JButton middleLeftButtonEmpty
      Empty button group.
    • middleRightButton

      private JButton middleRightButton
      DOCUMENT ME!
    • middleUpButton

      private JButton middleUpButton
      DOCUMENT ME!
    • mouseEvents

      private Vector mouseEvents
      Sequence of mouse events( press, shift and release as a whole mouse event).
    • mousePanel

      private JPanel mousePanel
      Panel holds the mouse move buttons.
    • moviePanel

      private JPanel moviePanel
      Movie control panel that hold mouse recorder and AVI movie control.
    • parentScene

      private FlyThroughRenderInterface parentScene
      The parent fly thru render reference.
    • pauseButton

      private JToggleButton pauseButton
      Pause button.
    • playButton

      private JToggleButton playButton
      Display button.
    • playMouse

      private JPanelFlythruMove.PlayMouse playMouse
      Reference to PlayMouse class object.
    • pressed

      private boolean pressed
      If any of the mouse move button pressed.
    • quickTimeButton

      private JButton quickTimeButton
      Apple quick time player button to play quick time movie.
    • recordButton

      private JToggleButton recordButton
      Recorder button.
    • reverseButton

      private JButton reverseButton
      DOCUMENT ME!
    • rightDownButton

      private JButton rightDownButton
      DOCUMENT ME!
    • rightLeftButton

      private JButton rightLeftButton
      DOCUMENT ME!
    • rightRightButton

      private JButton rightRightButton
      DOCUMENT ME!
    • rightRotateButton

      private JButton rightRotateButton
      DOCUMENT ME!
    • rightUpButton

      private JButton rightUpButton
      JButton group.
    • scroller

      private JScrollPane scroller
      Scroll pane.
    • scrollPanel

      private JPanelFlythruMove.DrawingPanel scrollPanel
      Scroll panel that holding the all the control components.
    • stepButton

      private JToggleButton stepButton
      Next step button.
    • stepDecreaseButton

      private JButton stepDecreaseButton
      DOCUMENT ME!
    • stepIncrButton

      private JButton stepIncrButton
      DOCUMENT ME!
    • stopButton

      private JToggleButton stopButton
      Stop button.
    • time

      private long time
      Time to wait for the next mouse event.
    • toolBar

      private JToolBar toolBar
      Tool bar of the mouse recorder.
  • Constructor Details

    • JPanelFlythruMove

      public JPanelFlythruMove(FlyThroughRenderInterface _kView)
      User interface to control the fly through renderer events.
      Parameters:
      _kView - FlythruRender
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Invoke the action event accroding to the comamnd passed in.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class JPanelRendererBase
      Parameters:
      event - ActionEvent
    • dispose

      public void dispose(boolean flag)
      Dispose memory.
      Parameters:
      flag - invoke the super dispose or not.
    • getMainPanel

      public JPanel getMainPanel()
      Return the main control panel.
      Specified by:
      getMainPanel in class JPanelRendererBase
      Returns:
      JPanel the main control panel
    • isAVIRecording

      public boolean isAVIRecording()
      Returns whether the AVI is recording.
      Returns:
      whether the panel is recording
    • isPaused

      public boolean isPaused()
      Returns whether the mouse recorder is paused.
      Returns:
      whether the mouse recorder is paused
    • isPlaying

      public boolean isPlaying()
      Returns whether the mouse recorder is playing saved events.
      Returns:
      whether the panel is playing a set of saved events
    • isRecording

      public boolean isRecording()
      Returns whether the mouse recorder is recording.
      Returns:
      whether the panel is recording
    • isStopped

      public boolean isStopped()
      Returns whether the mouse recorder is stopped.
      Returns:
      whether the mouse recorder is stopped
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Translates the event to the appropriate version on the canvas, then sends it to the canvas.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      Translates the event to the appropriate version on the canvas, then sends it to the canvas.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseExited

      public void mouseExited(MouseEvent event)
      Translates the event to the appropriate version on the canvas, then sends it to the canvas.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mousePressed

      public void mousePressed(MouseEvent event)
      Translates the event to the appropriate version on the canvas, then sends it to the canvas.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Translates the event to the appropriate version on the canvas, then sends it to the canvas.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - Original mouse event.
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resizig the control panel with ViewJFrameVolumeView's frame width and height.
      Overrides:
      resizePanel in class JPanelRendererBase
      Parameters:
      panelWidth - DOCUMENT ME!
      frameHeight - DOCUMENT ME!
    • buildControlPanel

      private JPanel buildControlPanel()
      Creates the mouse control panels. There are four arrows for each mouse button, left, right, and middle.
      Returns:
      The panel containing the mouse controls.
    • buildMoviePanel

      private void buildMoviePanel()
      Build the mouse recorder button panel.
    • init

      private void init()
      Initialize the control panel.
    • makeSeparator

      private JButton makeSeparator()
      Makes a separator for the use in the toolbars.
      Returns:
      Separator button.
    • play

      private void play(boolean selectedToEnd, boolean forever)
      If there is no other thread running, starts a new thread to play the mouse events.
      Parameters:
      selectedToEnd - If true, the mouse events are played from the selected one to the end of the list. If false only the selected one is played.
      forever - If true, the mouse events list is played until the stop button or pause button is pressed.
    • setButtonProps

      private void setButtonProps(JButton button, String tip)
      Sets the button properties for all the arrow buttons.
      Parameters:
      button - Button whose properties need to be set.
      tip - Tool tip text to associate with this button.
    • setIcon

      private void setIcon(Object source, boolean press)
      Sets the pressed or unpressed icon for the button, depending on which type it is.
      Parameters:
      source - The button that was pressed or released.
      press - true indicates the button was pressed, false that it was released.
    • saveAVIMovie

      public void saveAVIMovie()
      Save quick time movie.
    • saveQuickTimeMovie

      public void saveQuickTimeMovie()
      Save AVI movie.