Java Doc for JaWEGraphModel.java in  » Workflow-Engines » JaWE » org » enhydra » jawe » components » graph » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » JaWE » org.enhydra.jawe.components.graph 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.undo.UndoableEditSupport
      org.enhydra.jawe.components.graph.JaWEGraphModel

JaWEGraphModel
public class JaWEGraphModel extends UndoableEditSupport implements Serializable,GraphModel(Code)
A process editor implementation of a graph model.
author:
   Sasa Bojanic

Inner Class :public class GraphModelEdit extends CompoundEdit implements GraphModelEvent.GraphModelChange
Inner Class :public class GraphModelLayerEdit extends AbstractUndoableEdit implements GraphModelEvent.GraphModelChange
Inner Class :public static class EmptyIterator implements Iterator,Serializable

Field Summary
protected  booleanasksAllowsChildren
     Indicates whether isLeaf is based on a node's allowsChildren value.
protected transient  IteratoremptyIterator
     Default instance of an empty iterator.
protected transient  EventListenerListlistenerList
     The list of listeners that listen to the model.
protected  Listroots
     Set that contains all root cells of this model.

Constructor Summary
public  JaWEGraphModel()
     Constructs a model that is not an attribute store.

Method Summary
public  booleanacceptsSource(Object edge, Object port)
     Returns true if port is a valid source for edge.
public  booleanacceptsTarget(Object edge, Object port)
     Returns true if port is a valid target for edge.
public  voidaddGraphModelListener(GraphModelListener l)
     Adds a listener for the GraphModelEvent posted after the graph changes.
public  voidcellsChanged(Object[] cells)
    
protected  ObjectcloneCell(Object cellObj, Object parent)
     Creates a shallow copy of the cell including a copy of the user object and a reference to the parent (which is a clone of the old parent or null).
public static  ObjectcloneCell(GraphModel model, Object cell)
     Returns a deep clone of the specified cell, including all children.
public static  Object[]cloneCell(GraphModel model, Object[] cells)
     Returns a deep clone of the specified cells, including all children.
public  MapcloneCells(Object[] cells)
     Returns a map of (cell, clone)-pairs for all cells and their children.
protected  ObjectcloneUserObject(Object userObject)
     Clones the user object.
protected  voidconnect(Object edge, Object port, boolean isSource, boolean insert)
     Connects or disconnects the edge and port in this model based on remove.
public  booleancontains(Object node)
     Returns true if node or one of its ancestors is in the model.
public static  booleancontainsEdgeBetween(GraphModel model, Object v1, Object v2)
     Returns true if the given vertices are conntected by a single edge in this document.
protected  GraphModelEditcreateCellEdit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits, String name)
     Returns an edit that represents a change.
protected  GraphModelEditcreateEdit(Object[] inserted, Object[] removed, Map attributes, ConnectionSet cs, ParentMap pm, String name)
    
protected  GraphModelEditcreateInsertEdit(Object[] cells, Map attributeMap, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits, String name)
     Returns an edit that represents an insert.
protected  GraphModelLayerEditcreateLayerEdit(Object[] cells, int layer)
    
protected  GraphModelEditcreateRemoveAndCellEdit(Object[] cells, Map attributes, String name)
     Returns an edit that represents a remove and a change.
protected  GraphModelEditcreateRemoveEdit(Object[] cells, String name)
     Returns an edit that represents a remove.
public  Iteratoredges(Object port)
     Returns an iterator of the edges connected to port. port must be a object previously obtained from this data source.
public  voidedit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits)
     Applies attributes and the connection changes to the model.
public  voideditFonts(Map attributes)
     Used for editing font sizes without haveing an undo action set.
protected  voidfireGraphChanged(Object source, GraphModelEvent.GraphModelChange edit)
    
public static  Object[]getAll(GraphModel model)
     Returns all cells of the model in an array.
public static  ListgetAllActivitiesInModel(GraphModel model)
     Gets all existing activities within model.
public static  ListgetAllBubblesInModel(GraphModel model)
     Gets all existing start/end bubbles within model.
public static  ListgetAllCellsInModel(GraphModel model)
     Gets all existing cells within model.
public static  ListgetAllParticipantsInModel(GraphModel model)
     Gets all existing participants within model.
public static  ListgetAllTransitionsInModel(GraphModel model)
     Gets all existing transitions within model.
public  AttributeMapgetAttributes(Object node)
     Returns a Map that represents the attributes for the specified cell.
public  ObjectgetChild(Object parent, int index)
     Returns the child of parent at index index in the parent's child array.
public  intgetChildCount(Object parent)
     Returns the number of children of parent.
public static  ListgetDescendantList(GraphModel model, Object[] cells)
    
public static  ListgetEdges(GraphModel model, Object[] cells)
     Returns the set of all connected edges to cells or their descendants.
public static  Object[]getEdges(GraphModel model, Object cell, boolean incoming)
     Returns the incoming or outgoing edges for cell.
public static  Object[]getEdgesBetween(GraphModel model, Object cell1, Object cell2, boolean directed)
     Returns the edges between two specified ports or two specified vertices.
public  GraphModelListener[]getGraphModelListeners()
     Return an array of all GraphModelListeners that were added to this model.
public static  Object[]getIncomingEdges(GraphModel model, Object cell)
     Returns the incoming edges for cell.
public  intgetIndexOfChild(Object parent, Object child)
     Returns the index of child in parent.
public  intgetIndexOfRoot(Object root)
     Returns the index of root in the model.
public static  ObjectgetOpposite(GraphModel model, Object edge, Object cell)
    
public static  Object[]getOutgoingEdges(GraphModel model, Object cell)
     Returns the outgoing edges for cell.
public  ObjectgetParent(Object child)
     Returns the parent of child in the model. child must be a node previously obtained from this data source.
public  ObjectgetRootAt(int index)
     Returns the root at index index in the model.
public  intgetRootCount()
     Returns the number of roots in the model.
public static  SetgetRootParticipants(GraphModel model)
     Returns the root participants of the specified model as a set.
public static  Object[]getRoots(GraphModel model)
     Returns the roots of the specified model as an array.
public static  Object[]getRoots(GraphModel model, Object[] cells)
     Returns the roots in cells by checking if their parent is null.
public  ObjectgetSource(Object edge)
     Returns the source of edge.
public static  ObjectgetSourceVertex(GraphModel model, Object edge)
     Returns the source vertex of the edge by calling getParent on getSource on the specified model.
public  ObjectgetTarget(Object edge)
     Returns the target of edge.
public static  ObjectgetTargetVertex(GraphModel model, Object edge)
     Returns the target vertex of the edge by calling getParent on getTarget on the specified model.
public static  Object[]getTopmostCells(GraphModel model, Object[] cells)
     Returns the roots of cells, eg.
public static  ObjectgetUserObject(Object cell)
     Returns the user object of the given cell.
public  ObjectgetValue(Object cell)
     Returns the user object of the given cell.
protected  MaphandleAttributes(Map attributes)
     Applies attributes to the cells specified as keys.
protected  voidhandleConnection(ConnectionSet.Connection c)
     Inserts the specified connection into the model.
protected  ConnectionSethandleConnectionSet(ConnectionSet cs)
     Applies connectionSet to the model.
protected  Object[]handleInsert(Object[] cells)
     Inserts cells into the model.
protected  ParentMaphandleParentMap(ParentMap parentMap)
     Applies cells to the model.
protected  Object[]handleRemove(Object[] cells)
     Removes cells from the model.
public static  booleanhasAncestorIn(GraphModel model, Set parents, Object child)
     Returns true if the specified child has an ancestor in parents.
public  voidinsert(Object[] pRoots, Map pAttributes, ConnectionSet pCs, ParentMap pPm, UndoableEdit[] pEdits)
     Inserts the roots and connections into the model. Notifies the model- and undo listeners of the change.
public  voidinsertAndEdit(Object[] pRoots, Map pAttributes, ConnectionSet pCs, ParentMap pPm, UndoableEdit[] pEdits, String pUndoMsg)
     Inserts the roots and connections into the model. Notifies the model- and undo listeners of the change.
public  booleanisEdge(Object edge)
     Returns true if edge is a valid edge.
public static  booleanisGroup(GraphModel model, Object cell)
     Checks whether the cell has at least one child which is not a port.
public  booleanisLeaf(Object node)
     Returns whether the specified node is a leaf node.
public  booleanisPort(Object port)
     Returns true if port is a valid port, possibly supporting edge connection.
public static  Object[]order(GraphModel model, Object[] cells)
     Orders cells so that they reflect the model order.
public  voidremove(Object[] pRoots)
     Removes cells from the model.
public  voidremoveAndEdit(Object[] pRoots, Map pAttributes, String pName)
     Removes cells from the model and edits cells given in a propertyMap.
public  voidremoveBubbles(Object[] bubbles, GraphModelListener gml)
     Used for editing font sizes without haveing an undo action set.
public  voidremoveGraphModelListener(GraphModelListener l)
     Removes a listener previously added with addGraphModelListener().
public static  voidsetSourcePort(GraphModel model, Object edge, Object port)
     Helper methods that connects the source of edge to port in model.
public static  voidsetTargetPort(GraphModel model, Object edge, Object port)
     Helper methods that connects the source of edge to port in model.
public  voidtoBack(Object[] cells)
     Sends cells to back.
public  voidtoFront(Object[] cells)
     Brings cells to front.
public  ObjectvalueForCellChanged(Object cell, Object newValue)
     Applies the new value to the specified cell.

Field Detail
asksAllowsChildren
protected boolean asksAllowsChildren(Code)
Indicates whether isLeaf is based on a node's allowsChildren value.



emptyIterator
protected transient Iterator emptyIterator(Code)
Default instance of an empty iterator.



listenerList
protected transient EventListenerList listenerList(Code)
The list of listeners that listen to the model.



roots
protected List roots(Code)
Set that contains all root cells of this model.




Constructor Detail
JaWEGraphModel
public JaWEGraphModel()(Code)
Constructs a model that is not an attribute store.




Method Detail
acceptsSource
public boolean acceptsSource(Object edge, Object port)(Code)
Returns true if port is a valid source for edge. edge and port must be objects previously obtained from this data source. true if port is a valid sourcefor edge.



acceptsTarget
public boolean acceptsTarget(Object edge, Object port)(Code)
Returns true if port is a valid target for edge. edge and port must be objects previously obtained from this data source. true if port is a valid targetfor edge.



addGraphModelListener
public void addGraphModelListener(GraphModelListener l)(Code)
Adds a listener for the GraphModelEvent posted after the graph changes.
See Also:   JaWEGraphModel.removeGraphModelListener
Parameters:
  l - the listener to add



cellsChanged
public void cellsChanged(Object[] cells)(Code)



cloneCell
protected Object cloneCell(Object cellObj, Object parent)(Code)
Creates a shallow copy of the cell including a copy of the user object and a reference to the parent (which is a clone of the old parent or null). Subclassers can override the cloneUserObject to provide a custom user object cloning mechanism.



cloneCell
public static Object cloneCell(GraphModel model, Object cell)(Code)
Returns a deep clone of the specified cell, including all children.



cloneCell
public static Object[] cloneCell(GraphModel model, Object[] cells)(Code)
Returns a deep clone of the specified cells, including all children.



cloneCells
public Map cloneCells(Object[] cells)(Code)
Returns a map of (cell, clone)-pairs for all cells and their children. Special care is taken to replace the anchor references between ports. (Iterative implementation.)



cloneUserObject
protected Object cloneUserObject(Object userObject)(Code)
Clones the user object. Helper method that is invoked from cloneCells. You must use cloneCells (or cloneCell for single cells) to get a deep copy of a clone. Subclassers must override this and valueForCellChanged to implement custom user objects. This implementation returns object.



connect
protected void connect(Object edge, Object port, boolean isSource, boolean insert)(Code)
Connects or disconnects the edge and port in this model based on remove. Subclassers should override this to update connectivity datastructures.



contains
public boolean contains(Object node)(Code)
Returns true if node or one of its ancestors is in the model. true if node is in the model



containsEdgeBetween
public static boolean containsEdgeBetween(GraphModel model, Object v1, Object v2)(Code)
Returns true if the given vertices are conntected by a single edge in this document.



createCellEdit
protected GraphModelEdit createCellEdit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits, String name)(Code)
Returns an edit that represents a change.



createEdit
protected GraphModelEdit createEdit(Object[] inserted, Object[] removed, Map attributes, ConnectionSet cs, ParentMap pm, String name)(Code)



createInsertEdit
protected GraphModelEdit createInsertEdit(Object[] cells, Map attributeMap, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits, String name)(Code)
Returns an edit that represents an insert.



createLayerEdit
protected GraphModelLayerEdit createLayerEdit(Object[] cells, int layer)(Code)



createRemoveAndCellEdit
protected GraphModelEdit createRemoveAndCellEdit(Object[] cells, Map attributes, String name)(Code)
Returns an edit that represents a remove and a change.



createRemoveEdit
protected GraphModelEdit createRemoveEdit(Object[] cells, String name)(Code)
Returns an edit that represents a remove.



edges
public Iterator edges(Object port)(Code)
Returns an iterator of the edges connected to port. port must be a object previously obtained from this data source. This method never returns null.
Parameters:
  port - a port in the graph, obtained from this data source Iterator that represents the connected edges



edit
public void edit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits)(Code)
Applies attributes and the connection changes to the model. The initial edits that triggered the call are considered to be part of this transaction. The passed-in edits are executed if they implement the GraphModelEvent.ExecutableGraphChange interface in ascending array-order, after execution of the model change. Notifies the model- and undo listeners of the change. Note: If only edits is non-null, the edits are directly passed to the UndoableEditListeners. Note: The passed-in propertyMap may contains PortViews which must be turned into Points when stored in the model.



editFonts
public void editFonts(Map attributes)(Code)
Used for editing font sizes without haveing an undo action set.



fireGraphChanged
protected void fireGraphChanged(Object source, GraphModelEvent.GraphModelChange edit)(Code)



getAll
public static Object[] getAll(GraphModel model)(Code)
Returns all cells of the model in an array. Returns all cells in the model including all descandants.



getAllActivitiesInModel
public static List getAllActivitiesInModel(GraphModel model)(Code)
Gets all existing activities within model.



getAllBubblesInModel
public static List getAllBubblesInModel(GraphModel model)(Code)
Gets all existing start/end bubbles within model.



getAllCellsInModel
public static List getAllCellsInModel(GraphModel model)(Code)
Gets all existing cells within model.



getAllParticipantsInModel
public static List getAllParticipantsInModel(GraphModel model)(Code)
Gets all existing participants within model.



getAllTransitionsInModel
public static List getAllTransitionsInModel(GraphModel model)(Code)
Gets all existing transitions within model.



getAttributes
public AttributeMap getAttributes(Object node)(Code)
Returns a Map that represents the attributes for the specified cell. This attributes have precedence over each view's attributes, regardless of isAttributeStore. attributes of node as a Map



getChild
public Object getChild(Object parent, int index)(Code)
Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index < getChildCount(parent)).
Parameters:
  parent - a node in the tree, obtained from this data source the child of parent at index index



getChildCount
public int getChildCount(Object parent)(Code)
Returns the number of children of parent. Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
Parameters:
  parent - a node in the tree, obtained from this data source the number of children of the node parent



getDescendantList
public static List getDescendantList(GraphModel model, Object[] cells)(Code)



getEdges
public static List getEdges(GraphModel model, Object[] cells)(Code)
Returns the set of all connected edges to cells or their descendants. The passed-in cells are never returned as part of the result set. This can be used on vertices, edges and ports.



getEdges
public static Object[] getEdges(GraphModel model, Object cell, boolean incoming)(Code)
Returns the incoming or outgoing edges for cell. Cell should be a port or a vertex.



getEdgesBetween
public static Object[] getEdgesBetween(GraphModel model, Object cell1, Object cell2, boolean directed)(Code)
Returns the edges between two specified ports or two specified vertices. If directed is true then cell1 must be the source of the returned edges.



getGraphModelListeners
public GraphModelListener[] getGraphModelListeners()(Code)
Return an array of all GraphModelListeners that were added to this model.



getIncomingEdges
public static Object[] getIncomingEdges(GraphModel model, Object cell)(Code)
Returns the incoming edges for cell. Cell should be a port or a vertex.



getIndexOfChild
public int getIndexOfChild(Object parent, Object child)(Code)
Returns the index of child in parent. If either the parent or child is null, returns -1.
Parameters:
  parent - a note in the tree, obtained from this data source
Parameters:
  child - the node we are interested in the index of the child in the parent, or -1if either the parent or the child is null



getIndexOfRoot
public int getIndexOfRoot(Object root)(Code)
Returns the index of root in the model. If root is null, returns -1.
Parameters:
  root - a root in the model, obtained from this data source the index of the root in the model, or -1if the parent is null



getOpposite
public static Object getOpposite(GraphModel model, Object edge, Object cell)(Code)
Returns the opposite port or vertex in edge.



getOutgoingEdges
public static Object[] getOutgoingEdges(GraphModel model, Object cell)(Code)
Returns the outgoing edges for cell. Cell should be a port or a vertex.



getParent
public Object getParent(Object child)(Code)
Returns the parent of child in the model. child must be a node previously obtained from this data source. This returns null if child is a root in the model.
Parameters:
  child - a node in the graph, obtained from this data source the parent of child



getRootAt
public Object getRootAt(int index)(Code)
Returns the root at index index in the model. This should not return null if index is a valid index for the model (that is index >= 0 && index < getRootCount()). the root of at index index



getRootCount
public int getRootCount()(Code)
Returns the number of roots in the model. Returns 0 if the model is empty. the number of roots in the model



getRootParticipants
public static Set getRootParticipants(GraphModel model)(Code)
Returns the root participants of the specified model as a set.



getRoots
public static Object[] getRoots(GraphModel model)(Code)
Returns the roots of the specified model as an array.



getRoots
public static Object[] getRoots(GraphModel model, Object[] cells)(Code)
Returns the roots in cells by checking if their parent is null. This implementation only uses the GraphModel interface. This method never returns null.



getSource
public Object getSource(Object edge)(Code)
Returns the source of edge. edge must be an object previously obtained from this data source. Object that represents the source of edge



getSourceVertex
public static Object getSourceVertex(GraphModel model, Object edge)(Code)
Returns the source vertex of the edge by calling getParent on getSource on the specified model.



getTarget
public Object getTarget(Object edge)(Code)
Returns the target of edge. edge must be an object previously obtained from this data source. Object that represents the target of edge



getTargetVertex
public static Object getTargetVertex(GraphModel model, Object edge)(Code)
Returns the target vertex of the edge by calling getParent on getTarget on the specified model.



getTopmostCells
public static Object[] getTopmostCells(GraphModel model, Object[] cells)(Code)
Returns the roots of cells, eg. an array that contains no cellhaving an ancestor in cells.



getUserObject
public static Object getUserObject(Object cell)(Code)
Returns the user object of the given cell. This implementationchecks if the cell is a default mutable tree node and returnsit's user object.GraphModel.getValue(Object)



getValue
public Object getValue(Object cell)(Code)
Returns the user object of the given cell. This implementationchecks if the cell is a default mutable tree node and returnsit's user object.



handleAttributes
protected Map handleAttributes(Map attributes)(Code)
Applies attributes to the cells specified as keys. Returns the attributes to undo the change.



handleConnection
protected void handleConnection(ConnectionSet.Connection c)(Code)
Inserts the specified connection into the model.



handleConnectionSet
protected ConnectionSet handleConnectionSet(ConnectionSet cs)(Code)
Applies connectionSet to the model. Returns a connection set that may be used to undo this change.



handleInsert
protected Object[] handleInsert(Object[] cells)(Code)
Inserts cells into the model. Returns the cells that were inserted (including descendants).



handleParentMap
protected ParentMap handleParentMap(ParentMap parentMap)(Code)
Applies cells to the model. Returns a parent map that may be used to undo this change.



handleRemove
protected Object[] handleRemove(Object[] cells)(Code)
Removes cells from the model. Returns the cells that were removed as roots.



hasAncestorIn
public static boolean hasAncestorIn(GraphModel model, Set parents, Object child)(Code)
Returns true if the specified child has an ancestor in parents.



insert
public void insert(Object[] pRoots, Map pAttributes, ConnectionSet pCs, ParentMap pPm, UndoableEdit[] pEdits)(Code)
Inserts the roots and connections into the model. Notifies the model- and undo listeners of the change. The passed-in edits are executed if they implement the GraphModelEvent.ExecutableGraphChange interface in ascending array-order, after execution of the model change. (Note: The external order is important in a special case: After insertion on a partial view, ie. one that does not display all cells of the model, the cell is made visible after it is inserted into the model. This requires the inserting view to be able to add the cell to the visible set before it is inserted into the model.) Note: The passed-in propertyMap may contains PortViews which must be turned into Points when stored in the model.



