コード例 #1
0
  private boolean _assignValues(File fle) {
    String strMethod = "_assignValues(fle)";

    if (fle == null) {
      MySystem.s_printOutError(this, strMethod, "nil fle");
      return false;
    }

    // --
    // allow overwriting
    // --

    if (super._tfdCurSelection_ == null) {
      MySystem.s_printOutError(this, strMethod, "nil super._tfdCurSelection_");
      return false;
    }

    super._tfdCurSelection_.setText(fle.getAbsolutePath());
    super._setSelectedValue_(true);

    if (super._btnClearSelection_ == null) {
      MySystem.s_printOutError(this, strMethod, "nil super._btnClearSelection_");
      return false;
    }

    super._btnClearSelection_.setEnabled(true);

    // --
    // ending
    return true;
  }
コード例 #2
0
  public PSelBtnTfdFileSaveShk(
      javax.swing.event.DocumentListener docListenerParent,
      Frame frmParent,
      ItemListener itmListenerParent) {
    super(
        docListenerParent, frmParent, PSelBtnTfdFileSaveShk.f_s_strLabel, true // blnFieldRequired
        );

    super._tfdCurSelection_
        .getDocument()
        .putProperty(
            com.google.code.p.keytooliui.shared.swing.textfield.TFAbstract.f_s_strDocPropKey,
            (Object) PSelBtnTfdFileSaveShk.f_s_strDocPropVal);

    this._btnTypeFileShkDer =
        new RBTypeShkDer(
            true, // blnEnabledButton, if just one button, disabling it
            itmListenerParent);

    this._btnTypeFileShkPem = new RBTypeShkPem(true, itmListenerParent);

    if (this._btnTypeFileShkPem != null) this._btnTypeFileShkPem.addItemListener(this);

    this._btnTypeFileShkDer.addItemListener(this);
  }
コード例 #3
0
  public void destroy() {
    super.destroy();

    if (this._btnTypeFileShkPem != null) {
      this._btnTypeFileShkPem.removeItemListener(this);
      this._btnTypeFileShkPem.destroy();
      this._btnTypeFileShkPem = null;
    }

    if (this._btnTypeFileShkDer != null) {
      this._btnTypeFileShkDer.removeItemListener(this);
      this._btnTypeFileShkDer.destroy();
      this._btnTypeFileShkDer = null;
    }
  }
コード例 #4
0
  /** grouping PKCS7-[XXX]-[XXX] files */
  private boolean _addGroup() {
    String strMethod = "_addGroup()";

    // adding radioButtons/labelChecks for selecting in between JAR, and JHR, and RCR files

    if (this._btnTypeFileShkDer == null) {
      MySystem.s_printOutError(this, strMethod, "nil this._btnTypeFileShk[xxx]");
      return false;
    }

    // ----

    ButtonGroup bgp = new ButtonGroup();
    // bgp.add(this._btnTypeFileShkPkcs7);

    if (this._btnTypeFileShkPem != null) bgp.add(this._btnTypeFileShkPem);

    bgp.add(this._btnTypeFileShkDer);

    if (bgp.getButtonCount() < 2) {
      this._btnTypeFileShkDer.setEnabled(false);
    }

    // selecting first button
    this._btnTypeFileShkDer.setSelected(true);

    // else label: done at construction time

    // --
    JPanel pnlTypeFileShk = new JPanel();
    pnlTypeFileShk.setLayout(new BoxLayout(pnlTypeFileShk, BoxLayout.Y_AXIS));
    pnlTypeFileShk.add(this._btnTypeFileShkDer); // default

    if (this._btnTypeFileShkPem != null) pnlTypeFileShk.add(this._btnTypeFileShkPem);

    // --
    if (super._pnl_ == null) {
      MySystem.s_printOutError(this, strMethod, "nil super._pnl_");
      return false;
    }

    super._pnl_.add(pnlTypeFileShk);

    // ending
    return true;
  }