Search in sources :

Example 6 with ConfirmPanel

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);
}
Also used : Div(org.zkoss.zul.Div) VerticalBox(org.adempiere.webui.component.VerticalBox) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Html(org.zkoss.zul.Html) Separator(org.zkoss.zul.Separator)

Example 7 with ConfirmPanel

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());
}
Also used : Center(org.zkoss.zul.Center) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Textbox(org.adempiere.webui.component.Textbox) South(org.zkoss.zul.South) Borderlayout(org.zkoss.zul.Borderlayout)

Example 8 with ConfirmPanel

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());
    }
}
Also used : Window(org.adempiere.webui.component.Window) Pre(org.zkoss.zhtml.Pre) Center(org.zkoss.zkex.zul.Center) South(org.zkoss.zkex.zul.South) Text(org.zkoss.zhtml.Text) Borderlayout(org.zkoss.zkex.zul.Borderlayout) Div(org.zkoss.zul.Div) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) North(org.zkoss.zkex.zul.North) Listbox(org.adempiere.webui.component.Listbox)

Example 9 with ConfirmPanel

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);
}
Also used : WDateEditor(org.adempiere.webui.editor.WDateEditor) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Grid(org.adempiere.webui.component.Grid) GridFactory(org.adempiere.webui.component.GridFactory) Label(org.adempiere.webui.component.Label) South(org.zkoss.zul.South) North(org.zkoss.zul.North) Row(org.zkoss.zul.Row) Rows(org.adempiere.webui.component.Rows)

Example 10 with ConfirmPanel

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);
}
Also used : Div(org.zkoss.zul.Div) Space(org.zkoss.zul.Space) Center(org.zkoss.zkex.zul.Center) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Aggregations

ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)22 Center (org.zkoss.zkex.zul.Center)9 Rows (org.adempiere.webui.component.Rows)8 North (org.zkoss.zkex.zul.North)8 Panel (org.adempiere.webui.component.Panel)7 Row (org.adempiere.webui.component.Row)7 Div (org.zkoss.zul.Div)7 Label (org.adempiere.webui.component.Label)6 South (org.zkoss.zkex.zul.South)6 South (org.zkoss.zul.South)6 Grid (org.adempiere.webui.component.Grid)5 Borderlayout (org.zkoss.zul.Borderlayout)5 Center (org.zkoss.zul.Center)5 North (org.zkoss.zul.North)5 Separator (org.zkoss.zul.Separator)5 Borderlayout (org.adempiere.webui.component.Borderlayout)3 Button (org.adempiere.webui.component.Button)3 WAppsAction (org.adempiere.webui.component.WAppsAction)3 StatusBarPanel (org.adempiere.webui.panel.StatusBarPanel)3 Space (org.zkoss.zul.Space)3