Search in sources :

Example 11 with Borderlayout

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);
}
Also used : Panel(org.adempiere.webui.component.Panel) Center(org.zkoss.zkex.zul.Center) Grid(org.adempiere.webui.component.Grid) Label(org.adempiere.webui.component.Label) Borderlayout(org.adempiere.webui.component.Borderlayout) Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Aggregations

Borderlayout (org.adempiere.webui.component.Borderlayout)11 Panel (org.adempiere.webui.component.Panel)8 Center (org.zkoss.zkex.zul.Center)7 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)5 Grid (org.adempiere.webui.component.Grid)5 Row (org.adempiere.webui.component.Row)5 Rows (org.adempiere.webui.component.Rows)5 South (org.zkoss.zkex.zul.South)5 Label (org.adempiere.webui.component.Label)4 North (org.zkoss.zkex.zul.North)4 Tab (org.adempiere.webui.component.Tab)2 Tabbox (org.adempiere.webui.component.Tabbox)2 StatusBarPanel (org.adempiere.webui.panel.StatusBarPanel)2 AImage (org.zkoss.image.AImage)2 Center (org.zkoss.zul.Center)2 Div (org.zkoss.zul.Div)2 Hbox (org.zkoss.zul.Hbox)2 Image (org.zkoss.zul.Image)2 North (org.zkoss.zul.North)2 Color (java.awt.Color)1