cytoscape.editor
Interface CytoscapeEditorFactory

All Known Implementing Classes:
CytoscapeEditorFactoryImpl

public interface CytoscapeEditorFactory

Interface used for building new instances of editors. Before an editor can be built, it first needs to be registered with the CytoscapeEditorManager.

Version:
1.0
Author:
Allan Kuchinsky, Agilent Technologies
See Also:
CytoscapeEditorManager

Field Summary
static CytoscapeEditorFactory INSTANCE
           
 
Method Summary
 void addEditorType(java.lang.String editorType)
          adds an editor type to the collection of editor types
 CytoscapeEditor getEditor(java.lang.String editorType)
          Get the network editor, creating a new one if it doesn't already exist.
 java.util.Collection getEditorTypes()
          Get the set of valid editor types
 NetworkEditEventAdapter getNetworkEditEventAdapter(CytoscapeEditor editor)
          gets an instance of the NetworkEditEventAdaptor associated with the input editor The NetworkEditEventAdapter handles events that are associated with user input to the editor, such as mouse actions, drag/drop, keystrokes.
 

Field Detail

INSTANCE

public static final CytoscapeEditorFactory INSTANCE
Method Detail

getEditor

public CytoscapeEditor getEditor(java.lang.String editorType)
                          throws InvalidEditorException
Get the network editor, creating a new one if it doesn't already exist.

Parameters:
editorType - non null type of editor to get
Returns:
editor
Throws:
InvalidEditorException - if the editor cannot be created

getEditorTypes

public java.util.Collection getEditorTypes()
Get the set of valid editor types

Returns:
non null collection of editor types (String)

addEditorType

public void addEditorType(java.lang.String editorType)
adds an editor type to the collection of editor types

Parameters:
editorType - a name that specifies the type of the editor

getNetworkEditEventAdapter

public NetworkEditEventAdapter getNetworkEditEventAdapter(CytoscapeEditor editor)
gets an instance of the NetworkEditEventAdaptor associated with the input editor The NetworkEditEventAdapter handles events that are associated with user input to the editor, such as mouse actions, drag/drop, keystrokes. Each NetworkEditEventAdapter is specialized for the editor that is is associated with. This is written by the developer and is at the heart of the specialized behaviour of the editor.

Parameters:
editor -
Returns:
the NetworkEditEventAdapter that is assigned to the editor