use of org.adempiere.webui.component.Borderlayout in project adempiere by adempiere.
the class WPOSUserPinDialog method showDialog.
private void showDialog(WPOS pos) {
passwordField = new WPOSTextField("", pos.getKeyboard());
passwordField.setStyle("Font-size:medium; font-weight:bold");
passwordField.addEventListener(this);
passwordField.addEventListener(Events.ON_OK, this);
passwordField.setType("password");
Panel mainPanel = new Panel();
this.setWidth("200px");
this.setHeight("100px");
b_ok.addActionListener(pos);
b_ok.addEventListener(Events.ON_OK, pos);
b_cancel.addActionListener(pos);
Borderlayout mainLayout = new Borderlayout();
Grid layout = GridFactory.newGridLayout();
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Panel centerPanel = new Panel();
Center center = new Center();
center.setStyle("border: none");
mainLayout.appendChild(center);
center.appendChild(centerPanel);
centerPanel.appendChild(layout);
layout.setWidth("100%");
layout.setHeight("100%");
this.appendChild(mainPanel);
Rows rows = null;
Row row = null;
rows = layout.newRows();
row = rows.newRow();
Label msg = new Label(Msg.parseTranslation(pos.getCtx(), "@UserPIN@"));
row.appendChild(msg);
row = rows.newRow();
row.appendChild(passwordField);
row.setSpans("2");
row = rows.newRow();
row.appendChild(b_ok);
row.appendChild(b_cancel);
b_ok.addActionListener(this);
b_cancel.addActionListener(this);
AEnv.showWindow(this);
pos.validateAndSetUserPin(returnValue);
}
Aggregations