public Object getParent(Object child) { return (child instanceof mxICell) ? ((mxICell) child).getParent() : null; }
public Object getParent(Object child) { return (child instanceof mxICell) ? ((mxICell) child).getParent() : null; }
public boolean filter(Object obj) { boolean ret = false; if (obj instanceof VInParameter || obj instanceof VOutParameter) { ret = basefilter.filter(((mxICell) obj).getParent()); } return ret; } };
/** * Returns the source activity. * * @return The activity. */ protected VActivity getSourceActivity() { mxICell tmpvsrc = getSource(); if (tmpvsrc instanceof VOutParameter) { tmpvsrc = tmpvsrc.getParent(); } return (VActivity) tmpvsrc; }
/** * Returns the target activity. * * @return The activity. */ protected VActivity getTargetActivity() { mxICell tmpvtgt = getTarget(); if (tmpvtgt instanceof VInParameter) { tmpvtgt = tmpvtgt.getParent(); } return (VActivity) tmpvtgt; } }
/** * Creates the cell path for the given cell. The cell path is a * concatenation of the indices of all cells on the (finite) path to * the root, eg. "0.0.0.1". * * @param cell Cell whose path should be returned. * @return Returns the string that represents the path. */ public static String create(mxICell cell) { String result = ""; if (cell != null) { mxICell parent = cell.getParent(); while (parent != null) { int index = parent.getIndex(cell); result = index + mxCellPath.PATH_SEPARATOR + result; cell = parent; parent = cell.getParent(); } } return (result.length() > 1) ? result.substring(0, result.length() - 1) : ""; }
/** * Creates the cell path for the given cell. The cell path is a * concatenation of the indices of all cells on the (finite) path to * the root, eg. "0.0.0.1". * * @param cell Cell whose path should be returned. * @return Returns the string that represents the path. */ public static String create(mxICell cell) { String result = ""; if (cell != null) { mxICell parent = cell.getParent(); while (parent != null) { int index = parent.getIndex(cell); result = index + mxCellPath.PATH_SEPARATOR + result; cell = parent; parent = cell.getParent(); } } return (result.length() > 1) ? result.substring(0, result.length() - 1) : ""; }
public void actionPerformed(ActionEvent e) { String mode = ((JMenuItem) e.getSource()).getName(); mxICell parent = ((mxICell) source).getParent(); if (source instanceof VActivity && ((MActivity) ((VActivity) source).getBpmnElement()).isEventHandler()) { parent = parent.getParent(); } target = SCreationController.createActivity(modelcontainer, mode, parent, loc, false); actionlistener.actionPerformed(e); } };
/** * Gets the authoritative edge parent. * * @return The parent. */ public mxICell getEdgeParent() { mxICell ret = null; if (getSource() != null) { if (getSource() instanceof VOutParameter) { if (getSource().getParent() != null) { ret = getSource().getParent().getParent(); } } else { ret = getSource().getParent(); } } return ret; }
public mxICell insert(mxICell child) { int index = getChildCount(); if (child.getParent() == this) { index--; } return insert(child, index); }
public mxICell insert(mxICell child) { int index = getChildCount(); if (child.getParent() == this) { index--; } return insert(child, index); }
/** * Gets the authoritative edge parent. * * @return The parent. */ public mxICell getEdgeParent() { mxICell ret = null; if (getSource() != null) { ret = getSource().getParent(); } return ret; }
if (cell != null && cell.getParent() == null)
if (cell != null && cell.getParent() == null)
/** * Inserts the given cell into its parent and terminal cells. */ public void insertIntoGraph(mxICell cell) { mxICell parent = cell.getParent(); mxICell source = cell.getTerminal(true); mxICell target = cell.getTerminal(false); // Fixes possible inconsistencies during insert into graph cell.setTerminal(null, false); cell.setTerminal(null, true); cell.setParent(null); if (parent != null) { parent.insert(cell); } if (source != null) { source.insertEdge(cell, true); } if (target != null) { target.insertEdge(cell, false); } }
selection = ((mxICell) selection).getParent();
/** * Inserts the given cell into its parent and terminal cells. */ public void insertIntoGraph(mxICell cell) { mxICell parent = cell.getParent(); mxICell source = cell.getTerminal(true); mxICell target = cell.getTerminal(false); // Fixes possible inconsistencies during insert into graph cell.setTerminal(null, false); cell.setTerminal(null, true); cell.setParent(null); if (parent != null) { parent.insert(cell); } if (source != null) { source.insertEdge(cell, true); } if (target != null) { target.insertEdge(cell, false); } }