コード例 #1
0
ファイル: WPaySelect.java プロジェクト: kimhatrung/Adempiere
  /** Load Bank Info - Load Info from Bank Account and valid Documents (PaymentRule) */
  private void loadBankInfo() {
    BankInfo bi = (BankInfo) fieldBankAccount.getSelectedItem().getValue();
    if (bi == null) return;
    labelCurrency.setText(bi.Currency);
    labelBalance.setText(m_format.format(bi.Balance));

    //  PaymentRule
    fieldPaymentRule.removeAllItems();

    ArrayList<ValueNamePair> paymentRuleData = getPaymentRuleData(bi);
    for (ValueNamePair vp : paymentRuleData) fieldPaymentRule.appendItem(vp.getName(), vp);
    fieldPaymentRule.setSelectedIndex(0);
  } //  loadBankInfo
コード例 #2
0
ファイル: WPaySelect.java プロジェクト: kimhatrung/Adempiere
 /** Calculate selected rows. - add up selected rows */
 public void calculateSelection() {
   dataStatus.setText(calculateSelection(miniTable));
   //
   bGenerate.setEnabled(m_noSelected != 0);
 } //  calculateSelection
コード例 #3
0
 /** Set Label to product or bp name */
 private void fillLabel(String sql, int parameter) {
   if (log.isLoggable(Level.FINE)) log.fine(sql + "; Parameter=" + parameter);
   String retValue = DB.getSQLValueString(null, sql, parameter);
   if (retValue != null) label.setText(retValue);
 } //	fillLabel
コード例 #4
0
ファイル: WPaySelect.java プロジェクト: kimhatrung/Adempiere
  /**
   * Static Init
   *
   * @throws Exception
   */
  private void zkInit() throws Exception {
    //
    form.appendChild(mainPanel);
    mainPanel.appendChild(mainLayout);
    mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
    mainLayout.setHeight("100%");
    mainLayout.setWidth("99%");
    parameterPanel.appendChild(parameterLayout);
    //
    labelBankAccount.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
    fieldBankAccount.addActionListener(this);
    labelBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
    fieldBPartner.addActionListener(this);
    bRefresh.addActionListener(this);
    labelPayDate.setText(Msg.translate(Env.getCtx(), "PayDate"));
    labelPaymentRule.setText(Msg.translate(Env.getCtx(), "PaymentRule"));
    fieldPaymentRule.addActionListener(this);
    labelDtype.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
    fieldDtype.addActionListener(this);
    //
    labelBankBalance.setText(Msg.translate(Env.getCtx(), "CurrentBalance"));
    labelBalance.setText("0");
    onlyDue.setText(Msg.getMsg(Env.getCtx(), "OnlyDue"));
    dataStatus.setText(" ");
    dataStatus.setPre(true);
    //
    bGenerate.addActionListener(this);
    bCancel.addActionListener(this);
    //
    North north = new North();
    north.setStyle("border: none");
    mainLayout.appendChild(north);
    north.appendChild(parameterPanel);

    Rows rows = parameterLayout.newRows();
    Row row = rows.newRow();
    row.appendChild(labelBankAccount.rightAlign());
    row.appendChild(fieldBankAccount);
    row.appendChild(labelBankBalance.rightAlign());
    Panel balancePanel = new Panel();
    balancePanel.appendChild(labelCurrency);
    balancePanel.appendChild(labelBalance);
    row.appendChild(balancePanel);
    row.appendChild(new Space());

    row = rows.newRow();
    row.appendChild(labelBPartner.rightAlign());
    row.appendChild(fieldBPartner);
    row.appendChild(new Space());
    row.appendChild(onlyDue);
    row.appendChild(new Space());

    row = rows.newRow();
    row.appendChild(labelDtype.rightAlign());
    row.appendChild(fieldDtype);
    row.appendChild(new Space());
    row.appendChild(new Space());
    row.appendChild(new Space());

    row = rows.newRow();
    row.appendChild(labelPayDate.rightAlign());
    row.appendChild(fieldPayDate.getComponent());
    row.appendChild(labelPaymentRule.rightAlign());
    row.appendChild(fieldPaymentRule);
    row.appendChild(bRefresh);

    South south = new South();
    south.setStyle("border: none");
    mainLayout.appendChild(south);
    southPanel = new Panel();
    southPanel.appendChild(dataStatus);
    south.appendChild(southPanel);
    Center center = new Center();
    mainLayout.appendChild(center);
    center.appendChild(miniTable);
    //
    commandPanel.addButton(bGenerate);
    commandPanel.getButton(ConfirmPanel.A_OK).setVisible(false);
  } //  jbInit
コード例 #5
0
  /** Ststic Init */
  void jbInit() throws Exception {
    label.setText("Label");

    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);

    Tabpanels tabpanels = new Tabpanels();
    tabbox.appendChild(tabpanels);

    tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "PriceHistory")));
    tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyReserved")));
    tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyOrdered")));
    tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "QtyUnconfirmed")));

    if (m_M_Product_ID != 0) tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "ATP")));

    pricePane.setHeight("100%");
    pricePane.appendChild(m_tablePrice);
    tabpanels.appendChild(pricePane);

    reservedPane.setHeight("100%");
    reservedPane.appendChild(m_tableReserved);
    tabpanels.appendChild(reservedPane);

    orderedPane.setHeight("100%");
    orderedPane.appendChild(m_tableOrdered);
    tabpanels.appendChild(orderedPane);

    unconfirmedPane.setHeight("100%");
    unconfirmedPane.appendChild(m_tableUnconfirmed);
    tabpanels.appendChild(unconfirmedPane);

    if (m_M_Product_ID != 0) {
      atpPane.setHeight("100%");
      atpPane.appendChild(m_tableAtp);
      tabpanels.appendChild(atpPane);
    }

    tabbox.setSelectedIndex(0);
    tabbox.addEventListener(Events.ON_SELECT, this);
    confirmPanel.addActionListener(this);

    Borderlayout borderlayout = new Borderlayout();
    this.setWidth("700px");
    this.setHeight("400px");
    borderlayout.setStyle("border: none; position: relative");
    this.appendChild(borderlayout);
    this.setClosable(true);

    North north = new North();
    north.setStyle("border: none");
    borderlayout.appendChild(north);
    north.appendChild(label);

    Center center = new Center();
    center.setSclass("dialog-content");
    center.setAutoscroll(true);
    borderlayout.appendChild(center);
    center.appendChild(tabbox);
    tabbox.setVflex("1");
    tabbox.setHflex("1");

    South south = new South();
    south.setSclass("dialog-footer");
    borderlayout.appendChild(south);
    south.appendChild(confirmPanel);
  } //	jbInit