Class ImportFMUAction

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

    public class ImportFMUAction
    extends javax.swing.AbstractAction
    An Action to Import a Functional Mock-up Unit (FMU).

    This package is optional. To add the "Import FMU" menu choice to the GraphEditor, add the following to the configuration:

       <property name="_importActionClassNames"
                class="ptolemy.data.expr.Parameter"
                value="{"ptolemy.vergil.basic.imprt.fmu.ImportFMUAction"}"/>
       

    BasicGraphFrame checks for this parameter and adds the "Import FMU" menu choice if the class named by that parameter exists.

    The $PTII/ptolemy/configs/defaultFullConfiguration.xml file already has this parameter. The ptiny configuration does not have this parameter so that we have a smaller download.

    An FMU file is a zipped file that contains a file named modelDescription.xml that describes the ports and parameters that are created. At run time, method calls are made to C functions that are included in shared libraries included in the .fmu file.

    We use an import facility here is that the user an configure the ports of the actor, possibly deleting ports. If the actor read its .fmu file each time it was instantiated, then it would be more difficult to manage because the ports could change.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Christopher Brooks. Based on ExportPDFAction by Edward A. Lee
    See Also:
    Serialized Form
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • 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
      ImportFMUAction​(Top frame)
      Create a new action to import a Functional Mock-up Unit (FMU) .fmu file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)
      Import a FMU.
      • 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
    • Constructor Detail

      • ImportFMUAction

        public ImportFMUAction​(Top frame)
        Create a new action to import a Functional Mock-up Unit (FMU) .fmu file.
        Parameters:
        frame - The Frame which to which this action is added.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Import a FMU.