protected DefaultEdge createRelationshipCell(Relationship rel) { if (!relCells.containsKey(getQualifiedName(rel))) { Relationship reverse = rel.getReverseRelationship(); DefaultEdge edge = new DefaultEdge(); // GraphConstants.setLineStyle(edge.getAttributes(), // GraphConstants.STYLE_ORTHOGONAL); // GraphConstants.setRouting(edge.getAttributes(), // GraphConstants.ROUTING_SIMPLE); GraphConstants.setEditable(edge.getAttributes(), false); GraphConstants.setLabelAlongEdge(edge.getAttributes(), true); GraphConstants.setSelectable(edge.getAttributes(), false); GraphConstants.setFont(edge.getAttributes(), EDGE_FONT); updateRelationshipLabels(edge, rel, reverse); relCells.put(getQualifiedName(rel), edge); if (reverse != null) { relCells.put(getQualifiedName(reverse), edge); } return edge; } return null; }
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.AUMLSendSimple ent=(ingenias.editor.entities.AUMLSendSimple)((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