Exemplo n.º 1
0
  /**
   * コンポーネントを初期化します。
   *
   * @throws Exception 初期化例外
   */
  private void jbInit() throws Exception {
    this.setLayout(new VRLayout());
    back.setText("戻る(R)");
    back.setIconPath(ACConstants.ICON_PATH_BACK_24);
    if (title.getFont() != null) {
      title.setFont(
          new java.awt.Font(
              title.getFont().getName(),
              title.getFont().getStyle(),
              (int) (title.getFont().getSize() * 20.0 / 11.0)));
    }

    title.setBorder(javax.swing.BorderFactory.createEmptyBorder(4, 8, 4, 8));
    title.setText("業務タイトル");
    title.setHorizontalAlignment(SwingConstants.CENTER);
    back.setText("戻る(R)");
    back.setMnemonic('R');
    back.addActionListener(
        new ActionListener() {
          protected boolean lockFlag = false;

          public void actionPerformed(ActionEvent e) {
            if (lockFlag) {
              return;
            }
            lockFlag = true;
            try {
              ACFrame.getInstance().back();
            } catch (Exception ex) {
              // 例外の処理はイベント委譲
              ACFrame.getInstance().showExceptionMessage(ex);
            }
            lockFlag = false;
          }
        });
    this.add(back, VRLayout.WEST);
    this.add(title, VRLayout.WEST);

    String osName = System.getProperty("os.name");
    if ((osName != null) && (osName.indexOf("Mac") < 0)) {
      title.setForeground(java.awt.Color.white);
      // FIXME カラー変更
      // this.setBackground(new java.awt.Color(0, 51, 153));
      this.setBackground(themaColor);
    }
  }
Exemplo n.º 2
0
 /**
  * 業務タイトルを返します。
  *
  * @return 業務タイトル
  */
 public String getText() {
   return title.getText();
 }
  private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    contentPane.add(client);

    VRLayout clientLayout = new VRLayout();
    clientLayout.setHgap(2);
    clientLayout.setVgap(2);
    client.setLayout(clientLayout);
    client.add(insurerNmContainer, VRLayout.FLOW_INSETLINE);
    client.add(insurerNoPnl, VRLayout.FLOW_RETURN);
    client.add(jigyoushoNoContainer, VRLayout.FLOW_INSETLINE);
    client.add(btnPnl, VRLayout.FLOW_RETURN);

    insurerNmContainer.setText("保険者番号");
    insurerNmContainer.add(insurerNm, null);
    insurerNm.setEditable(false);
    insurerNm.setPreferredSize(new Dimension(280, 19));
    insurerNm.setBindPath("INSURER_NM");

    VRLayout insurerNoPnlLayout = new VRLayout();
    insurerNoPnlLayout.setHgap(0);
    insurerNoPnlLayout.setVgap(0);
    insurerNoPnlLayout.setAutoWrap(false);
    insurerNoPnl.setLayout(insurerNoPnlLayout);
    insurerNoPnl.add(insurerNoCaption1, VRLayout.FLOW);
    insurerNoPnl.add(insurerNoField, VRLayout.FLOW);
    insurerNoPnl.add(insurerNoCaption2, VRLayout.FLOW);
    insurerNoCaption1.setText("(");
    insurerNoField.setColumns(6);
    insurerNoField.setEditable(false);
    insurerNoField.setBindPath("INSURER_NO");
    insurerNoCaption2.setText(")");

    jigyoushoNoContainer.setText("事業所番号");
    VRLayout jigyoushoNoContainerLayout = new VRLayout();
    jigyoushoNoContainerLayout.setHgap(0);
    jigyoushoNoContainerLayout.setVgap(1);
    jigyoushoNoContainerLayout.setAutoWrap(false);
    jigyoushoNoContainer.add(jigyoushoNoField, VRLayout.FLOW);
    jigyoushoNoContainer.add(jigyoushoNoCaption, VRLayout.FLOW);
    jigyoushoNoField.setColumns(10);
    jigyoushoNoField.setMaxLength(10);
    jigyoushoNoField.setIMEMode(InputSubset.LATIN_DIGITS);
    jigyoushoNoField.setCharType(VRCharType.ONLY_DIGIT);
    // jigyoushoNoField.setCharType(VRCharType.ONLY_ALNUM);
    jigyoushoNoField.setBindPath("JIGYOUSHA_NO");
    jigyoushoNoCaption.setText("(数字10桁)");
    jigyoushoNoCaption.setForeground(IkenshoConstants.COLOR_MESSAGE_TEXT_FOREGROUND);

    VRLayout btnPnlLayout = new VRLayout();
    btnPnlLayout.setHgap(0);
    btnPnlLayout.setVgap(0);
    btnPnlLayout.setAutoWrap(false);
    btnPnl.setLayout(btnPnlLayout);
    btnPnl.add(submit, VRLayout.FLOW);
    btnPnl.add(close, VRLayout.FLOW);
    submit.setText("登録(S)");
    submit.setMnemonic('S');
    close.setText("閉じる(C)");
    close.setMnemonic('C');
  }