Class ImportAccessorAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- ptolemy.vergil.basic.imprt.accessor.ImportAccessorAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class ImportAccessorAction extends javax.swing.AbstractAction
An Action to import an Internet of Things (IoT) accessor.This action presents a dialog box that permits specifying a URL or local directory. If the URL or local directory contains a file named index.json, then it presents a list of the options given in that file, which it assumes are all accessors. To manually specify a particular accessor on the local file system, you can browse to its directory, but then you have to manually type in the file name of the accessor.
This package is optional. To add the "Import Accessor" menu choice to the GraphEditor, add the following to the configuration:
<property name="_importActionClassNames" class="ptolemy.data.expr.Parameter" value="{"ptolemy.vergil.basic.imprt.accessor.ImportAccessorAction"}"/>
BasicGraphFrame
checks for this parameter and adds the "Import Accessor" 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.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Brooks, Patricia Derler.
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description ImportAccessorAction(Top frame)
Create a new action to import an accessor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Import an accessor.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
ImportAccessorAction
public ImportAccessorAction(Top frame)
Create a new action to import an accessor. The initial default value for last location is "https://accessors.org".- Parameters:
frame
- The Top that gets the menu.
-
-