コード例 #1
0
  /**
   * Sets the predefinedIdState
   *
   * @param predefinedIdState the predefinedIdState to set
   */
  public void setPredefinedIdState(String predefinedIdState) {
    String oldPredefinedIdState = this.predefinedIdState;
    this.predefinedIdState = predefinedIdState;

    // change also the controller descriptor as a consequence
    this.descriptor =
        PropertyEditorControllerService.getInstance()
            .createPredefinedControllerDescriptor(predefinedIdState);

    changeSupport.firePropertyChange("predefinedId", oldPredefinedIdState, this.predefinedIdState);
    changeSupport.firePropertyChange("descriptor", null, descriptor);
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public void createPreview(Composite composite) {
    PropertyEditorController controller =
        PropertyEditorControllerService.getInstance()
            .createPropertyEditorController(Collections.emptyList(), composite, descriptor);

    if (controller != null) {
      // use the state to create this
      controller.createPropertyEditor(
          this.getDescriptor().getEditorDescriptor(), new TabbedPropertySheetWidgetFactory());
    }
  }