|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.editor.CytoscapeEditorManager
The CytoscapeEditorManager is the central class in the editor framework API. It maintains the state of the editing environment, maintains global state information, and implements static methods for editor registration, editor invocation (via CytoscapeEditorFactory), node/edge addition, undo/redo.
CytoscapeEditorFactory, CytoscapeEditorManagerSupport
Field Summary | |
static java.lang.String |
ANY_VISUAL_STYLE
|
static java.lang.String |
BIOPAX_NODE_TYPE
attribute used for BioPAX-like editor |
static java.lang.String |
CYTOSCAPE_EDITOR
AJK: 06/19/06 CytoscapeEditor class descriptor -- for checking against NETWORK_MODIFIED events |
static java.lang.String |
DEFAULT_EDITOR_TYPE
|
static java.lang.String |
EDGE_TYPE
CytoscapeAttribute: EDGE_TYPE |
static cytoscape.data.CyAttributes |
edgeAttribs
main data structure for all edge attributes |
static CytoscapeEditorManagerSupport |
manager
subsidiary class which implements methods that require non-static references, e.g. |
static java.lang.String |
NODE_TYPE
CytoscapeAttribute: NODE_TYPE |
static cytoscape.data.CyAttributes |
nodeAttribs
main data structure for all node attributes |
Constructor Summary | |
CytoscapeEditorManager()
|
Method Summary | |
static void |
addEdgeTypeForVisualStyle(cytoscape.visual.VisualStyle vizStyle,
java.lang.String edgeType)
adds an edge type to the mappings kept between visual style and its EDGE_TYPE attribute values |
static void |
addEdit(javax.swing.undo.UndoableEdit edit)
adds an undoable edit to the UndoManager. |
static void |
addHiddenEdgeForNetwork(cytoscape.CyNetwork net,
int edgeIdx)
adds an edge to the list of edges hidden from network |
static void |
addHiddenNodeForNetwork(cytoscape.CyNetwork net,
int nodeIdx)
adds a node to the list of nodes hidden from network |
static java.lang.String |
createUniqueNetworkName()
generate a unique name for the network under construction, utilizing time stamp |
static CytoscapeEditor |
getCurrentEditor()
Returns the editor being currently used in Cytoscape. |
static ShapePalette |
getCurrentShapePalette()
|
static float |
getDefaultBorderWidth()
returns the default node border width. |
static cern.colt.list.IntArrayList |
getEdgeClipBoard()
clipboard for storing deleted edges. |
static java.util.List |
getEdgeTypesForVisualStyle(cytoscape.visual.VisualStyle vizStyle)
|
static CytoscapeEditor |
getEditorForView(cytoscape.view.CyNetworkView view)
get the editor that is assigned to this CyNetworkView |
static int[] |
getHiddenEdgesForNetwork(cytoscape.CyNetwork net)
returns edges hidden from network |
static int[] |
getHiddenNodesForNetwork(cytoscape.CyNetwork net)
returns nodes hidden from network |
static NetworkEditEventAdapter |
getNetworkEditEventAdapter(CytoscapeEditor editor)
returns the network edit event adapter associated with the editor |
static cern.colt.list.IntArrayList |
getNodeClipBoard()
clipboard for storing deleted nodes. |
static ShapePalette |
getShapePaletteForView(cytoscape.view.CyNetworkView view)
get the ShapePalette that is associated with a CyNetworkView. |
static NetworkEditEventAdapter |
getViewNetworkEditEventAdapter(cytoscape.view.CyNetworkView view)
retrieves the adapter that handles drags/drops, other mouse events on the canvas |
static void |
initialize()
initial setup of controls, menu items, undo/redo actions, and keyboard accelerators |
static NetworkEditEventAdapter |
initializeEditEventAdapter(CytoscapeEditor editor,
java.lang.String adapterName)
builds the named event handler and associates it with the input editor |
static CytoscapeEditor |
initializeEditor(java.lang.String editorName,
java.lang.String networkEditAdapterName)
initialize the editor as a side-effect of registering it. |
static boolean |
isEditingEnabled()
|
static boolean |
isRunningEditorFramework()
flag that indicates whether or not the editor framework is running |
static boolean |
isSettingUpEditor()
|
static void |
register(java.lang.String editorName)
sets up menus for invoking the editor |
static void |
register(java.lang.String editorName,
java.lang.String networkEditAdapterName)
makes the system aware of the editor. |
static void |
register(java.lang.String editorName,
java.lang.String networkEditAdapterName,
java.lang.String visualStyleName)
makes the system aware of the editor. |
static void |
register(java.lang.String editorName,
java.lang.String networkEditAdapterName,
java.lang.String controllingNodeAttribute,
java.lang.String controllingEdgeAttribute)
makes the system aware of the editor. |
static void |
register(java.lang.String editorName,
java.lang.String networkEditAdapterName,
java.lang.String controllingNodeAttribute,
java.lang.String controllingEdgeAttribute,
java.lang.String visualStyleName)
makes the system aware of the editor. |
static void |
resetAttributes(java.lang.String oldId,
java.lang.String newId,
cytoscape.data.CyAttributes attrs)
reset attributes for a CyNode whose identifier has been reset, basically by copying over attributes from old identifier to new identifier |
static void |
setCurrentEditor(CytoscapeEditor currentEditor)
|
static void |
setCurrentShapePalette(ShapePalette currentShapePalette)
|
static void |
setDefaultBorderWidth(float defaultBorderWidth)
sets the default node border width. |
static void |
setDefaultEditor(CytoscapeEditor defaultEditor)
|
static void |
setEditingEnabled(boolean editingEnabled)
|
static void |
setEditorForView(cytoscape.view.CyNetworkView view,
CytoscapeEditor editor)
set the editor for a CyNetworkView |
static void |
setEventHandlerForView(cytoscape.view.CyNetworkView view)
sets mapping of event handler to CyNetworkView. |
static void |
setRunningEditorFramework(boolean runningEditorFramework)
set the flag that indicates whether or not the editor framework is running. |
static void |
setSettingUpEditor(boolean settingUpEditor)
|
static void |
setShapePaletteForView(cytoscape.view.CyNetworkView view,
ShapePalette shape)
sets the ShapePalette that is associated with a CyNetworkView. |
static void |
setupNewNetworkView(cytoscape.view.CyNetworkView newView)
Handles the logistics of setting up a New Network view. |
static void |
setViewNetworkEditEventAdapter(cytoscape.view.CyNetworkView view,
NetworkEditEventAdapter event)
set the adapter that handles drags/drops, other mouse events on the canvas. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static CytoscapeEditorManagerSupport manager
public static final java.lang.String NODE_TYPE
public static final java.lang.String BIOPAX_NODE_TYPE
public static final java.lang.String EDGE_TYPE
public static final java.lang.String ANY_VISUAL_STYLE
public static final java.lang.String DEFAULT_EDITOR_TYPE
public static final java.lang.String CYTOSCAPE_EDITOR
public static cytoscape.data.CyAttributes nodeAttribs
public static cytoscape.data.CyAttributes edgeAttribs
Constructor Detail |
public CytoscapeEditorManager()
Method Detail |
public static void initialize()
public static CytoscapeEditor initializeEditor(java.lang.String editorName, java.lang.String networkEditAdapterName)
editorName
- networkEditAdapterName
-
public static NetworkEditEventAdapter initializeEditEventAdapter(CytoscapeEditor editor, java.lang.String adapterName)
editor
- adapterName
-
public static NetworkEditEventAdapter getNetworkEditEventAdapter(CytoscapeEditor editor)
editor
- the CytoscapeEditorpublic static void register(java.lang.String editorName)
editorName
- text for editor name, to appear in menuspublic static void register(java.lang.String editorName, java.lang.String networkEditAdapterName)
editorName
- specifies the 'type' of the editornetworkEditAdapterName
- every editor has a NetworkEditEventHandler that handles user
input in in a way that is specialized for that editor. This is
the heart of the editors behaviour.public static void register(java.lang.String editorName, java.lang.String networkEditAdapterName, java.lang.String visualStyleName)
editorName
- specifies the 'type' of the editornetworkEditAdapterName
- every editor has a NetworkEditEventHandler that handles user
input in in a way that is specialized for that editor. This is
the heart of the editors behaviour.visualStyleName
- specifies the visual style that is to be associated with the editorpublic static void register(java.lang.String editorName, java.lang.String networkEditAdapterName, java.lang.String controllingNodeAttribute, java.lang.String controllingEdgeAttribute)
editorName
- specifies the 'type' of the editornetworkEditAdapterName
- every editor has a NetworkEditEventHandler that handles user
input in in a way that is specialized for that editor. This is
the heart of the editors behaviour.controllingNodeAttribute
- attribute used by the visual style to map node attribute values into
shapes, colors of nodes on palettecontrollingEdgeAttribute
- attribute used by the visual style to map edge attribute values into
target arrows, line types of edges on palettepublic static void register(java.lang.String editorName, java.lang.String networkEditAdapterName, java.lang.String controllingNodeAttribute, java.lang.String controllingEdgeAttribute, java.lang.String visualStyleName)
editorName
- specifies the 'type' of the editornetworkEditAdapterName
- every editor has a NetworkEditEventHandler that handles user
input in in a way that is specialized for that editor. This is
the heart of the editors behaviour.controllingNodeAttribute
- attribute used by the visual style to map node attribute values into
shapes, colors of nodes on palettecontrollingEdgeAttribute
- attribute used by the visual style to map edge attribute values into
target arrows, line types of edges on palettevisualStyleName
- specifies the visual style that is to be associated with the editorpublic static void setupNewNetworkView(cytoscape.view.CyNetworkView newView)
newView
- the NetworkView being createdpublic static void setEventHandlerForView(cytoscape.view.CyNetworkView view)
view
- public static void setViewNetworkEditEventAdapter(cytoscape.view.CyNetworkView view, NetworkEditEventAdapter event)
view
- the Network Viewevent
- the NetworkEditEventHandler associated with the view.public static NetworkEditEventAdapter getViewNetworkEditEventAdapter(cytoscape.view.CyNetworkView view)
public static CytoscapeEditor getEditorForView(cytoscape.view.CyNetworkView view)
view
- a CyNetworkView
public static ShapePalette getShapePaletteForView(cytoscape.view.CyNetworkView view)
view
-
public static void setShapePaletteForView(cytoscape.view.CyNetworkView view, ShapePalette shape)
view
- shape
- public static int[] getHiddenNodesForNetwork(cytoscape.CyNetwork net)
net
-
public static int[] getHiddenEdgesForNetwork(cytoscape.CyNetwork net)
net
-
public static void addHiddenNodeForNetwork(cytoscape.CyNetwork net, int nodeIdx)
net
- nodeIdx
- index of the node to be addedpublic static void addHiddenEdgeForNetwork(cytoscape.CyNetwork net, int edgeIdx)
net
- edgeIdx
- index of the edge to be addedpublic static void addEdgeTypeForVisualStyle(cytoscape.visual.VisualStyle vizStyle, java.lang.String edgeType)
vizStyle
- edgeType
- public static java.util.List getEdgeTypesForVisualStyle(cytoscape.visual.VisualStyle vizStyle)
vizStyle
-
public static void setEditorForView(cytoscape.view.CyNetworkView view, CytoscapeEditor editor)
view
- the CyNetworkVieweditor
- the editor to be assigned to the CyNetworkViewpublic static void addEdit(javax.swing.undo.UndoableEdit edit)
edit
- the edit method to be added to the UndoManager.public static cern.colt.list.IntArrayList getNodeClipBoard()
public static cern.colt.list.IntArrayList getEdgeClipBoard()
public static CytoscapeEditor getCurrentEditor()
public static void setCurrentEditor(CytoscapeEditor currentEditor)
currentEditor
- the editor being currently usedpublic static float getDefaultBorderWidth()
public static void setDefaultBorderWidth(float defaultBorderWidth)
public static boolean isRunningEditorFramework()
public static void setRunningEditorFramework(boolean runningEditorFramework)
public static boolean isEditingEnabled()
public static void setEditingEnabled(boolean editingEnabled)
editingEnabled
- The editingEnabled to set.public static ShapePalette getCurrentShapePalette()
public static void setCurrentShapePalette(ShapePalette currentShapePalette)
currentShapePalette
- The currentShapePalette to set.public static void setDefaultEditor(CytoscapeEditor defaultEditor)
defaultEditor
- The defaultEditor to set.public static boolean isSettingUpEditor()
public static void setSettingUpEditor(boolean settingUpEditor)
settingUpEditor
- The settingUpEditor to set.public static java.lang.String createUniqueNetworkName()
public static void resetAttributes(java.lang.String oldId, java.lang.String newId, cytoscape.data.CyAttributes attrs)
oldId
- old node identifiernewId
- new node identifierattrs
- attributes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |