|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.UndoableEditSupport
org.jgraph.graph.DefaultGraphModel
tico.board.TBoardModel
public class TBoardModel
Custom model than does not allow Connections
between nodes. This
model do not use the Graph
structure.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jgraph.graph.DefaultGraphModel |
---|
org.jgraph.graph.DefaultGraphModel.EmptyIterator, org.jgraph.graph.DefaultGraphModel.GraphModelEdit, org.jgraph.graph.DefaultGraphModel.GraphModelLayerEdit |
Constructor Summary | |
---|---|
TBoardModel()
Creates a new empty TBoardModel and with
defaultAttributes . |
|
TBoardModel(org.jgraph.graph.AttributeMap attributes)
Creates a new empty TBoardModel with the specified initial
attributes . |
|
TBoardModel(java.util.List roots)
Creates a new TBoardModel with the specified initial
roots and defaultAttributes . |
|
TBoardModel(java.util.List roots,
org.jgraph.graph.AttributeMap attributes)
Creates a new TBoardModel with the specified initial
roots and attributes . |
Method Summary | |
---|---|
boolean |
acceptsSource(java.lang.Object edge,
java.lang.Object port)
Edges are not used in this model, therefore port are not used too. |
boolean |
acceptsTarget(java.lang.Object edge,
java.lang.Object port)
Edges are not used in this model, therefore port are not used too. |
void |
deleteBoardFromAttributes(TBoard board)
Deletes the specified board from all the model component's
attributes. |
void |
edit(java.util.Map attributes,
org.jgraph.graph.ConnectionSet cs,
org.jgraph.graph.ParentMap pm,
javax.swing.undo.UndoableEdit[] edits)
|
void |
edit(java.lang.Object[] inserted,
java.lang.Object[] removed,
java.util.Map attributes,
org.jgraph.graph.ConnectionSet cs,
org.jgraph.graph.ParentMap pm,
javax.swing.undo.UndoableEdit[] edits)
|
void |
editAndRemove(java.util.Map attributes,
java.lang.Object[] removed)
Applies the attributeMaps to the components specified in attributes
and removes the components in removed . |
boolean |
existsId(java.lang.String id)
Determines if any model component has the specified id . |
org.jgraph.graph.AttributeMap |
getAttributes(java.lang.Object node)
|
java.lang.Object |
getSource(java.lang.Object edge)
Edges are not used in this model. |
java.lang.Object |
getTarget(java.lang.Object edge)
Edges are not used in this model. |
void |
insert(java.lang.Object[] inserted,
java.util.Map attributes,
org.jgraph.graph.ConnectionSet cs,
org.jgraph.graph.ParentMap pm,
javax.swing.undo.UndoableEdit[] edits)
|
boolean |
isRepeatedId(TComponent original,
java.lang.String id)
Determines if any model component different from original
has the specified id . |
void |
remove(java.lang.Object[] removed)
Removes cells from the model. |
void |
removeInsertAndEdit(java.lang.Object[] insert,
java.lang.Object[] removed,
java.util.Map attributes)
Applies the attributeMaps to the components specified in attributes , removes the components in removed
and inserts the components in insert . |
static TBoardModel |
XMLDecode(org.w3c.dom.Element element)
Returns a TBoardModel object from the data contained in
the XML Element . |
org.w3c.dom.Node |
XMLEncode(org.w3c.dom.Document doc)
Generates a XML Node that contains the model board
information. |
Methods inherited from class org.jgraph.graph.DefaultGraphModel |
---|
addGraphModelListener, cellsChanged, cloneCell, cloneCell, cloneCells, contains, containsEdgeBetween, edges, getAll, getAttributes, getChild, getChildCount, getConnectionSet, getDescendants, getEdges, getEdges, getEdgesBetween, getGraphModelListeners, getIncomingEdges, getIndexOfChild, getIndexOfRoot, getOpposite, getOutgoingEdges, getParent, getRootAt, getRootCount, getRoots, getRoots, getRoots, getSourceVertex, getTargetVertex, getTopmostCells, getUserObject, getValue, hasAncestorIn, isEdge, isGroup, isLeaf, isPort, order, removeGraphModelListener, setSourcePort, setTargetPort, toBack, toFront, valueForCellChanged |
Methods inherited from class javax.swing.undo.UndoableEditSupport |
---|
addUndoableEditListener, beginUpdate, endUpdate, getUndoableEditListeners, getUpdateLevel, postEdit, removeUndoableEditListener, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jgraph.graph.GraphModel |
---|
addUndoableEditListener, removeUndoableEditListener |
Constructor Detail |
---|
public TBoardModel()
TBoardModel
and with
defaultAttributes
.
public TBoardModel(java.util.List roots)
TBoardModel
with the specified initial
roots
and defaultAttributes
.
roots
- The specified initial roots
public TBoardModel(org.jgraph.graph.AttributeMap attributes)
TBoardModel
with the specified initial
attributes
.
attributes
- The specified initial attributes
public TBoardModel(java.util.List roots, org.jgraph.graph.AttributeMap attributes)
TBoardModel
with the specified initial
roots
and attributes
.
roots
- The specified initial roots
attributes
- The specified initial attributes
Method Detail |
---|
public java.lang.Object getSource(java.lang.Object edge)
getSource
in interface org.jgraph.graph.GraphModel
getSource
in class org.jgraph.graph.DefaultGraphModel
public java.lang.Object getTarget(java.lang.Object edge)
getTarget
in interface org.jgraph.graph.GraphModel
getTarget
in class org.jgraph.graph.DefaultGraphModel
public boolean acceptsSource(java.lang.Object edge, java.lang.Object port)
acceptsSource
in interface org.jgraph.graph.GraphModel
acceptsSource
in class org.jgraph.graph.DefaultGraphModel
public boolean acceptsTarget(java.lang.Object edge, java.lang.Object port)
acceptsTarget
in interface org.jgraph.graph.GraphModel
acceptsTarget
in class org.jgraph.graph.DefaultGraphModel
public org.jgraph.graph.AttributeMap getAttributes(java.lang.Object node)
getAttributes
in interface org.jgraph.graph.GraphModel
getAttributes
in class org.jgraph.graph.DefaultGraphModel
public void insert(java.lang.Object[] inserted, java.util.Map attributes, org.jgraph.graph.ConnectionSet cs, org.jgraph.graph.ParentMap pm, javax.swing.undo.UndoableEdit[] edits)
insert
in interface org.jgraph.graph.GraphModel
insert
in class org.jgraph.graph.DefaultGraphModel
public void edit(java.util.Map attributes, org.jgraph.graph.ConnectionSet cs, org.jgraph.graph.ParentMap pm, javax.swing.undo.UndoableEdit[] edits)
edit
in interface org.jgraph.graph.GraphModel
edit
in class org.jgraph.graph.DefaultGraphModel
public void remove(java.lang.Object[] removed)
cells
from the model. Notifies the model- and undo
listeners of the change.
remove
in interface org.jgraph.graph.GraphModel
remove
in class org.jgraph.graph.DefaultGraphModel
public void edit(java.lang.Object[] inserted, java.lang.Object[] removed, java.util.Map attributes, org.jgraph.graph.ConnectionSet cs, org.jgraph.graph.ParentMap pm, javax.swing.undo.UndoableEdit[] edits)
edit
in class org.jgraph.graph.DefaultGraphModel
public void editAndRemove(java.util.Map attributes, java.lang.Object[] removed)
attributes
and removes the components in removed
.
attributes
- Pairs component
- attributeMap
that determines wich objects will receive wich attribute map modificationsremoved
- The components
to removepublic void removeInsertAndEdit(java.lang.Object[] insert, java.lang.Object[] removed, java.util.Map attributes)
attributes
, removes the components in removed
and inserts the components in insert
.
insert
- The components
to insertremoved
- The components
to removeattributes
- Pairs component
- attributeMap
that determines which objects will receive which attribute map modificationspublic void deleteBoardFromAttributes(TBoard board)
board
from all the model component's
attributes. Is used when the board
has been deleted from the
boards project
board
- The board
to be deleted from model component's
attributespublic boolean existsId(java.lang.String id)
id
.
id
- The specified id
id
public boolean isRepeatedId(TComponent original, java.lang.String id)
original
has the specified id
.
original
- The original
componentid
- The specified id
original
has the specified id
public org.w3c.dom.Node XMLEncode(org.w3c.dom.Document doc)
Node
that contains the model board
information.
doc
- The Document
that represents the
entire XML document
Node
generatedpublic static TBoardModel XMLDecode(org.w3c.dom.Element element) throws InvalidFormatException
TBoardModel
object from the data contained in
the XML Element
.
element
- The XML Element
that contains the board data
TBoardModel
InvalidFormatException
- If Element
has an invalid format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |