use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WCollect method zkInit.
/**
* Instance Window and fill fields
* @return void
*/
private void zkInit() {
//
mainPanel = new Panel();
Borderlayout mainLayout = new Borderlayout();
layout = GridFactory.newGridLayout();
eastlayout = GridFactory.newGridLayout();
// Panels
centerPanel = new Panel();
Panel eastPanel = new Panel();
mainPanel.appendChild(mainLayout);
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
//
north = new North();
north.setStyle("border: none; ");
mainLayout.appendChild(north);
north.appendChild(eastPanel);
eastPanel.appendChild(eastlayout);
eastlayout.setWidth("100%");
eastlayout.setHeight("100%");
rows = eastlayout.newRows();
row = rows.newRow();
row.appendChild(new Space());
Label fsLabel = new Label(Msg.translate(p_ctx, "PayAmt") + ":");
fsLabel.setStyle(FONT_SIZE + FONT_BOLD);
fPayAmt = new Label();
// fPayAmt.setText(getPrePayAmt().toString());
row.appendChild(fsLabel.rightAlign());
row.appendChild(fPayAmt.rightAlign());
fPayAmt.setStyle(FONT_SIZE);
row = rows.newRow();
row.appendChild(new Space());
// Add Payment Amount
Label lOpenAmt = new Label(Msg.translate(p_ctx, "OpenAmt") + ":");
lOpenAmt.setStyle(FONT_SIZE + FONT_BOLD);
row.appendChild(lOpenAmt.rightAlign());
fOpenAmt = new Label();
fOpenAmt.setStyle(FONT_SIZE);
row.appendChild(fOpenAmt.rightAlign());
fReturnAmt = new Label();
lReturnAmt = new Label(Msg.translate(p_ctx, "AmountReturned") + ":");
lReturnAmt.setStyle(FONT_SIZE + FONT_BOLD);
fReturnAmt.setStyle(FONT_SIZE);
row = rows.newRow();
row.appendChild(new Space());
fReturnAmt = new Label();
lReturnAmt = new Label(Msg.translate(p_ctx, "AmountReturned") + ":");
lReturnAmt.setStyle(FONT_SIZE + FONT_BOLD);
fReturnAmt.setStyle(FONT_SIZE);
row.appendChild(lReturnAmt.rightAlign());
row.appendChild(fReturnAmt.rightAlign());
fReturnAmt.addEventListener("onFocus", this);
row = rows.newRow();
row.appendChild(new Space());
fsPaidAmtLabel = new Label(Msg.translate(p_ctx, "PaidAmt") + ":");
fsPaidAmtLabel.setStyle(FONT_SIZE + FONT_BOLD);
fPaidAmt = new Label();
row.appendChild(fsPaidAmtLabel.rightAlign());
row.appendChild(fPaidAmt.rightAlign());
fPaidAmt.setStyle(FONT_SIZE);
// Button Plus
bPlus = createButtonAction("Plus", KeyStroke.getKeyStroke(KeyEvent.VK_F3, Event.F3));
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(bPlus);
confirm = new ConfirmPanel(true);
confirm.addActionListener(this);
confirm.getOKButton().setWidth("55px");
confirm.getOKButton().setHeight("55px");
confirm.getButton(ConfirmPanel.A_CANCEL).setWidth("55px");
confirm.getButton(ConfirmPanel.A_CANCEL).setHeight("55px");
row.appendChild(confirm);
row.setHeight("60px");
Center center = new Center();
center.setStyle("border: none; overflow-y:auto;overflow-x:hidden;");
mainLayout.appendChild(center);
center.appendChild(centerPanel);
centerPanel.appendChild(layout);
layout.setWidth("100%");
layout.setHeight("100%");
layout.setStyle("overflow:auto;");
rows = layout.newRows();
row = rows.newRow();
row.setWidth("100%");
// Completed Standard Order: only prepayment possible
if (posPanel.getTotalLines().compareTo(Env.ZERO) == 1 && posPanel.isCompleted() && posPanel.isStandardOrder()) {
//fIsPrePayOrder.setEnabled(false);
// fIsCreditOrder.setEnabled(false);
//fIsPrePayOrder.setSelected(true);
} else // Not completed Order
if (posPanel.getTotalLines().compareTo(Env.ZERO) == 1 && !posPanel.isCompleted()) {
if (posPanel.isStandardOrder()) /*|| pos.isWarehouseOrder()*/
{
// Standard Order or Warehouse Order: no Credit Order, no prepayment
//fIsPrePayOrder.setEnabled(false);
//fIsPrePayOrder.setSelected(false);
// fIsCreditOrder.setEnabled(false);
// fIsCreditOrder.setSelected(false);
} else {
//fIsPrePayOrder.setEnabled(true);
// fIsCreditOrder.setEnabled(true);
}
} else {
//fIsPrePayOrder.setEnabled(false);
// fIsCreditOrder.setEnabled(false);
// if(posPanel.isCompleted() &&
// posPanel.getM_Order().isInvoiced() &&
// posPanel.getOpenAmt().compareTo(Env.ZERO)==1) {
// fIsCreditOrder.setSelected(true);
// }
}
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WPOS method setMPOS.
// dynInit
/**
* Set MPOS
* @return true if found/set
*/
private void setMPOS() {
int salesRep_ID = Env.getAD_User_ID(getCtx());
setPOS(salesRep_ID);
if (getM_POS() != null) {
validLocator();
return;
}
int orgId = Env.getAD_Org_ID(getCtx());
poss = getPOSByOrganization(orgId);
// Select POS
String msg = Msg.getMsg(ctx, "SelectPOS");
selection = new Window();
Panel mainPanel = new Panel();
Panel panel = new Panel();
selection.setTitle(msg);
Borderlayout mainLayout = new Borderlayout();
Grid layout = GridFactory.newGridLayout();
selection.appendChild(panel);
selection.setWidth("200px");
selection.setHeight("140px");
// North
Panel centerPanel = new Panel();
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
//
Center center = new Center();
center.setStyle("border: none");
mainLayout.appendChild(center);
center.appendChild(centerPanel);
centerPanel.appendChild(layout);
layout.setWidth("100%");
layout.setHeight("100%");
selection.appendChild(mainPanel);
Rows rows = null;
Row row = null;
rows = layout.newRows();
row = rows.newRow();
for (MPOS pos : poss) {
listTerminal.addItem(pos.getKeyNamePair());
}
okButton.addActionListener(this);
cancelButton.addEventListener("onClick", this);
okButton.setWidth("45px");
okButton.setHeight("45px");
cancelButton.setWidth("45px");
cancelButton.setHeight("45px");
listTerminal.setHeight("45px");
listTerminal.setStyle("height:45px;" + WPOS.FONTSIZEMEDIUM);
row.setSpans("2");
row.appendChild(listTerminal);
row.setHeight("45px");
row = rows.newRow();
confirm = new ConfirmPanel(true);
confirm.addActionListener(this);
confirm.getOKButton().setWidth("55px");
confirm.getOKButton().setHeight("55px");
confirm.getButton(ConfirmPanel.A_CANCEL).setWidth("55px");
confirm.getButton(ConfirmPanel.A_CANCEL).setHeight("55px");
row.appendChild(confirm);
row.setHeight("55px");
AEnv.showWindow(selection);
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WPOSKeyboard method init.
/**
* Initialize
* @param startText
* @param POSKeyLayout_ID
*/
public void init(int POSKeyLayout_ID) {
Panel panel = new Panel();
appendChild(panel);
// Content
Panel mainPanel = new Panel();
Borderlayout mainLayout = new Borderlayout();
Grid productLayout = GridFactory.newGridLayout();
appendChild(panel);
// North
Panel northPanel = new Panel();
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
//
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(northPanel);
northPanel.appendChild(productLayout);
productLayout.setWidth("100%");
appendChild(mainPanel);
Rows rows = null;
Row row = null;
rows = productLayout.newRows();
row = rows.newRow();
String txtCalcId = txtCalc.getId();
row.appendChild(txtCalc);
txtCalc.setName("number");
txtCalc.setWidth("92%");
WPOSKeyPanel keys = new WPOSKeyPanel(POSKeyLayout_ID, this, txtCalcId, keyBoardType);
center = new Center();
center.setStyle("border: none");
keys.setWidth("100%");
keys.setHeight("99%");
center.appendChild(keys);
mainLayout.appendChild(center);
South south = new South();
ConfirmPanel confirm = new ConfirmPanel(true, false, true, false, false, false, false);
confirm.addActionListener(this);
south.appendChild(confirm);
mainLayout.appendChild(south);
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WCreateFromWindow method zkInit.
protected void zkInit() throws Exception {
Borderlayout contentPane = new Borderlayout();
appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(parameterPanel);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(dataTable);
WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
Button selectAllButton = selectAllAction.getButton();
confirmPanel.addComponentsLeft(selectAllButton);
selectAllButton.addActionListener(this);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(confirmPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
setSizable(true);
setBorder("normal");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WDeleteEntity method zkInit.
private void zkInit() throws Exception {
//Form Init()
form.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
clientLabel.setText(Msg.getElement(Env.getCtx(), "AD_Client_ID"));
tableLabel.setText(Msg.getElement(Env.getCtx(), "AD_Table_ID"));
dryRun = new Checkbox(Msg.getMsg(Env.getCtx(), "DryRun"));
dryRun.setChecked(true);
ConfirmPanel panel = new ConfirmPanel(false, false, false, false, false, false, false);
bRefresh = panel.createButton(ConfirmPanel.A_REFRESH);
bRefresh.addActionListener(this);
//
parameterPanel.appendChild(parameterLayout);
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(parameterPanel);
Rows rows = null;
Row row = null;
parameterLayout.setWidth("100%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendChild(clientLabel.rightAlign());
row.appendChild(clientPick);
row.appendChild(tableLabel.rightAlign());
row.appendChild(tablePick);
// For Button
row = rows.newRow();
row.appendChild(new Hbox());
row.appendChild(dryRun);
row.appendChild(new Hbox());
row.appendChild(bRefresh);
//
centerPanel.appendChild(centerLayout);
centerLayout.setWidth("100%");
Center center = new Center();
mainLayout.appendChild(center);
center.setStyle("border: none");
center.appendChild(centerPanel);
tree = new Tree();
treeCols = new Treecols();
treeCol = new Treecol("");
treeCol2 = new Treecol();
centerPanel.appendChild(tree);
treeCols.appendChild(treeCol);
treeCols.appendChild(treeCol2);
tree.appendChild(treeCols);
center.setFlex(true);
center.setAutoscroll(true);
South south = new South();
south.appendChild(southPanel);
southPanel.appendChild(southLayout);
southPanel.setWidth("100%");
mainLayout.appendChild(south);
Rows rows2 = southLayout.newRows();
Row south_row = rows2.newRow();
south_row.appendChild(confirmPanel);
confirmPanel.addActionListener(this);
}
Aggregations