|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.layout.AbstractLayout
public abstract class AbstractLayout
The AbstractLayout provides nice starting point for Layouts written for Cytoscape.
Field Summary | |
---|---|
protected boolean |
canceled
|
protected Dimension |
currentSize
|
protected String |
edgeAttribute
|
protected CyNetwork |
network
|
protected CyNetworkView |
networkView
|
protected String |
nodeAttribute
|
protected static TaskMonitor |
nullTaskMonitor
|
protected HashMap |
propertyMap
|
protected String |
propertyPrefix
|
protected HashMap |
savedPropertyMap
|
protected boolean |
selectedOnly
|
protected Set<NodeView> |
staticNodes
|
protected TaskMonitor |
taskMonitor
|
Constructor Summary | |
---|---|
AbstractLayout()
The Constructor is null |
Method Summary | |
---|---|
abstract void |
construct()
These abstract methods must be overridden. |
void |
doLayout()
doLayout on current network view. |
void |
doLayout(CyNetworkView nview)
doLayout on specified network view. |
void |
doLayout(CyNetworkView nview,
TaskMonitor monitor)
doLayout on specified network view with specified monitor. |
List<String> |
getInitialAttributeList()
This returns the list of "attributes" that are provided by an algorithm for internal purposes. |
abstract String |
getName()
getName is used to construct property strings for this layout. |
LayoutProperties |
getSettings()
Property handling -- these must be overridden by any algorithms that want to use properties or have a settings UI. |
JPanel |
getSettingsPanel()
Returns a JPanel to be used as part of the Settings dialog for this layout algorithm. |
void |
halt()
Halt the algorithm. |
protected void |
initialize_local()
Initializes all local information, and is called immediately within the initialize() process. |
void |
initialize()
Initializer, calls intialize_local to start construction process. |
protected boolean |
isLocked(NodeView v)
|
void |
lockNode(NodeView v)
Lock this node (i.e. |
void |
lockNodes(NodeView[] nodes)
Lock these nodes (i.e. |
protected void |
resetLabelPositions()
Deletes labelPosition attribute of selected nodes (if selectedOnly) or all nodes This has the effect of moving labels back to their parent nodes position |
void |
revertSettings()
Property handling -- these must be overridden by any algorithms that want to use properties or have a settings UI. |
void |
setLayoutAttribute(String attributeName)
Set the name of the attribute to use for attribute dependent layout algorithms. |
void |
setSelectedOnly(boolean selectedOnly)
Set the flag that indicates that this algorithm should only operate on the currently selected nodes. |
byte[] |
supportsEdgeAttributes()
Returns the types of edge attributes supported by this algorithm. |
byte[] |
supportsNodeAttributes()
Returns the types of node attributes supported by this algorithm. |
boolean |
supportsSelectedOnly()
These methods should be overridden |
abstract String |
toString()
toString is used to get the user-visible name of the layout |
void |
unlockAllNodes()
Unlock all nodes |
void |
unlockNode(NodeView v)
Unlock this node |
void |
updateSettings()
Property handling -- these must be overridden by any algorithms that want to use properties or have a settings UI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Set<NodeView> staticNodes
protected CyNetworkView networkView
protected CyNetwork network
protected boolean selectedOnly
protected String edgeAttribute
protected String nodeAttribute
protected boolean canceled
protected Dimension currentSize
protected HashMap propertyMap
protected HashMap savedPropertyMap
protected TaskMonitor taskMonitor
protected static TaskMonitor nullTaskMonitor
protected String propertyPrefix
Constructor Detail |
---|
public AbstractLayout()
Method Detail |
---|
public abstract void construct()
public abstract String getName()
getName
in interface CyLayoutAlgorithm
public abstract String toString()
toString
in class Object
public boolean supportsSelectedOnly()
supportsSelectedOnly
in interface CyLayoutAlgorithm
public void setSelectedOnly(boolean selectedOnly)
setSelectedOnly
in interface CyLayoutAlgorithm
selectedOnly
- set to "true" if the algorithm should
only apply to selected nodes onlypublic byte[] supportsNodeAttributes()
supportsNodeAttributes
in interface CyLayoutAlgorithm
public byte[] supportsEdgeAttributes()
supportsEdgeAttributes
in interface CyLayoutAlgorithm
public void setLayoutAttribute(String attributeName)
setLayoutAttribute
in interface CyLayoutAlgorithm
attributeName
- The name of the attributepublic List<String> getInitialAttributeList()
getInitialAttributeList
in interface CyLayoutAlgorithm
public JPanel getSettingsPanel()
getSettingsPanel
in interface CyLayoutAlgorithm
public void revertSettings()
revertSettings
in interface CyLayoutAlgorithm
public void updateSettings()
updateSettings
in interface CyLayoutAlgorithm
public LayoutProperties getSettings()
getSettings
in interface CyLayoutAlgorithm
public void doLayout()
doLayout
in interface CyLayoutAlgorithm
public void doLayout(CyNetworkView nview)
doLayout
in interface CyLayoutAlgorithm
nview
- the CyNetworkView on which to perform the layoutpublic void doLayout(CyNetworkView nview, TaskMonitor monitor)
doLayout
in interface CyLayoutAlgorithm
nview
- the CyNetworkView on which to perform the layoutmonitor
- the task monitor to usepublic void initialize()
protected void initialize_local()
public void lockNodes(NodeView[] nodes)
lockNodes
in interface CyLayoutAlgorithm
nodes
- An array of NodeView's to lockpublic void lockNode(NodeView v)
lockNode
in interface CyLayoutAlgorithm
v
- A NodeView to lockpublic void unlockNode(NodeView v)
unlockNode
in interface CyLayoutAlgorithm
v
- A NodeView to unlockprotected boolean isLocked(NodeView v)
public void unlockAllNodes()
unlockAllNodes
in interface CyLayoutAlgorithm
public void halt()
halt
in interface CyLayoutAlgorithm
protected void resetLabelPositions()
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |