Class AnimationBoxPanel

All Implemented Interfaces:
KeyListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class AnimationBoxPanel extends JPanel implements MouseListener, MouseMotionListener, KeyListener
A widget to graphically display animation times
Author:
IDV Development Team
See Also:
  • Constructor Details

    • AnimationBoxPanel

      public AnimationBoxPanel(AnimationWidget widget)
      Default Constructor
      Parameters:
      widget - The widget
    • AnimationBoxPanel

      public AnimationBoxPanel(AnimationWidget widget, boolean[] okArray)
      Default Constructor
      Parameters:
      widget - The widget
      okArray - initial array of what is
  • Method Details

    • keyPressed

      public void keyPressed(KeyEvent e)
      handle event
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - event
    • keyReleased

      public void keyReleased(KeyEvent e)
      handle event
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - event
    • keyTyped

      public void keyTyped(KeyEvent e)
      handle event
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - event
    • getToolTipText

      public String getToolTipText(MouseEvent event)
      Get the tooltip
      Overrides:
      getToolTipText in class JComponent
      Parameters:
      event - event
      Returns:
      The tooltip
    • getToolTipText

      public String getToolTipText()
      Get the tool tip text
      Overrides:
      getToolTipText in class JComponent
      Returns:
      the text
    • paint

      public void paint(Graphics graphics)
      Paint the boxes
      Overrides:
      paint in class JComponent
      Parameters:
      graphics - graphics
    • setOnIndex

      public void setOnIndex(int index)
      set the current index to on
      Parameters:
      index - current index
    • setNumTimes

      public void setNumTimes(int numTimes)
      Set the number of boxes
      Parameters:
      numTimes - number of times
    • setNumTimes

      public void setNumTimes(int numTimes, boolean[] okArray)
      Set the number of boxes. If okArray non-null then use its values.
      Parameters:
      numTimes - Number of times
      okArray - Values for boxes
    • getBoxes

      public List getBoxes()
      Get the list of boxes
      Returns:
      List of Box-es
    • applyProperties

      protected void applyProperties(AnimationBoxPanel that)
      Apply the properties from the that
      Parameters:
      that - Object to get properties from
    • mousePressed

      public void mousePressed(MouseEvent event)
      Handle event
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - event
    • getStepsOk

      public boolean[] getStepsOk()
      Get the array of boolean that shows what steps are ok
      Returns:
      Array of the steps ok from the boxes
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Handle event
      Specified by:
      mouseMoved in interface MouseMotionListener
      Parameters:
      e - event
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      noop
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - event
    • mouseExited

      public void mouseExited(MouseEvent e)
      Noop
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - The event
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Noop
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - event
    • mouseDragged

      public void mouseDragged(MouseEvent event)
      Noop
      Specified by:
      mouseDragged in interface MouseMotionListener
      Parameters:
      event - event
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Noop
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - event