org.jgraph.graph
Class DefaultGraphModel.GraphModelLayerEdit
java.lang.Object
|
+--javax.swing.undo.AbstractUndoableEdit
|
+--org.jgraph.graph.GraphLayoutCache.GraphViewLayerEdit
|
+--org.jgraph.graph.DefaultGraphModel.GraphModelLayerEdit
- All Implemented Interfaces:
- GraphModelEvent.ExecutableGraphChange, GraphModelEvent.GraphModelChange, GraphModelEvent.GraphViewChange, Serializable, UndoableEdit
- Enclosing class:
- DefaultGraphModel
- public class DefaultGraphModel.GraphModelLayerEdit
- extends GraphLayoutCache.GraphViewLayerEdit
- implements GraphModelEvent.GraphModelChange
An implementation of GraphViewChange.
- See Also:
- Serialized Form
parents
protected Object[] parents
DefaultGraphModel.GraphModelLayerEdit
public DefaultGraphModel.GraphModelLayerEdit(Object[] cells,
int layer)
- Constructs a GraphModelEdit. This modifies the order of the cells
in the model.
getSource
public Object getSource()
- Returns the source of this change. This can either be a
view or a model, if this change is a GraphModelChange.
- Specified by:
getSource
in interface GraphModelEvent.GraphViewChange
- Overrides:
getSource
in class GraphLayoutCache.GraphViewLayerEdit
getChanged
public Object[] getChanged()
- Returns the cells that have changed.
- Specified by:
getChanged
in interface GraphModelEvent.GraphViewChange
- Overrides:
getChanged
in class GraphLayoutCache.GraphViewLayerEdit
getInserted
public Object[] getInserted()
- Returns the cells that have changed.
- Specified by:
getInserted
in interface GraphModelEvent.GraphModelChange
getRemoved
public Object[] getRemoved()
- Returns the cells that have changed.
- Specified by:
getRemoved
in interface GraphModelEvent.GraphModelChange
getPreviousAttributes
public Map getPreviousAttributes()
- Returns null.
- Specified by:
getPreviousAttributes
in interface GraphModelEvent.GraphModelChange
getPreviousConnectionSet
public ConnectionSet getPreviousConnectionSet()
- Specified by:
getPreviousConnectionSet
in interface GraphModelEvent.GraphModelChange
getPreviousParentMap
public ParentMap getPreviousParentMap()
- Specified by:
getPreviousParentMap
in interface GraphModelEvent.GraphModelChange
addImplicitEdit
public void addImplicitEdit(UndoableEdit edit)
- Allows a
GraphLayoutCache
to add and execute and
UndoableEdit in this change. This does also work if the
parent edit has already been executed, in which case the
to be added edit will be executed immediately, after
addition.
This is used to handle changes to the view that are
triggered by certain changes of the model. Such implicit
edits may be associated with the view so that they may be
undone and redone correctly, and are stored in the model's
global history together with the parent event as one unit.
getViews
public CellView[] getViews(GraphLayoutCache view)
- Returns the views that have not changed explicitly, but
implicitly because one of their dependent cells has changed.
- Specified by:
getViews
in interface GraphModelEvent.GraphModelChange
putViews
public void putViews(GraphLayoutCache view,
CellView[] cellViews)
- Returns the views that have not changed explicitly, but
implicitly because one of their dependent cells has changed.
- Specified by:
putViews
in interface GraphModelEvent.GraphModelChange
updateListeners
protected void updateListeners()
- Overrides:
updateListeners
in class GraphLayoutCache.GraphViewLayerEdit
getParentList
protected List getParentList(Object cell)
- Returns the list that exclusively contains
view
.
- Overrides:
getParentList
in class GraphLayoutCache.GraphViewLayerEdit
Copyright (C) 2001-2004 JGraph.org. All rights reserved.