예제 #1
0
  /** @see org.eclipse.gef.EditPart#setSelected(int) */
  public void setSelected(int value) {
    super.setSelected(value);

    if (getCastedModel().getConnectionLabel() != null) {
      ConnLabelEditPart part = (ConnLabelEditPart) children.get(0);
      if (part.getSelected() != value) part.setSelected(value);
    }
  }
예제 #2
0
  /** @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals() */
  protected void refreshVisuals() {
    super.refreshVisuals();

    PolylineConnection fig = (PolylineConnection) getFigure();
    Object constraint = getCastedModel().getBendpoints();
    fig.setRoutingConstraint(constraint);

    // Effettuo il refresh della ConnectionLabel associata
    if (!getChildren().isEmpty()) {
      ConnLabelEditPart connEP = (ConnLabelEditPart) getChildren().get(0);
      connEP.refreshVisuals();
    }
  }