public void invoke(Object source, mxEventObject evt) { if (isEnabled() && isAddEnabled()) { cellsAdded((Object[]) evt.getProperty("cells")); } } };
public void invoke(Object source, mxEventObject evt) { if (isEnabled() && isResizeEnabled()) { cellsResized((Object[]) evt.getProperty("cells")); } } };
/** * Called if any cells have been added. Calls swimlaneAdded for all swimlanes * where isSwimlaneIgnored returns false. */ protected void cellsAdded(Object[] cells) { if (cells != null) { mxIGraphModel model = getGraph().getModel(); model.beginUpdate(); try { for (int i = 0; i < cells.length; i++) { if (!isSwimlaneIgnored(cells[i])) { swimlaneAdded(cells[i]); } } } finally { model.endUpdate(); } } }
mxIGraphModel model = getGraph().getModel(); Object parent = model.getParent(swimlane); int childCount = model.getChildCount(parent); if (child != swimlane && !this.isSwimlaneIgnored(child)) boolean parentHorizontal = (parent != null) ? isCellHorizontal(parent) : horizontal; resizeSwimlane(swimlane, geo.getWidth(), geo.getHeight(), parentHorizontal);
/** * Returns true if the given swimlane should be ignored. */ protected boolean isSwimlaneIgnored(Object swimlane) { return !getGraph().isSwimlane(swimlane); }
/** * Returns true if the given cell is horizontal. If the given cell is not a * swimlane, then the <horizontal> value is returned. */ protected boolean isCellHorizontal(Object cell) { if (graph.isSwimlane(cell)) { mxCellState state = graph.getView().getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : graph.getCellStyle(cell); return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true); } return !isHorizontal(); }
mxIGraphModel model = getGraph().getModel(); Object parent = model.getParent(swimlane); int childCount = model.getChildCount(parent); if (child != swimlane && !this.isSwimlaneIgnored(child)) boolean parentHorizontal = (parent != null) ? isCellHorizontal(parent) : horizontal; resizeSwimlane(swimlane, geo.getWidth(), geo.getHeight(), parentHorizontal);
/** * Returns true if the given swimlane should be ignored. */ protected boolean isSwimlaneIgnored(Object swimlane) { return !getGraph().isSwimlane(swimlane); }
/** * Returns true if the given cell is horizontal. If the given cell is not a * swimlane, then the <horizontal> value is returned. */ protected boolean isCellHorizontal(Object cell) { if (graph.isSwimlane(cell)) { mxCellState state = graph.getView().getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : graph.getCellStyle(cell); return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true); } return !isHorizontal(); }
mxIGraphModel model = getGraph().getModel(); boolean horizontal = this.isCellHorizontal(swimlane); if (!this.isSwimlaneIgnored(swimlane)) resizeSwimlane(child, w, h, horizontal);
public void invoke(Object source, mxEventObject evt) { if (isEnabled() && isAddEnabled()) { cellsAdded((Object[]) evt.getProperty("cells")); } } };
public void invoke(Object source, mxEventObject evt) { if (isEnabled() && isResizeEnabled()) { cellsResized((Object[]) evt.getProperty("cells")); } } };
/** * Called if any cells have been added. Calls swimlaneAdded for all swimlanes * where isSwimlaneIgnored returns false. */ protected void cellsAdded(Object[] cells) { if (cells != null) { mxIGraphModel model = getGraph().getModel(); model.beginUpdate(); try { for (int i = 0; i < cells.length; i++) { if (!isSwimlaneIgnored(cells[i])) { swimlaneAdded(cells[i]); } } } finally { model.endUpdate(); } } }
mxIGraphModel model = getGraph().getModel(); boolean horizontal = this.isCellHorizontal(swimlane); if (!this.isSwimlaneIgnored(swimlane)) resizeSwimlane(child, w, h, horizontal);
mxIGraphModel model = this.getGraph().getModel(); if (!this.isSwimlaneIgnored(cells[i])) boolean parentHorizontal = (current != null) ? isCellHorizontal(current) : horizontal; resizeSwimlane(top, size.getWidth(), size.getHeight(), parentHorizontal);
mxIGraphModel model = this.getGraph().getModel(); if (!this.isSwimlaneIgnored(cells[i])) boolean parentHorizontal = (current != null) ? isCellHorizontal(current) : horizontal; resizeSwimlane(top, size.getWidth(), size.getHeight(), parentHorizontal);