Пример #1
0
 public void closePanel() {
   storeConstants();
   Config.getInstance().setMail_split_position((int) this.getSize().getHeight());
   CurrentGui.getInstance().getGui().setMailPanelEnabled(false);
 }
Пример #2
0
  public MailPanel() {

    initAndFillComponents();

    setLayout(layout);
    setSize(new Dimension(0, Config.getInstance().getMail_split_position()));

    int line = 0;
    addComponent(
        this,
        layout,
        Box.createRigidArea(new Dimension(0, verticalDividerSpace)),
        0,
        line,
        10,
        1,
        fillWidth,
        fullWeight,
        0,
        noPadding);
    line++;
    addComponent(this, layout, lb_to, 0, line, 1, 1, fillWidth, noWeight, 0, paddingLeftLabel);
    addComponent(this, layout, tf_to, 1, line, 1, 1, fillWidth, leftWeight, 0, paddingText);
    addComponent(this, layout, lb_from, 2, line, 1, 1, fillWidth, noWeight, 0, paddingRightLabel);
    addComponent(
        this, layout, tf_from, 3, line, 1, 1, fillWidth, rightWeight, 0, paddingRightLabel);
    addComponent(this, layout, lnk_smtpInfo, 4, line, 1, 1, fillWidth, noWeight, 0, paddingText);
    line++;
    addComponent(this, layout, lb_cc, 0, line, 1, 1, fillWidth, noWeight, 0, paddingLeftLabel);
    addComponent(this, layout, tf_cc, 1, line, 1, 1, fillWidth, leftWeight, 0, paddingText);
    addComponent(this, layout, lb_smtp, 2, line, 1, 1, fillWidth, noWeight, 0, paddingRightLabel);
    addComponent(
        this, layout, tf_smtp, 3, line, 1, 1, fillWidth, rightWeight, 0, paddingRightLabel);
    addComponent(this, layout, cb_smtp_auth, 4, line, 1, 1, fillWidth, noWeight, 0, paddingText);
    line++;
    addComponent(this, layout, lb_bcc, 0, line, 1, 1, fillWidth, noWeight, 0, paddingLeftLabel);
    addComponent(this, layout, tf_bcc, 1, line, 1, 1, fillWidth, leftWeight, 0, paddingText);
    addComponent(
        this, layout, lb_smtpUser, 2, line, 1, 1, fillWidth, noWeight, 0, paddingRightLabel);
    addComponent(
        this, layout, tf_smtpUser, 3, line, 1, 1, fillWidth, rightWeight, 0, paddingRightLabel);
    line++;
    addComponent(this, layout, lb_subject, 0, line, 1, 1, fillWidth, noWeight, 0, paddingLeftLabel);
    addComponent(this, layout, tf_subject, 1, line, 1, 1, fillWidth, leftWeight, 0, paddingText);
    addComponent(this, layout, lb_smtpPW, 2, line, 1, 1, fillWidth, noWeight, 0, paddingRightLabel);
    addComponent(
        this, layout, pf_smtpPW, 3, line, 1, 1, fillWidth, rightWeight, 0, paddingRightLabel);
    addComponent(this, layout, cb_pwSave, 4, line, 1, 1, fillWidth, noWeight, 0, paddingCheckbox);
    line++;
    addComponent(
        this,
        layout,
        Box.createRigidArea(new Dimension(0, verticalDividerSpace)),
        0,
        line,
        10,
        1,
        fillWidth,
        fullWeight,
        0,
        noPadding);
    line++;
    addComponent(this, layout, sp_text, 0, line, 5, 1, fillBoth, leftWeight, 1, paddingMessagebox);
    line++;
    addComponent(
        this,
        layout,
        panel_attachmentsWithButton,
        1,
        line,
        5,
        1,
        fillWidth,
        fullWeight,
        0,
        noPadding);
    line++;
    addComponent(
        this,
        layout,
        Box.createRigidArea(new Dimension(0, verticalDividerSpace)),
        0,
        line,
        4,
        1,
        fillWidth,
        fullWeight,
        0,
        noPadding);
  }