@Override protected DefaultEdge createRelationshipCell(Relationship rel) { DefaultEdge edge = super.createRelationshipCell(rel); if (edge != null) { GraphConstants.setDashPattern(edge.getAttributes(), new float[] { 10, 3 }); } return edge; }
DefaultEdge createInheritanceEdge(ObjEntity entity) { if (!inheritanceEdges.containsKey(entity)) { ObjEntity superEntity = entity.getSuperEntity(); if (superEntity != null) { DefaultGraphCell sourceCell = entityCells.get(entity.getName()); DefaultGraphCell targetCell = entityCells.get(superEntity.getName()); DefaultEdge edge = new DefaultEdge(); edge.setSource(sourceCell.getChildAt(0)); edge.setTarget(targetCell.getChildAt(0)); GraphConstants.setDashPattern(edge.getAttributes(), new float[] { 5, 5 }); GraphConstants.setLineEnd( edge.getAttributes(), GraphConstants.ARROW_TECHNICAL); GraphConstants.setSelectable(edge.getAttributes(), false); inheritanceEdges.put(entity, edge); return edge; } } return null; }
private void createArrow(K source, K target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells.get(source).getChildAt(0)); edge.setTarget(stateCells.get(target).getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); Set<K> targetSet = arrows.get(source); if (targetSet == null) { targetSet = EnumSet.noneOf(keyType); arrows.put(source, targetSet); } targetSet.add(target); } }
protected void updateRelationshipCell(Relationship rel) { if (rel.getSourceEntity() != null && rel.getTargetEntity() != null) { DefaultEdge edge = relCells.get(getQualifiedName(rel)); if (edge != null) { updateRelationshipLabels(edge, rel, rel.getReverseRelationship()); Map nested = new HashMap(); nested.put(edge, edge.getAttributes()); edit(nested); } else { insertRelationshipCell(rel); } } }
/** * Updates relationship labels for specified relationship edge. */ protected void updateRelationshipLabels(DefaultEdge edge, Relationship rel, Relationship reverse) { DefaultGraphCell sourceCell = entityCells.get(rel.getSourceEntity().getName()); DefaultGraphCell targetCell = entityCells.get(rel.getTargetEntity().getName()); edge.setSource(sourceCell != null ? sourceCell.getChildAt(0) : null); edge.setTarget(targetCell != null ? targetCell.getChildAt(0) : null); Object[] labels = { rel.getName() + " " + getRelationshipLabel(rel), reverse == null ? "" : reverse.getName() + " " + getRelationshipLabel(reverse) }; GraphConstants.setExtraLabels(edge.getAttributes(), labels); Point2D[] labelPositions = { new Point2D.Double(GraphConstants.PERMILLE * (0.1 + 0.2 * Math.random()), 10), new Point2D.Double(GraphConstants.PERMILLE * (0.9 - 0.2 * Math.random()), -10) }; GraphConstants.setExtraLabelPositions(edge.getAttributes(), labelPositions); }
private void createArrow(int source, int target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells[source].getChildAt(0)); edge.setTarget(stateCells[target].getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); sourceArrows[sourceArrowIndex] = source; sourceArrowIndex++; targetArrows[targetArrowIndex] = target; targetArrowIndex++; } }
private void createArrow(int source, int target) { if (!arrowAlreadyExist(source, target)) { DefaultGraphCell[] arrowCell = new DefaultGraphCell[1]; DefaultEdge edge = new DefaultEdge(); edge.setSource(stateCells[source].getChildAt(0)); edge.setTarget(stateCells[target].getChildAt(0)); arrowCell[0] = edge; int arrow = GraphConstants.ARROW_TECHNICAL; GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); graph.getGraphLayoutCache().insert(arrowCell); sourceArrows[sourceArrowIndex] = source; sourceArrowIndex++; targetArrows[targetArrowIndex] = target; targetArrowIndex++; } }
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.AGOCondSubordinationRelationshipGroup ent=(ingenias.editor.entities.AGOCondSubordinationRelationshipGroup)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.WFPursue ent=(ingenias.editor.entities.WFPursue)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.IAccesses ent=(ingenias.editor.entities.IAccesses)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.GTDepends ent=(ingenias.editor.entities.GTDepends)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.IHasSpec ent=(ingenias.editor.entities.IHasSpec)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.WFConsumes ent=(ingenias.editor.entities.WFConsumes)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.WFUses ent=(ingenias.editor.entities.WFUses)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.AHasMSProcessor ent=(ingenias.editor.entities.AHasMSProcessor)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.UMLRealizes ent=(ingenias.editor.entities.UMLRealizes)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.UIPrecedes ent=(ingenias.editor.entities.UIPrecedes)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.GTAffects ent=(ingenias.editor.entities.GTAffects)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.AGOClientServerRelationshipOrg ent=(ingenias.editor.entities.AGOClientServerRelationshipOrg)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.CtxtNotifies ent=(ingenias.editor.entities.CtxtNotifies)((DefaultGraphCell)this.getCell()).getUserObject(); this.renderer1.setEntity(ent,jg.getModel().getAttributes(this.getCell())); JPanel uop=(JPanel)this.renderer1.getRendererComponent(null,null,false,false,false); if (ent.getPrefs(jg.getModel().getAttributes(this.getCell())).getView()==ingenias.editor.entities.ViewPreferences.ViewType.LABEL){ NAryEdge naryedge=(NAryEdge)this.getCell(); DefaultEdge[] edge=naryedge.getRepresentation(); AttributeMap am=edge[0].getAttributes(); GraphConstants.setLabelAlongEdge(am,true); GraphConstants.setExtraLabels(am,new Object[]{ent.getLabel()}); GraphConstants.setExtraLabelPositions(am,new Point2D[]{new Point2D.Double(GraphConstants.PERMILLE*7/8, -20)}); edge[0].setAttributes(am); } return (Component)uop; } catch (Exception e) { e.printStackTrace(); ingenias.editor.Log.getInstance().log("WARNING!!!"+e.getMessage()); } return super.getRendererComponent(jg,b1,b2,b3); } // Default size with entity ent inside