Exemplo n.º 1
0
    public boolean stopCellEditing() {
      ConflictCell pc = (ConflictCell) graph.getEditingCell();
      Conflict conflict = (Conflict) pc.getUserObject();

      conflict.setTopic(topic.getText());
      conflict.setViewpoints(new String[] {vp1.getDescription(), vp2.getDescription()});
      return super.stopCellEditing();
    }
Exemplo n.º 2
0
    public Component getGraphCellEditorComponent(JGraph graph, Object value, boolean isSelected) {

      ConflictCell cc = (ConflictCell) editingCell;
      Conflict c = (Conflict) cc.getUserObject();

      topic.setText(c.getTopic());

      vp1.setDescription(c.getViewpoints()[0]);
      vp2.setDescription(c.getViewpoints()[1]);

      return editorComponent;
    }
Exemplo n.º 3
0
  public Component getRendererComponent(
      JGraph graph, CellView view, boolean sel, boolean focus, boolean preview) {

    ConflictCell cc = (ConflictCell) view.getCell();
    Conflict conflict = (Conflict) cc.getUserObject();

    if (conflict.getTopic().length() > 0) {
      conflictLabel.setText("<html><center>" + conflict.getTopic() + "</center></html>");
    } else {
      conflictLabel.setText("<html><center>Konflikt</center></html>");
    }

    return component;
  }