insertAndEdit
public void insertAndEdit(Object[] pRoots, Map pAttributes, ConnectionSet pCs, ParentMap pPm, UndoableEdit[] pEdits, String pUndoMsg)(Code)
Inserts the roots and connections into the model. Notifies the model- and undo listeners of the change. The passed-in edits are executed if they implement the GraphModelEvent.ExecutableGraphChange interface in ascending array-order, after execution of the model change. (Note: The external order is important in a special case: After insertion on a partial view, ie. one that does not display all cells of the model, the cell is made visible after it is inserted into the model. This requires the inserting view to be able to add the cell to the visible set before it is inserted into the model.) Note: The passed-in propertyMap may contains PortViews which must be turned into Points when stored in the model.



isEdge
public boolean isEdge(Object edge)(Code)
Returns true if edge is a valid edge. true if edge is a valid edge.



isGroup
public static boolean isGroup(GraphModel model, Object cell)(Code)
Checks whether the cell has at least one child which is not a port. This implementation operates on the model, not taking into account visibility of cells. It returns true for groups regardless of their folded state.
Parameters:
  cell - the cell to check for being a group Returns true if the cell contains at least one cell which is nota port



isLeaf
public boolean isLeaf(Object node)(Code)
Returns whether the specified node is a leaf node. The way the test is performed depends on the.
Parameters:
  node - the node to check true if the node is a leaf node



isPort
public boolean isPort(Object port)(Code)
Returns true if port is a valid port, possibly supporting edge connection. true if port is a valid port.



order
public static Object[] order(GraphModel model, Object[] cells)(Code)
Orders cells so that they reflect the model order.



remove
public void remove(Object[] pRoots)(Code)
Removes cells from the model. Notifies the model- and undo listeners of the change.



removeAndEdit
public void removeAndEdit(Object[] pRoots, Map pAttributes, String pName)(Code)
Removes cells from the model and edits cells given in a propertyMap. If removeChildren is true, the children are also removed. Notifies the model- and undo listeners of the change.



removeBubbles
public void removeBubbles(Object[] bubbles, GraphModelListener gml)(Code)
Used for editing font sizes without haveing an undo action set.



removeGraphModelListener
public void removeGraphModelListener(GraphModelListener l)(Code)
Removes a listener previously added with addGraphModelListener().
See Also:   JaWEGraphModel.addGraphModelListener
Parameters:
  l - the listener to remove



setSourcePort
public static void setSourcePort(GraphModel model, Object edge, Object port)(Code)
Helper methods that connects the source of edge to port in model.



setTargetPort
public static void setTargetPort(GraphModel model, Object edge, Object port)(Code)
Helper methods that connects the source of edge to port in model.



toBack
public void toBack(Object[] cells)(Code)
Sends cells to back.



toFront
public void toFront(Object[] cells)(Code)
Brings cells to front.



valueForCellChanged
public Object valueForCellChanged(Object cell, Object newValue)(Code)
Applies the new value to the specified cell. Unfortunately for cloning the user object you must still override the attribute map and provide a custom cloneUserObject method. This is because the cloning of a cell is local to the cell, which in turn has a reference to its attribute map.
Parameters:
  cell -
Parameters:
  newValue - the old value for the cell, if any



Fields inherited from javax.swing.undo.UndoableEditSupport
protected CompoundEdit compoundEdit(Code)(Java Doc)
protected Vector<UndoableEditListener> listeners(Code)(Java Doc)
protected Object realSource(Code)(Java Doc)
protected int updateLevel(Code)(Java Doc)

Methods inherited from javax.swing.undo.UndoableEditSupport
protected void _postEdit(UndoableEdit e)(Code)(Java Doc)
public synchronized void addUndoableEditListener(UndoableEditListener l)(Code)(Java Doc)
public synchronized void beginUpdate()(Code)(Java Doc)
protected CompoundEdit createCompoundEdit()(Code)(Java Doc)
public synchronized void endUpdate()(Code)(Java Doc)
public synchronized UndoableEditListener[] getUndoableEditListeners()(Code)(Java Doc)
public int getUpdateLevel()(Code)(Java Doc)
public synchronized void postEdit(UndoableEdit e)(Code)(Java Doc)
public synchronized void removeUndoableEditListener(UndoableEditListener l)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.