Custom Atlas Smart Views
Atlas allows you to create and contribute user defined scripts to the Smart View. The example script Supertype Hierarchy is included in the Example Shell project. To create a custom script, you need to create a script and then register it in Atlas.
Creating the script
A custom script can be created by creating a java class that implements the com.ensoftcorp.atlas.java.ui.scripts.selections.AtlasSmartViewScript interface and implementing the following methods:
- Return the result Q encapsulated in a StyledResult object.
-
public StyledResult selectionChanged(SelectionInput input)
- Script title that will show up in the menu
-
public String getTitle()
- Script will only listen for selections on the Node tags selected
-
public String[] getSupportedNodeTags()
- Script will only listen for selections on the Edge tags selected
-
public String[] getSupportedEdgeTags()
Registering the script
The fully qualified name of the class with the script should be included in a text file named selectionScripts.atlas in the root of the scala project, one script per line.
For example, if a script is created in Hierarchy.java which is in com.ensoftcorp.atlas.java.example.script
package, then the selectionScript.atlas should have the following on a single line:
com.ensoftcorp.atlas.java.example.script.Hierarchy