Class RotateOrFlipPorts

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class RotateOrFlipPorts
    extends FigureAction
    Action to rotate or flip ports. What exactly gets done depends on the constructor arguments.
    Since:
    Ptolemy II 5.2
    Version:
    $Id$
    Author:
    Edward A. Lee
    See Also:
    Serialized Form
    Pt.AcceptedRating:
    Red (johnr)
    Pt.ProposedRating:
    Red (eal)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CLOCKWISE
      Indicator to rotate clockwise.
      static int COUNTERCLOCKWISE
      Indicator to rotate counterclockwise.
      static int FLIP_HORIZONTAL
      Indicator to flip ports horizontally.
      static int FLIP_VERTICAL
      Indicator to flip ports vertically.
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Summary

      Constructors 
      Constructor Description
      RotateOrFlipPorts​(int direction, java.lang.String label)
      Create an action to rotate the ports.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      Process the rotate command.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Field Detail

      • CLOCKWISE

        public static final int CLOCKWISE
        Indicator to rotate clockwise.
        See Also:
        Constant Field Values
      • COUNTERCLOCKWISE

        public static final int COUNTERCLOCKWISE
        Indicator to rotate counterclockwise.
        See Also:
        Constant Field Values
      • FLIP_HORIZONTAL

        public static final int FLIP_HORIZONTAL
        Indicator to flip ports horizontally.
        See Also:
        Constant Field Values
      • FLIP_VERTICAL

        public static final int FLIP_VERTICAL
        Indicator to flip ports vertically.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RotateOrFlipPorts

        public RotateOrFlipPorts​(int direction,
                                 java.lang.String label)
        Create an action to rotate the ports.
        Parameters:
        direction - One of CLOCKWISE, COUNTERCLOCKWISE, FLIP_HORIZONTAL, or FLIP_VERTICAL.
        label - The label to put in the menu.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Process the rotate command.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class FigureAction
        Parameters:
        event - The event.