ca.uvic.csr.shrimp.ScriptingBean
Interface MainViewScriptingBean


public interface MainViewScriptingBean

This is the interface of the scripting support for the MainView.

Author:
Nasir Rather

Method Summary
 void alert(java.lang.String message)
          Modal dialog with no title
 void alert(java.lang.String message, java.lang.String title)
          displays a modal dialog with a message
 void changeZoomMode(java.lang.String newMode)
          Sets the zoom mode for the MainView.
 void clearComposites()
           
 void closeAllDescendents()
          Close all descendants of the selected node(s).
 void closeSelectedNodes()
          Closes the selected node(s) (hides the children if showing).
 void createComposites(java.lang.String[] arcTypes)
           
 void filterAllArcs(boolean filter)
          Filters or unfilters all arcs from the display
 void filterAllArtifactDataTypes(boolean filter)
          Filters or unfilters all artifact types from the data.
 void filterAllNodes(boolean filter)
          Filters or unfilters all nodes from the display
 void filterAllRelationshipDataTypes(boolean filter)
          Filters or unfilters all relationship types from the data.
 void filterArcsByType(java.lang.String type, boolean filter)
          Filters or unfilters arcs of String type from the display
 void filterArtifactDataType(java.lang.String type, boolean filter)
          Filters or unfilters artifacts of a specific type from the data.
 void filterNodesByType(java.lang.String type, boolean filter)
          Filters or unfilters nodes of String type from the display.
 void filterRelationshipDataType(java.lang.String type, boolean filter)
          Filters or unfilters relationships of a specific type from the data.
 void filterSelectedNodes()
          Filter the selected node(s).
 void focusOnHome()
          Zoom back to the root node.
 void layoutChildren(java.lang.String newLayoutMode)
          Layout children of the selected node(s).
 void layoutSelected(java.lang.String newLayoutMode)
          Layout selected node(s).
 void navigateToNode(java.lang.String name)
          Causes the view to navigate to the node with the given name.
 void openAllDescendents()
          Open all descendants of the selected node(s).
 void openSelectedNodes()
          Shows the children (if any) of the selected node(s).
 void pause(long time)
          Pauses any further script operation for time ms.
 java.lang.String prompt(java.lang.String message, java.lang.String title)
          displays a modal dialog with an input field
 void redoAction()
          Redo the action that was previously undone.
 void refresh()
          Causes the display to refresh.
 void selectAllChildren()
          Select all children of the selected node(s).
 void selectAllDescendents()
          Select all descendants of the selected node(s).
 void selectConnectedNodes()
           
 void selectInverseSiblings()
          De-selects the currently selected nodes, and selects their unselected siblings instead.
 void selectNodesByName(java.lang.String name, boolean selectAllOccurances, boolean clearPreviouslySelected, boolean exactMatch, boolean caseSensitive)
          Selects the nodes identified by name.
 void selectNodesByType(java.lang.String type, boolean clearPreviouslySelected)
          Selects all nodes of a specific type
 void selectRoots()
           
 void setHierarchy(java.lang.String[] cprels)
          Change the child-parent relationships.
 void setLabelMode(java.lang.String mode)
          Change the display of labels.
 void showDialog(java.lang.String message)
          displays a non-modal dialog with a message
 void showDialog(java.lang.String message, java.lang.String title)
          displays a non-modal dialog with a message and title
 void takeSnapShot(boolean askForComments)
          Take a snapShot of the MainView and add it to the Filmstrip.
 void undoAction()
          Undo an action.
 void unFilterAllArtifacts()
          Unfilter all the previously filtered artifacts.
 

Method Detail

selectNodesByName

public void selectNodesByName(java.lang.String name,
                              boolean selectAllOccurances,
                              boolean clearPreviouslySelected,
                              boolean exactMatch,
                              boolean caseSensitive)
Selects the nodes identified by name.

Parameters:
name - - String name of the node.
selectAllOccurances - - boolean whether to select all occurances of nodes with this name, or just the first one come across
clearPreviouslySelected - - boolean whether to clear previous selection.
exactMatch - Whether or not match the name exactly
caseSensitive - Whether or not to consider case in the match.

selectRoots

public void selectRoots()

selectNodesByType

public void selectNodesByType(java.lang.String type,
                              boolean clearPreviouslySelected)
Selects all nodes of a specific type

Parameters:
type -
clearPreviouslySelected -

selectInverseSiblings

public void selectInverseSiblings()
De-selects the currently selected nodes, and selects their unselected siblings instead.


openSelectedNodes

public void openSelectedNodes()
Shows the children (if any) of the selected node(s).


closeSelectedNodes

public void closeSelectedNodes()
Closes the selected node(s) (hides the children if showing).


openAllDescendents

public void openAllDescendents()
Open all descendants of the selected node(s).


closeAllDescendents

public void closeAllDescendents()
Close all descendants of the selected node(s).


setHierarchy

public void setHierarchy(java.lang.String[] cprels)
Change the child-parent relationships.

Parameters:
cprels - new child-parent relationships.

setLabelMode

