/** * 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); }
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
public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) { CellViewRenderer renderer=null; try { ingenias.editor.entities.SimulationPursues ent=(ingenias.editor.entities.SimulationPursues)((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.ODecomposesWF ent=(ingenias.editor.entities.ODecomposesWF)((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.AGORelationshipOrg ent=(ingenias.editor.entities.AGORelationshipOrg)((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.WFUsesMethod ent=(ingenias.editor.entities.WFUsesMethod)((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.WSConnects ent=(ingenias.editor.entities.WSConnects)((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
/** * Clones special object entried in the given map. */ public AttributeMap cloneEntries(AttributeMap newMap) { // Clone Bounds Rectangle2D bounds = GraphConstants.getBounds(newMap); if (bounds != null) GraphConstants.setBounds(newMap, (Rectangle2D) (bounds.clone())); // Clone List Of Points List points = GraphConstants.getPoints(newMap); if (points != null) GraphConstants.setPoints(newMap, clonePoints(points)); // Clone extra label positions Point2D[] positions = GraphConstants.getExtraLabelPositions(newMap); if (positions != null) GraphConstants.setExtraLabelPositions(newMap, clonePoints(positions)); // Clone Edge Label Point2D label = GraphConstants.getLabelPosition(newMap); if (label != null) GraphConstants.setLabelPosition(newMap, (Point2D) label.clone()); return newMap; }