|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CytoscapeEditor provides a framework for developers to implement specialized, semantics driven graphical editors and incorporate them into Cytoscape. For example, a developer might build a BioPAX editor whose operations adhere to the semantics of the BioPAX specification. The basic idea of the framework is to provide, on the Cytotoscape side, a set of common operations that all editors would use to interact with the Cytoscape environment. Such common operations include drag/drop support, mouse event handling, management of CyNetworks and CyNetworkViews, and wrappers for Cytoscape core methods that add and delete Cytoscape nodes and edges.
CytoscapeEditor is an interface that specifies common methods which all editors must implement. These methods will be called by methods in the framework.
Method Summary | |
cytoscape.CyEdge |
addEdge(giny.model.Node node_1,
giny.model.Node node_2,
java.lang.String attribute,
java.lang.Object attribute_value)
wrapper for adding an edge in Cytoscape. |
cytoscape.CyEdge |
addEdge(giny.model.Node node_1,
giny.model.Node node_2,
java.lang.String attribute,
java.lang.Object attribute_value,
boolean create)
wrapper for adding an edge in Cytoscape. |
cytoscape.CyEdge |
addEdge(giny.model.Node node_1,
giny.model.Node node_2,
java.lang.String attribute,
java.lang.Object attribute_value,
boolean create,
java.lang.String edgeType)
wrapper for adding an edge in Cytoscape. |
cytoscape.CyEdge |
addEdge(giny.model.Node node_1,
giny.model.Node node_2,
java.lang.String attribute,
java.lang.Object attribute_value,
java.lang.String edgeType)
wrapper for adding an edge in Cytoscape. |
cytoscape.CyNode |
addNode(java.lang.String nodeName)
wrapper for adding a node in Cytoscape. |
cytoscape.CyNode |
addNode(java.lang.String nodeName,
java.lang.String nodeType)
wrapper for adding a node in Cytoscape. |
cytoscape.CyNode |
addNode(java.lang.String nodeName,
java.lang.String attribute,
java.lang.String value)
wrapper for adding a node in Cytoscape. |
cytoscape.CyNode |
addNode(java.lang.String nodeName,
java.lang.String attribute,
java.lang.String value,
java.awt.geom.Point2D location)
wrapper for adding a node in Cytoscape. |
void |
buildVisualStyle()
build the visual style for this editor should be overidden by specialized editors |
void |
deleteEdge(cytoscape.CyEdge edge)
Deletes (hides) an edge from the current network |
void |
deleteNode(giny.model.Node node)
Deletes (hides) a node from the current network |
void |
disableControls(java.util.List args)
specialized code that disables and/or removes controls when a ntework view changes, should be overridden by the developer |
void |
enableControls(java.util.List args)
specialized code that enables and/or adds controls when a network view changes. |
java.lang.String |
getControllingEdgeAttribute()
|
java.lang.String |
getControllingNodeAttribute()
|
java.lang.String |
getEditorName()
gets the name of the editor |
NetworkEditEventAdapter |
getNetworkEditEventAdapter()
|
void |
initializeControls(java.util.List args)
specialized initialization code for editor, called by CyNetworkEditorFactory, should be overridden |
void |
setControllingEdgeAttribute(java.lang.String controllingEdgeAttribute)
|
void |
setControllingNodeAttribute(java.lang.String controllingNodeAttribute)
|
void |
setEditorName(java.lang.String editorName)
set the name of the editor. |
void |
setNetworkEditEventAdapter(NetworkEditEventAdapter adapter)
|
Methods inherited from interface cytoscape.data.FlagEventListener |
onFlagEvent |
Method Detail |
public void buildVisualStyle()
public void initializeControls(java.util.List args)
args
- an arbitrary list of arguments to be used in initializing the editorpublic void disableControls(java.util.List args)
args
- arbitrary list of argumentspublic void enableControls(java.util.List args)
args
- public void setEditorName(java.lang.String editorName)
editorName
- public java.lang.String getEditorName()
public cytoscape.CyNode addNode(java.lang.String nodeName, java.lang.String attribute, java.lang.String value)
nodeName
- the name of the node to be created. This will be used as a
unique identifier for the node.attribute
- a defining property for the node, that can be used in
conjunction with the Visual Mapper to assign visual
characteristics to different types of nodes. Also can be used,
by the canvas when handling a dropped item, to distinguish
between nodes and edges, so should be set to something like
"NodeType".value
- the value of the attribute for this node. This can be used in
conjunction with the Visual Mapper to assign visual
characteristics to different types of nodes, for example to
assign a violet diamond shape to a 'smallMolecule' node type.
public cytoscape.CyNode addNode(java.lang.String nodeName, java.lang.String attribute, java.lang.String value, java.awt.geom.Point2D location)
nodeName
- the name of the node to be created. This will be used as a
unique identifier for the node.attribute
- a defining property for the node, that can be used in
conjunction with the Visual Mapper to assign visual
characteristics to different types of nodes. Also can be used,
by the canvas when handling a dropped item, to distinguish
between nodes and edges, so should be set to something like
"NodeType".value
- the value of the attribute for this node. This can be used in
conjunction with the Visual Mapper to assign visual
characteristics to different types of nodes, for example to
assign a violet diamond shape to a 'smallMolecule' node type.location
- position at which to add the node
public cytoscape.CyNode addNode(java.lang.String nodeName, java.lang.String nodeType)
nodeName
- the name of the node to be created. This will be used as a
unique identifier for the node.nodeType
- the value of the 'NodeType' attribute for this node. This can
be used in conjunction with the Visual Mapper to assign visual
characteristics to different types of nodes. Also can be used,
by the canvas when handling, a dropped item, to distinguish
between nodes and edges.
public cytoscape.CyNode addNode(java.lang.String nodeName)
nodeName
- the name of the node to be created. This will be used as a
unique identifier for the node.
public cytoscape.CyEdge addEdge(giny.model.Node node_1, giny.model.Node node_2, java.lang.String attribute, java.lang.Object attribute_value, boolean create, java.lang.String edgeType)
node_1
- Node at one end of the edgenode_2
- Node at the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTIONattribute_value
- a value for the attribute, like "pp" or "default"create
- if true, then create an edge if one does not already exist.
Otherwise, return the edge if it already exists.edgeType
- a value for the "EdgeType" attribute assigned to the edge.
This can be used in conjunction with the Visual Mapper.
public cytoscape.CyEdge addEdge(giny.model.Node node_1, giny.model.Node node_2, java.lang.String attribute, java.lang.Object attribute_value)
node_1
- Node at one end of the edgenode_2
- Node at the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTIONattribute_value
- a value for the attribute, like "pp" or "default"
public cytoscape.CyEdge addEdge(giny.model.Node node_1, giny.model.Node node_2, java.lang.String attribute, java.lang.Object attribute_value, java.lang.String edgeType)
node_1
- Node at one end of the edgenode_2
- Node at the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTIONattribute_value
- a value for the attribute, like "pp" or "default"edgeType
- a value for the "EdgeType" attribute assigned to the edge.
This can be used in conjunction with the Visual Mapper.
public cytoscape.CyEdge addEdge(giny.model.Node node_1, giny.model.Node node_2, java.lang.String attribute, java.lang.Object attribute_value, boolean create)
node_1
- Node at one end of the edgenode_2
- Node at the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTIONattribute_value
- a value for the attribute, like "pp" or "default"create
- if true, then create an edge if one does not already exist.
Otherwise, return the edge if it already exists.
public void deleteNode(giny.model.Node node)
node
- the node to be deletedpublic void deleteEdge(cytoscape.CyEdge edge)
edge
- the edge to be deletedpublic java.lang.String getControllingEdgeAttribute()
public void setControllingEdgeAttribute(java.lang.String controllingEdgeAttribute)
controllingEdgeAttribute
- the name of the attribute used to determine edge shapes on palette
this is the same as the controllingEdgeAttribute for mapping of visual style to edge line type, target arrowpublic java.lang.String getControllingNodeAttribute()
public void setControllingNodeAttribute(java.lang.String controllingNodeAttribute)
controllingNodeAttribute
- the name of the attribute used to determine Node shapes on palette
this is the same as the controllingNodeAttribute for mapping of visual style to Node line type, target arrowpublic NetworkEditEventAdapter getNetworkEditEventAdapter()
public void setNetworkEditEventAdapter(NetworkEditEventAdapter adapter)
adapter
- the network event handler that is associated with this editor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |