Class OpenCRAction

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

    public class OpenCRAction
    extends MenuAction
    This action is called, if the user chooses the menu File > Open. This class loads a new CR into Magellan.
    Version:
    1.0
    Author:
    Andreas
    See Also:
    Serialized Form
    • Field Summary

      • 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
      OpenCRAction​(Client client)
      Creates new OpenCRAction
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getAcceleratorTranslated()
      Returns an accelerator key combination which should depend on the current GUI locale for a menu action.
      static java.io.File getFileFromFileChooser​(Client client)
      Shows the FileOpen Dialog of Magellan.
      static java.io.File getFileFromFileChooser​(Client client, java.awt.Component parent)
      Shows the FileOpen Dialog of Magellan.
      protected java.lang.String getMnemonicTranslated()  
      protected java.lang.String getNameTranslated()
      Returns an name which should depend on the current GUI locale for a menu action.
      protected java.lang.String getTooltipTranslated()
      Returns a tool tip text which should depend on the current GUI locale for a menu action.
      void menuActionPerformed​(java.awt.event.ActionEvent e)
      Called when the file->open menu is selected in order to open a certain cr file.
      • 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, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Constructor Detail

      • OpenCRAction

        public OpenCRAction​(Client client)
        Creates new OpenCRAction
        Parameters:
        client -
    • Method Detail

      • menuActionPerformed

        public void menuActionPerformed​(java.awt.event.ActionEvent e)
        Called when the file->open menu is selected in order to open a certain cr file. Displays a file chooser and loads the selected cr file.
        Specified by:
        menuActionPerformed in class MenuAction
      • getFileFromFileChooser

        public static java.io.File getFileFromFileChooser​(Client client)
        Shows the FileOpen Dialog of Magellan.
        Parameters:
        client - The client for storing settings etc., which is also used as parent component.
      • getFileFromFileChooser

        public static java.io.File getFileFromFileChooser​(Client client,
                                                          java.awt.Component parent)
        Shows the FileOpen Dialog of Magellan.
        Parameters:
        client - The client for storing settings etc.
        parent - The parent component for the chooser.
      • getTooltipTranslated

        protected java.lang.String getTooltipTranslated()
        Description copied from class: MenuAction
        Returns a tool tip text which should depend on the current GUI locale for a menu action. May return null!
        Specified by:
        getTooltipTranslated in class MenuAction