public CellViewRenderer getRenderer() {
    try {
      return this.renderer;
    } catch (Exception e) {
      e.printStackTrace();
      ingenias.editor.Log.getInstance().log(e.getMessage());
    }

    return renderer;
  }
Esempio n. 2
0
 public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) {
   CellViewRenderer renderer = null;
   try {
     ingenias.editor.entities.IUIterate ent =
         (ingenias.editor.entities.IUIterate) ((DefaultGraphCell) this.getCell()).getUserObject();
     this.renderer.setEntity(ent, jg.getModel().getAttributes(this.getCell()));
     JPanel uop = (JPanel) this.renderer.getRendererComponent(jg, this, false, false, false);
     return (Component) uop;
   } catch (Exception e) {
     e.printStackTrace();
     ingenias.editor.Log.getInstance().log("WARNING!!!" + e.getMessage());
   }
   return super.getRendererComponent(jg, b1, b2, b3);
 }
Esempio n. 3
0
 public java.awt.Component getRendererComponent(JGraph jg, boolean b1, boolean b2, boolean b3) {
   CellViewRenderer renderer = null;
   try {
     ingenias.editor.entities.GTPursues ent =
         (ingenias.editor.entities.GTPursues) ((DefaultGraphCell) this.getCell()).getUserObject();
     this.renderer1.setEntity(ent);
     JPanel uop = (JPanel) this.renderer1.getRendererComponent(null, null, false, false, false);
     if (ent.getPrefs().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);
 }