public class ImportAccessorAction
extends javax.swing.AbstractAction
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.
Modifier and Type | Field and Description |
---|---|
(package private) BasicGraphFrame |
_frame
The top-level window of the contents to be exported.
|
Constructor and Description |
---|
ImportAccessorAction(Top frame)
Create a new action to import an accessor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Import an accessor.
|
BasicGraphFrame _frame
public ImportAccessorAction(Top frame)
frame
- The Top that gets the menu.