public class mxLayoutManager extends mxEventSource
new mxLayoutManager(graph) {
mxCompactTreeLayout layout = new mxCompactTreeLayout(graph);
public mxIGraphLayout getLayout(Object parent)
{
if (graph.getModel().getChildCount(parent) > 0) {
return layout;
}
return null;
}
};
This class fires the following event:
mxEvent.LAYOUT_CELLS fires between begin- and endUpdate after all cells have
been layouted in layoutCells. The cells
property contains all
cells that have been passed to layoutCells.mxEventSource.mxIEventListener
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
bubbling |
Optional string that specifies the attributename to be passed to
mxCell.is to check if the rule applies to a cell.
|
protected boolean |
enabled |
Optional string that specifies the value of the attribute to be passed
to mxCell.is to check if the rule applies to a cell.
|
protected mxGraph |
graph |
Defines the type of the source or target terminal.
|
protected mxEventSource.mxIEventListener |
moveHandler |
|
protected mxEventSource.mxIEventListener |
undoHandler |
eventListeners, eventsEnabled, eventSource
Constructor | Description |
---|---|
mxLayoutManager(mxGraph graph) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
beforeUndo(mxUndoableEdit edit) |
|
protected void |
cellsMoved(java.lang.Object[] cells,
java.awt.Point location) |
|
void |
destroy() |
|
protected void |
executeLayout(mxIGraphLayout layout,
java.lang.Object parent) |
|
protected java.util.Collection<java.lang.Object> |
getCellsForChange(mxUndoableEdit.mxUndoableChange change) |
|
protected java.util.Collection<java.lang.Object> |
getCellsForChanges(java.util.List<mxUndoableEdit.mxUndoableChange> changes) |
|
mxGraph |
getGraph() |
|
protected mxIGraphLayout |
getLayout(java.lang.Object parent) |
|
boolean |
isBubbling() |
|
boolean |
isEnabled() |
|
protected void |
layoutCells(java.lang.Object[] cells) |
|
void |
setBubbling(boolean value) |
|
void |
setEnabled(boolean value) |
|
void |
setGraph(mxGraph value) |
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
protected mxGraph graph
protected boolean enabled
protected boolean bubbling
protected mxEventSource.mxIEventListener undoHandler
protected mxEventSource.mxIEventListener moveHandler
public mxLayoutManager(mxGraph graph)
public boolean isEnabled()
public void setEnabled(boolean value)
value
- the enabled to setpublic boolean isBubbling()
public void setBubbling(boolean value)
value
- the bubbling to setpublic mxGraph getGraph()
public void setGraph(mxGraph value)
value
- the graph to setprotected mxIGraphLayout getLayout(java.lang.Object parent)
protected void cellsMoved(java.lang.Object[] cells, java.awt.Point location)
protected void beforeUndo(mxUndoableEdit edit)
protected java.util.Collection<java.lang.Object> getCellsForChanges(java.util.List<mxUndoableEdit.mxUndoableChange> changes)
protected java.util.Collection<java.lang.Object> getCellsForChange(mxUndoableEdit.mxUndoableChange change)
protected void layoutCells(java.lang.Object[] cells)
protected void executeLayout(mxIGraphLayout layout, java.lang.Object parent)
public void destroy()
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.