コード例 #1
1
  public void actionCancelUpdate() {
    // if it's a new config we need to fire the delete event to have the
    // control removed, since the entity will not be saved
    if (userConfig.getId() < 1) {
      fireEvent(EVENT_TYPE_DELETE);
      return;
    }

    ibName.setText(userConfig.getName());
    ibDescription.setText(userConfig.getDescription());
    if (userConfig.isPublic()) {
      rbtnYes.setSelected(true);
    } else {
      rbtnNo.setSelected(true);
    }

    editMode = false;
    requireRedraw();
  }
コード例 #2
1
  private void updateFieldsValues() {
    lblName.setText(userConfig.getName());
    lblDescription.setText(userConfig.getDescription() != null ? userConfig.getDescription() : "");
    lblDate.setText(sdf.format(userConfig.getCreatedAt()));
    if (userConfig.getOwner() != null) {
      lblOwner.setText(
          userConfig.getOwner().getNachname() + ", " + userConfig.getOwner().getVorname());
    } else {
      lblOwner.setText("- Unknown -");
    }

    ibName.setText(userConfig.getName());
    ibDescription.setText(userConfig.getDescription() != null ? userConfig.getDescription() : "");
    if (userConfig.isPublic()) {
      rbtnYes.setSelected(true);
    } else {
      rbtnNo.setSelected(true);
    }
  }
コード例 #3
1
  private void createDimMappingEditor() {
    inpKey = new InputBox(this, "inpKey");
    inpKey.setWidth(300);

    inpDescription = new InputBox(this, "inpDescription");
    inpDescription.setMultiLine(true);
    inpDescription.setRows(3);
    inpDescription.setWidth(300);

    lbcDimension = new ListBox(this, "lbcDimension");
    lbcDimension.setChangeNotification(true);
    lbcDimension.addElementSelectedListener(
        new ElementSelectedListener() {
          public void elementSelected(ElementSelectedEvent event) {
            onDimensionSelection((String) event.getElement());
          }
        });
    for (IDimension dim : dataPool.getDimensions()) {
      String title =
          dim.getTitle() != null ? dim.getKey() + "(" + dim.getTitle() + ")" : dim.getKey();
      lbcDimension.addElement(title, dim.getKey());
    }

    chkOnUnmapped = new RadioGroup(this, "chkOnUnmapped");
    chkOnUnmapped.setChangeNotification(true);
    chkOnUnmapped.addElement("Create", "CREATE");
    chkOnUnmapped.addElement("Skip", "SKIP");
    chkOnUnmapped.addElement("Assign To", "ASSIGN");
    chkOnUnmapped.addElement("Fail", "FAIL");

    chkOptions = new CheckBoxGroup(this, "chkOptions");
    chkOptions.addElement("Autocreate Mapping", "autocreate");

    new Label(this, "elmSelector").setText("");
    elmSelector = null;

    /*
     * Load Initial Values
     */
    if (dimMapping.getKey() != null) {
      inpKey.setText(dimMapping.getKey());
      inpKey.setEnabled(false);
    }
    inpDescription.setText(dimMapping.getDescription() != null ? dimMapping.getDescription() : "");
    lbcDimension.setSelectedKey(
        dimMapping.getDimensionKey() != null ? dimMapping.getDimensionKey() : "");

    chkOnUnmapped.setSelectedKey(dimMapping.getOnUnmapped().name());

    if (dimMapping.isAutoCreateMapping()) {
      chkOptions.setSelectedKey("autocreate");
    }

    if (elmSelector != null
        && dimMapping.getUnmappedPath() != null
        && dimMapping.getUnmappedPath().length() != 0) {
      IDimension dimension = elmSelector.getDimension();
      try {
        IDimensionElement elm = dimension.parsePath(dimMapping.getUnmappedPath());
        elmSelector.setDimensionElement(elm);
      } catch (Exception e) {
        errInfo.showError("Error restoring unmapped value - element removed?: " + e);
      }
    }

    inpTestString = new InputBox(this, "inpTestString");
    inpTestString.setWidth(600);

    Button btTest = new Button(this, "btTest");
    btTest.setTitle("Test");
    btTest.addSelectionListener(
        new SelectionListener() {
          /* (non-Javadoc)
           * @see de.jwic.events.SelectionListener#objectSelected(de.jwic.events.SelectionEvent)
           */
          public void objectSelected(SelectionEvent event) {
            applyTest();
          }
        });
  }
コード例 #4
0
ファイル: PathInfoControl.java プロジェクト: ApipA/jWic
  private void updatePath() {

    File path = model.getDirectory();
    int l = root.getAbsolutePath().length();
    txtPath.setText(path.getAbsolutePath().substring(l));
  }