cytoscape.editor.impl
Class CytoscapeEditorFactoryImpl

java.lang.Object
  extended bycytoscape.editor.impl.CytoscapeEditorFactoryImpl
All Implemented Interfaces:
CytoscapeEditorFactory

public class CytoscapeEditorFactoryImpl
extends java.lang.Object
implements CytoscapeEditorFactory

builds new instances of editors and network edit event adapters. Before an editor and its network edit event adapter can be built, the editor first needs to be registered with the CytoscapeEditorManager.

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

Field Summary
 
Fields inherited from interface cytoscape.editor.CytoscapeEditorFactory
INSTANCE
 
Constructor Summary
CytoscapeEditorFactoryImpl()
           
 
Method Summary
 void addEditorType(java.lang.String editorType)
          adds a new editorType 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.
 CytoscapeEditor getEditor(java.lang.String editorType, java.util.List args)
          get the Cytoscape editor for the specified type
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CytoscapeEditorFactoryImpl

public CytoscapeEditorFactoryImpl()
Method Detail

getEditor

public CytoscapeEditor getEditor(java.lang.String editorType,
                                 java.util.List args)
                          throws InvalidEditorException
get the Cytoscape editor for the specified type

Parameters:
editorType - the type of the editor
args - an arbitrary list of arguments
Returns:
the Cytoscape editor for the specified editor type
Throws:
InvalidEditorException

getEditor

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

Specified by:
getEditor in interface CytoscapeEditorFactory
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

Specified by:
getEditorTypes in interface CytoscapeEditorFactory
Returns:
non null collection of editor types (String)

addEditorType

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

Specified by:
addEditorType in interface CytoscapeEditorFactory
Parameters:
editorType -

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.

Specified by:
getNetworkEditEventAdapter in interface CytoscapeEditorFactory
Parameters:
editor -
Returns:
the NetworkEditEventAdapter that is assigned to the editor