/** * Returns a boolean indicating if the given <em>mxCell</em> should be ignored as a vertex. This returns true if the cell has no connections. * * @param vertex * Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0; }
/** * Returns true if the given swimlane should be ignored. */ protected boolean isSwimlaneIgnored(Object swimlane) { return !getGraph().isSwimlane(swimlane); }
/** * Returns true if the given swimlane should be ignored. */ protected boolean isSwimlaneIgnored(Object swimlane) { return !getGraph().isSwimlane(swimlane); }
/** * Returns a boolean indicating if the given <mxCell> should be ignored as a vertex. This returns true if the cell has no connections. * * @param vertex * Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ @Override public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0; }
/** * Returns a boolean indicating if the given <mxCell> should be ignored as a vertex. This returns true if the cell * has no connections. * * @param vertex * Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0; }
/** * Returns true if the given cell is a valid drop target for the specified * cells. This returns true if the cell is a swimlane, has children and is * not collapsed, or if splitEnabled is true and isSplitTarget returns * true for the given arguments * * @param cell Object that represents the possible drop target. * @param cells Objects that are going to be dropped. * @return Returns true if the cell is a valid drop target for the given * cells. */ public boolean isValidDropTarget(Object cell, Object[] cells) { return cell != null && ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model .isEdge(cell) && (isSwimlane(cell) || (model .getChildCount(cell) > 0 && !isCellCollapsed(cell))))); }
/** * Returns true if the given cell is a valid drop target for the specified * cells. This returns true if the cell is a swimlane, has children and is * not collapsed, or if splitEnabled is true and isSplitTarget returns * true for the given arguments * * @param cell Object that represents the possible drop target. * @param cells Objects that are going to be dropped. * @return Returns true if the cell is a valid drop target for the given * cells. */ public boolean isValidDropTarget(Object cell, Object[] cells) { return cell != null && ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model .isEdge(cell) && (isSwimlane(cell) || (model .getChildCount(cell) > 0 && !isCellCollapsed(cell))))); }
/** * 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(); }
/** * 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(); }
int y = (int) source.getCenterY() - imgHeight / 2; if (graphComponent.getGraph().isSwimlane(source.getCell()))
int y = (int) source.getCenterY() - imgHeight / 2; if (graphComponent.getGraph().isSwimlane(source.getCell()))
double h = g.getHeight(); if (isSwimlane(parent))
double h = g.getHeight(); if (isSwimlane(parent))
/** * Returns the bounds to be used for the given group and children. This * implementation computes the bounding box of the geometries of all * vertices in the given children array. Edges are ignored. If the group * cell is a swimlane the title region is added to the bounds. */ public mxRectangle getBoundsForGroup(Object group, Object[] children, double border) { mxRectangle result = getBoundingBoxFromGeometry(children); if (result != null) { if (isSwimlane(group)) { mxRectangle size = getStartSize(group); result.setX(result.getX() - size.getWidth()); result.setY(result.getY() - size.getHeight()); result.setWidth(result.getWidth() + size.getWidth()); result.setHeight(result.getHeight() + size.getHeight()); } // Adds the border result.setX(result.getX() - border); result.setY(result.getY() - border); result.setWidth(result.getWidth() + 2 * border); result.setHeight(result.getHeight() + 2 * border); } return result; }
/** * Returns the bounds to be used for the given group and children. This * implementation computes the bounding box of the geometries of all * vertices in the given children array. Edges are ignored. If the group * cell is a swimlane the title region is added to the bounds. */ public mxRectangle getBoundsForGroup(Object group, Object[] children, double border) { mxRectangle result = getBoundingBoxFromGeometry(children); if (result != null) { if (isSwimlane(group)) { mxRectangle size = getStartSize(group); result.setX(result.getX() - size.getWidth()); result.setY(result.getY() - size.getHeight()); result.setWidth(result.getWidth() + size.getWidth()); result.setHeight(result.getHeight() + size.getHeight()); } // Adds the border result.setX(result.getX() - border); result.setY(result.getY() - border); result.setWidth(result.getWidth() + 2 * border); result.setHeight(result.getHeight() + 2 * border); } return result; }
mxRectangle tmp = (graph.isSwimlane(current)) ? graph.getStartSize(current) : new mxRectangle();
if (this.graph.isSwimlane(group))
if (this.graph.isSwimlane(group))
&& childBounds.getHeight() > 0) mxRectangle size = (isSwimlane(cells[i])) ? getStartSize(cells[i]) : new mxRectangle();