use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WAlertDialog method init.
private void init() {
setBorder("normal");
VerticalBox vbox = new VerticalBox();
appendChild(vbox);
Div div = new Div();
div.setHeight("500px");
div.setWidth("700px");
div.setStyle("overflow: auto; border: 1px solid");
vbox.appendChild(div);
Html html = new Html();
div.appendChild(html);
html.setContent(text);
vbox.appendChild(new Separator());
ConfirmPanel confirmPanel = new ConfirmPanel(false);
vbox.appendChild(confirmPanel);
confirmPanel.addActionListener(this);
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WContext method init.
private void init() {
setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
setBorder("normal");
setClosable(true);
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 85 / 100;
int width = SessionManager.getAppDesktop().getClientInfo().desktopWidth * 50 / 100;
this.setWidth(width + "px");
this.setHeight(height + "px");
this.setContentStyle("overflow: auto");
this.setSizable(true);
this.setMaximizable(true);
this.setTitle(Msg.getMsg(Env.getCtx(), "Context"));
Textbox contextText = new Textbox();
contextText.setMultiline(true);
contextText.setReadonly(true);
contextText.setWidth("100%");
contextText.setHeight("100%");
confirmPanel = new ConfirmPanel(false, false, false, false, false, false);
confirmPanel.addActionListener(Events.ON_CLICK, this);
confirmPanel.setStyle("border-top: 2px groove #444; padding-top: 4px");
Borderlayout mainPanel = new Borderlayout();
//mainPanel.setWidth("100%");
mainPanel.setHeight("100%");
Center center = new Center();
mainPanel.appendChild(center);
center.appendChild(contextText);
South south = new South();
mainPanel.appendChild(south);
south.appendChild(confirmPanel);
this.appendChild(mainPanel);
// Get the context
String[] contextArray = Env.getEntireContext(Env.getCtx());
Arrays.sort(contextArray);
contextText.setText("");
// Need a specific format to add the eol character.
// Otherwise, could use Arrays.toString(contextArray)
StringBuffer sb = new StringBuffer("");
if (contextArray.length > 0) {
String eol = System.getProperty("line.separator");
for (int i = 0; i < contextArray.length; i++) {
sb.append(contextArray[i] + eol);
}
}
contextText.setText(sb.toString());
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WDeleteSelection method initComponents.
/**
* Init components
*/
private void initComponents() {
container = new Window();
container.setTitle(Msg.getMsg(Env.getCtx(), "DeleteSelection"));
container.setAttribute("modal", Boolean.TRUE);
container.setWidth("500px");
container.setHeight("400px");
container.setBorder("normal");
container.setSizable(true);
container.setClosable(true);
container.setMaximizable(true);
// Init list
listbox = new Listbox();
// FR [ 2877111 ]
Vector<String> data = getData();
for (int i = 0; i < data.size(); i++) {
String record = data.get(i);
listbox.appendItem(record, record);
}
// Is a multiple selection
listbox.setMultiple(true);
// Instance Panel
confirmPanel = new ConfirmPanel(true);
//
Div div = new Div();
div.setStyle("width: 100%; height: 100%");
Pre pre = new Pre();
Text text = new Text(Msg.getMsg(Env.getCtx(), "DeleteSelectionDescription"));
text.setParent(pre);
pre.setParent(div);
//
Borderlayout layout = new Borderlayout();
layout.setParent(container);
layout.setWidth("100%");
layout.setHeight("100%");
North north = new North();
north.setParent(layout);
north.appendChild(div);
Center center = new Center();
center.setParent(layout);
center.setFlex(true);
center.appendChild(listbox);
listbox.setWidth("100%");
listbox.setVflex(true);
//
South south = new South();
south.setParent(layout);
south.appendChild(confirmPanel);
// Add Listener
confirmPanel.addActionListener(Events.ON_CLICK, this);
// Default Selected
if (isDefaultSelected() && getSelection() != null) {
listbox.setSelectedIndices(getSelection());
}
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WCRPDetail method jbInit.
private void jbInit() {
dateFrom = new WDateEditor("DateFrom", true, false, true, "DateFrom");
dateTo = new WDateEditor("DateTo", true, false, true, "DateTo");
Rows rows = new Rows();
Row row = null;
new GridFactory();
Grid northPanel = GridFactory.newGridLayout();
rows.setParent(northPanel);
row = rows.newRow();
row.appendChild(new Label(Msg.translate(Env.getCtx(), "S_Resource_ID")).rightAlign());
row.appendChild(resource.getComponent());
row.appendChild(new Label(Msg.translate(Env.getCtx(), "DateFrom")).rightAlign());
row.appendChild(dateFrom.getComponent());
row.appendChild(new Label(Msg.translate(Env.getCtx(), "DateTo")).rightAlign());
row.appendChild(dateTo.getComponent());
ConfirmPanel confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(this);
North north = new North();
north.appendChild(northPanel);
mainLayout.appendChild(north);
//West west = new West();
//chartPanel.setWidth("400");
//west.appendChild(chartPanel);
//west.setSplittable(true);
//west.setAutoscroll(true);
//mainLayout.appendChild(west);
South south = new South();
south.appendChild(confirmPanel);
mainLayout.appendChild(south);
}
use of org.adempiere.webui.component.ConfirmPanel in project adempiere by adempiere.
the class WAllocation method zkInit.
/**
* Static Init
* @throws Exception
*/
private void zkInit() throws Exception {
//
confirmPanel = new ConfirmPanel(true);
form.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date"));
autoWriteOff.setSelected(false);
autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true));
autoWriteOff.setTooltiptext(Msg.getMsg(Env.getCtx(), "AutoWriteOff", false));
//
parameterPanel.appendChild(parameterLayout);
allocationPanel.appendChild(allocationLayout);
bpartnerLabel.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
paymentLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Payment_ID"));
invoiceLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Invoice_ID"));
paymentPanel.appendChild(paymentLayout);
invoicePanel.appendChild(invoiceLayout);
invoiceInfo.setText(".");
paymentInfo.setText(".");
chargeLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Charge_ID"));
differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference"));
differenceField.setText("0");
differenceField.setStyle("text-align: right");
descriptionLabel.setText(Msg.getMsg(Env.getCtx(), "Description"));
confirmPanel.addActionListener(this);
currencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID"));
multiCurrency.setText(Msg.getMsg(Env.getCtx(), "MultiCurrency"));
multiCurrency.addActionListener(this);
allocCurrencyLabel.setText(".");
organizationLabel.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
apartLabel.setText(Msg.translate(Env.getCtx(), "APAR"));
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(bpartnerLabel.rightAlign());
row.appendChild(bpartnerSearch.getComponent());
row.appendChild(dateLabel.rightAlign());
row.appendChild(dateField.getComponent());
row.appendChild(organizationLabel.rightAlign());
row.appendChild(organizationPick.getComponent());
row = rows.newRow();
row.appendChild(currencyLabel.rightAlign());
row.appendChild(currencyPick.getComponent());
Div div = new Div();
div.setStyle("text-align: center");
div.appendChild(multiCurrency);
row.appendChild(div);
row.appendChild(apartLabel.rightAlign());
row.appendChild(aparPick.getComponent());
row.appendChild(new Space());
row.appendChild(new Space());
row.setSpans("1,1,2,1,1");
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(autoWriteOff);
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(new Space());
South south = new South();
south.setStyle("border: none");
mainLayout.appendChild(south);
south.appendChild(southPanel);
southPanel.appendChild(allocationPanel);
allocationPanel.appendChild(allocationLayout);
allocationLayout.setWidth("100%");
rows = allocationLayout.newRows();
row = rows.newRow();
row.appendChild(differenceLabel.rightAlign());
row.appendChild(allocCurrencyLabel.rightAlign());
row.appendChild(differenceField);
row.appendChild(new Space());
row.appendChild(chargeLabel.rightAlign());
row.appendChild(chargePick.getComponent());
row.appendChild(new Space());
row.appendChild(descriptionLabel.rightAlign());
row.appendChild(descriptionField);
row.appendChild(new Space());
row.appendChild(confirmPanel);
paymentPanel.appendChild(paymentLayout);
paymentPanel.setWidth("100%");
paymentPanel.setHeight("100%");
paymentLayout.setWidth("100%");
paymentLayout.setHeight("100%");
paymentLayout.setStyle("border: none");
invoicePanel.appendChild(invoiceLayout);
invoicePanel.setWidth("100%");
invoicePanel.setHeight("100%");
invoiceLayout.setWidth("100%");
invoiceLayout.setHeight("100%");
invoiceLayout.setStyle("border: none");
north = new North();
north.setStyle("border: none");
paymentLayout.appendChild(north);
north.appendChild(paymentLabel);
south = new South();
south.setStyle("border: none");
paymentLayout.appendChild(south);
south.appendChild(paymentInfo.rightAlign());
Center center = new Center();
paymentLayout.appendChild(center);
center.appendChild(paymentTable);
paymentTable.setWidth("99%");
paymentTable.setHeight("100%");
paymentTable.setMultiSelection(true);
center.setStyle("border: none");
north = new North();
north.setStyle("border: none");
invoiceLayout.appendChild(north);
north.appendChild(invoiceLabel);
south = new South();
south.setStyle("border: none");
invoiceLayout.appendChild(south);
south.appendChild(invoiceInfo.rightAlign());
center = new Center();
invoiceLayout.appendChild(center);
center.appendChild(invoiceTable);
invoiceTable.setWidth("99%");
invoiceTable.setHeight("99%");
invoiceTable.setMultiSelection(true);
center.setStyle("border: none");
//
center = new Center();
center.setFlex(true);
mainLayout.appendChild(center);
center.appendChild(infoPanel);
infoPanel.setStyle("border: none");
infoPanel.setWidth("100%");
infoPanel.setHeight("100%");
north = new North();
north.setStyle("border: none");
north.setHeight("49%");
infoPanel.appendChild(north);
north.appendChild(paymentPanel);
north.setSplittable(true);
center = new Center();
center.setStyle("border: none");
center.setFlex(true);
infoPanel.appendChild(center);
center.appendChild(invoicePanel);
}
Aggregations