protected IFigure createFigure() {
    Component component = getModel();
    assert component != null;

    // Create the composite figure.
    RoundedRectangle figure = new RoundedRectangle();
    BorderLayout layout = new BorderLayout();
    figure.setLayoutManager(layout);
    figure.add(new Label(component.getName()), BorderLayout.CENTER);

    figure.setBackgroundColor(ColorConstants.titleInactiveBackground);
    figure.setCornerDimensions(new Dimension(8, 8));
    // figure.setAntialias(1);

    // Set visibility.
    visibility = _getVisibilityProperty();
    updateFigureVisibility(figure, visibility);

    Rectangle bounds = getParent().getComponentBounds(component.getID());
    if (bounds != null) {
      figure.setBounds(bounds);
      _setLocationProperty(bounds.getTopLeft());
    }

    return figure;
  }
  public void activate() {
    if (isActive()) return;

    super.activate();
    delegate = new PropertyChangeDelegate(this);

    Component component = getModel();
    component.addPropertyChangeListener(delegate);

    if (getParent().clearNewlyCreatedFlag(component.getID())) {
      performDirectEdit();
    }
  }