コード例 #1
0
  /** @generated */
  protected NodeFigure createNodePlate() {
    String prefElementId = "Comment";
    IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
    String preferenceConstantWitdh =
        PreferenceInitializerForElementHelper.getpreferenceKey(
            getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
    String preferenceConstantHeight =
        PreferenceInitializerForElementHelper.getpreferenceKey(
            getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
    DefaultSizeNodeFigure result =
        new DefaultSizeNodeFigure(
            store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));

    return result;
  }
コード例 #2
0
  /** @generated */
  protected NodeFigure createNodePlate() {
    String prefElementId = "RedefinableTemplateSignature";
    IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
    String preferenceConstantWitdh =
        PreferenceInitializerForElementHelper.getpreferenceKey(
            getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
    String preferenceConstantHeight =
        PreferenceInitializerForElementHelper.getpreferenceKey(
            getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
    DefaultSizeNodeFigure result =
        new DefaultSizeNodeFigure(
            store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));

    // FIXME: workaround for #154536
    result.getBounds().setSize(result.getPreferredSize());
    return result;
  }