public void setLabelMode(java.lang.String mode)
Change the display of labels.

.SCALE_BY_NODE_SIZE produces the fastest drawing time

Parameters:
mode - - one of ShrimpConstants.FIXED, ShrimpConstants.SCALE_BY_NODE_SIZE, or ShrimpConstants.SCALE_BY_LEVEL

takeSnapShot

public void takeSnapShot(boolean askForComments)
Take a snapShot of the MainView and add it to the Filmstrip.

Parameters:
askForComments - - boolean whether to ask for comments.

selectAllChildren

public void selectAllChildren()
Select all children of the selected node(s).


selectAllDescendents

public void selectAllDescendents()
Select all descendants of the selected node(s).


layoutChildren

public void layoutChildren(java.lang.String newLayoutMode)
Layout children of the selected node(s).

Parameters:
newLayoutMode - - String new layout mode @see ca.uvic.csr.shrimp.ShrimpConstants

layoutSelected

public void layoutSelected(java.lang.String newLayoutMode)
Layout selected node(s).

Parameters:
newLayoutMode - - String new layout mode @see ca.uvic.csr.shrimp.ShrimpConstants

filterSelectedNodes

public void filterSelectedNodes()
Filter the selected node(s).


filterAllArcs

public void filterAllArcs(boolean filter)
Filters or unfilters all arcs from the display

Parameters:
filter - - boolean, show or hide all arcs

filterAllNodes

public void filterAllNodes(boolean filter)
Filters or unfilters all nodes from the display

Parameters:
filter - - boolean, show or hide all nodes

filterArcsByType

public void filterArcsByType(java.lang.String type,
                             boolean filter)
Filters or unfilters arcs of String type from the display

Parameters:
type - - String type of the arcs.
filter - - boolean whether to show or hide the arcs.

filterNodesByType

public void filterNodesByType(java.lang.String type,
                              boolean filter)
Filters or unfilters nodes of String type from the display.

Parameters:
type - - String type of the nodes.
filter - - boolean whether to show or hide the nodes.

filterArtifactDataType

public void filterArtifactDataType(java.lang.String type,
                                   boolean filter)
Filters or unfilters artifacts of a specific type from the data. Nodes of the same type will be filtered or unfiltered from the display.

Parameters:
type -
filter - show or hide artifacts of the given type

filterRelationshipDataType

public void filterRelationshipDataType(java.lang.String type,
                                       boolean filter)
Filters or unfilters relationships of a specific type from the data. Arcs of the same type will be filtered or unfiltered from the display.

Parameters:
type -
filter - show or hide relationships of the given type

filterAllArtifactDataTypes

public void filterAllArtifactDataTypes(boolean filter)
Filters or unfilters all artifact types from the data. All nodes will be filtered or unfiltered from the display.

Parameters:
filter - show or hide all artifacts

filterAllRelationshipDataTypes

public void filterAllRelationshipDataTypes(boolean filter)
Filters or unfilters all relationship types from the data. All arcs will be filtered or unfiltered from the display.

Parameters:
filter - show or hide all relationships

unFilterAllArtifacts

public void unFilterAllArtifacts()
Unfilter all the previously filtered artifacts.


focusOnHome

public void focusOnHome()
Zoom back to the root node.


redoAction

public void redoAction()
Redo the action that was previously undone.


undoAction

public void undoAction()
Undo an action. NOTE: not all actions a user performs can be undone.


changeZoomMode

public void changeZoomMode(java.lang.String newMode)
Sets the zoom mode for the MainView. This mode determines what happens when a user tries to zoom using the proper input (X, Z keys on the keyboard or the middle mouse button are the defaults).

Parameters:
newMode - - String new mode @see ca.uvic.csr.shrimp.ShrimpConstants

navigateToNode

public void navigateToNode(java.lang.String name)
Causes the view to navigate to the node with the given name. If there are multiple nodes in the display with the same name, the first one found will be used.

Parameters:
name -

showDialog

public void showDialog(java.lang.String message)
displays a non-modal dialog with a message

Parameters:
message - - String new message to display

showDialog

public void showDialog(java.lang.String message,
                       java.lang.String title)
displays a non-modal dialog with a message and title

Parameters:
message - - String new message to display
title - - String the title of the dialog

alert

public void alert(java.lang.String message)
Modal dialog with no title

Parameters:
message - - String new message to display

alert

public void alert(java.lang.String message,
                  java.lang.String title)
displays a modal dialog with a message

Parameters:
message - - String new message to display
title - - String the title of the dialog

prompt

public java.lang.String prompt(java.lang.String message,
                               java.lang.String title)
displays a modal dialog with an input field

Parameters:
message - - String new message to display
title - - String the title of the dialog
Returns:
String - indicating the value the user typed

pause

public void pause(long time)
Pauses any further script operation for time ms.

Parameters:
time - - long time in ms.

refresh

public void refresh()
Causes the display to refresh.


selectConnectedNodes

public void selectConnectedNodes()

createComposites

public void createComposites(java.lang.String[] arcTypes)

clearComposites

public void clearComposites()