Search in sources :

Example 16 with Label

use of org.adempiere.webui.component.Label in project adempiere by adempiere.

the class WExpressReceiptScanBarUI method productPanel.

/**
     * Creates the account panel.
     *
     * The account panel contains:
     * <li>a table detailing all accounts
     * <li>a button for creating charges for selected accounts
     */
private void productPanel() {
    Borderlayout borderlayout = new Borderlayout();
    borderlayout.setStyle("position: absolute");
    borderlayout.setWidth("100%");
    borderlayout.setHeight("100%");
    m_panelProduct.appendChild(borderlayout);
    North north = new North();
    north.setBorder("none");
    borderlayout.appendChild(north);
    Label label = new Label(Msg.translate(Env.getCtx(), "M_Product_ID"));
    label.setStyle("font-weight: bold;");
    north.appendChild(label);
    Center center = new Center();
    center.setBorder("none");
    center.setFlex(true);
    center.setAutoscroll(true);
    borderlayout.appendChild(center);
    center.appendChild(productTable);
    South south = new South();
    south.setBorder("none");
    borderlayout.appendChild(south);
    Panel southPanel = new Panel();
    southPanel.setAlign("right");
    south.appendChild(southPanel);
    return;
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zkex.zul.Center) Label(org.adempiere.webui.component.Label) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout)

Example 17 with Label

use of org.adempiere.webui.component.Label in project adempiere by adempiere.

the class FindWindow method addSelectionColumn.

// setValues
/**
     *  Add Selection Column to first Tab
     *  @param mField field
    **/
public void addSelectionColumn(GridField mField) {
    log.config(mField.getHeader());
    int displayLength = mField.getDisplayLength();
    if (displayLength <= 0 || displayLength > FIELDLENGTH)
        mField.setDisplayLength(FIELDLENGTH);
    else
        displayLength = 0;
    //  Editor
    WEditor editor = null;
    Label label = null;
    if (mField.isRangeLookup()) {
        Hbox box = new Hbox();
        editor = WebEditorFactory.getEditor(mField, false);
        label = editor.getLabel();
        editor.setMandatory(false);
        editor.setReadWrite(true);
        editor.dynamicDisplay();
        Component fieldLabel = editor.getComponent();
        box.appendChild(editor.getComponent());
        rangeFirstEditor.add(mField.getColumnName());
        // The Editor
        WEditor toRangeEditor = WebEditorFactory.getEditor(mField, false);
        // New Field value to be updated to editor
        toRangeEditor.setMandatory(false);
        toRangeEditor.setReadWrite(true);
        toRangeEditor.dynamicDisplay();
        //
        m_sEditors2.add(toRangeEditor);
        Label separator = new Label(" - ");
        box.appendChild(separator);
        Component fieldLabel1 = toRangeEditor.getComponent();
        box.appendChild(toRangeEditor.getComponent());
        if (//  set it back
        displayLength > 0)
            mField.setDisplayLength(displayLength);
        //
        if (isTwoColumns) {
            if (!isPair)
                panel = new Row();
        } else
            panel = new Row();
        panel.appendChild(LayoutUtils.makeRightAlign(label));
        panel.appendChild(box);
        contentSimpleRows.appendChild(panel);
        fieldLabel.addEventListener(Events.ON_OK, this);
        fieldLabel1.addEventListener(Events.ON_OK, this);
    } else {
        editor = WebEditorFactory.getEditor(mField, false);
        label = editor.getLabel();
        editor.setMandatory(false);
        editor.setReadWrite(true);
        editor.dynamicDisplay();
        Component fieldLabel = editor.getComponent();
        if (//  set it back
        displayLength > 0)
            mField.setDisplayLength(displayLength);
        //
        if (isTwoColumns) {
            if (!isPair)
                panel = new Row();
        } else
            panel = new Row();
        panel.appendChild(LayoutUtils.makeRightAlign(label));
        panel.appendChild(fieldLabel);
        contentSimpleRows.appendChild(panel);
        fieldLabel.addEventListener(Events.ON_OK, this);
        m_sEditors2.add(null);
    }
    m_sEditors.add(editor);
}
Also used : Hbox(org.zkoss.zul.Hbox) Label(org.adempiere.webui.component.Label) WEditor(org.adempiere.webui.editor.WEditor) Row(org.adempiere.webui.component.Row) Component(org.zkoss.zk.ui.Component)

Example 18 with Label

use of org.adempiere.webui.component.Label in project adempiere by adempiere.

the class FindWindow method initSimple.

/**
     * initialise lookup record tab
     * @throws IOException 
     *
    **/
private void initSimple() throws IOException {
    lblDocumentNo = new Label();
    lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
    lblDescription = new Label();
    lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
    lblName = new Label();
    lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
    lblValue = new Label();
    lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
    fieldDocumentNo = new Textbox();
    fieldDocumentNo.setId("fieldDocumentNo");
    fieldDocumentNo.setMaxlength(40);
    fieldDescription = new Textbox();
    fieldDescription.setId("fieldDescription");
    fieldDescription.setMaxlength(40);
    fieldName = new Textbox();
    fieldName.setMaxlength(40);
    fieldValue = new Textbox();
    fieldValue.setMaxlength(40);
    //	Get button from Action
    WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
    Button btnNew = action.getButton();
    btnNew.setName("btnNew");
    btnNew.addEventListener(Events.ON_CLICK, this);
    //	Get button from Action
    action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
    Button btnOk = action.getButton();
    btnOk.setName("btnOkSimple");
    btnOk.addEventListener(Events.ON_CLICK, this);
    //	Get from action
    action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
    Button btnCancel = action.getButton();
    btnCancel.setName("btnCancel");
    btnCancel.addEventListener(Events.ON_CLICK, this);
    Panel pnlButtonRight = new Panel();
    //	Change to Standard button order
    pnlButtonRight.appendChild(btnCancel);
    pnlButtonRight.appendChild(btnOk);
    pnlButtonRight.setAlign("right");
    pnlButtonRight.setWidth("100%");
    Panel pnlButtonLeft = new Panel();
    pnlButtonLeft.appendChild(btnNew);
    Hbox hboxButton = new Hbox();
    hboxButton.appendChild(pnlButtonLeft);
    hboxButton.appendChild(pnlButtonRight);
    hboxButton.setWidth("100%");
    pnlDocument = new Row();
    pnlDocument.setId("pnlDocument");
    pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
    pnlDocument.appendChild(fieldDocumentNo);
    pnlDescription = new Row();
    pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
    pnlDescription.appendChild(fieldDescription);
    pnlValue = new Row();
    pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
    pnlValue.appendChild(fieldValue);
    pnlName = new Row();
    pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
    pnlName.appendChild(fieldName);
    contentSimple = new Grid();
    contentSimple.setId("contentSimple");
    contentSimple.setWidth("100%");
    contentSimple.makeNoStrip();
    contentSimpleRows = new Rows();
    contentSimple.appendChild(contentSimpleRows);
    contentSimpleRows.appendChild(pnlValue);
    contentSimpleRows.appendChild(pnlName);
    contentSimpleRows.appendChild(pnlDocument);
    contentSimpleRows.appendChild(pnlDescription);
    contentSimple.setVflex(true);
    Borderlayout layout = new Borderlayout();
    layout.setStyle("height: 100%; width: 99%; position: relative");
    winLookupRecord.appendChild(layout);
    Center center = new Center();
    layout.appendChild(center);
    center.appendChild(contentSimple);
    center.setFlex(true);
    South south = new South();
    layout.appendChild(south);
    south.appendChild(hboxButton);
    winLookupRecord.setWidth("100%");
    winLookupRecord.setHeight("100%");
    winLookupRecord.addEventListener(Events.ON_OK, this);
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Hbox(org.zkoss.zul.Hbox) Center(org.zkoss.zkex.zul.Center) Button(org.adempiere.webui.component.Button) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Grid(org.adempiere.webui.component.Grid) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox) South(org.zkoss.zkex.zul.South) Row(org.adempiere.webui.component.Row) Borderlayout(org.zkoss.zkex.zul.Borderlayout) WAppsAction(org.adempiere.webui.component.WAppsAction) Rows(org.adempiere.webui.component.Rows)

Example 19 with Label

use of org.adempiere.webui.component.Label in project adempiere by adempiere.

the class AboutWindow method createCredit.

private Tabpanel createCredit() {
    Tabpanel tabPanel = new Tabpanel();
    Vbox vbox = new Vbox();
    vbox.setParent(tabPanel);
    vbox.setWidth("100%");
    Hbox hbox = new Hbox();
    hbox.setParent(vbox);
    ToolBarButton link = new ToolBarButton();
    link.setImage("images/Posterita.jpg");
    link.setParent(hbox);
    link.setHref("http://www.posterita.org");
    link.setTarget("_blank");
    Label label = new Label("Contributed the initial Zk Web Client code.");
    label.setParent(hbox);
    Separator separator = new Separator();
    separator.setParent(vbox);
    Div div = new Div();
    div.setParent(vbox);
    div.setWidth("100%");
    Label caption = new Label("Sponsors");
    caption.setStyle("font-weight: bold;");
    div.appendChild(caption);
    separator = new Separator();
    separator.setBar(true);
    separator.setParent(div);
    Vbox content = new Vbox();
    content.setWidth("100%");
    content.setParent(div);
    link = new ToolBarButton();
    link = new ToolBarButton();
    link.setLabel("eEvolution");
    link.setHref("http://www.eevolution.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Adaxa");
    link.setHref("http://www.adaxa.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Westfalia IT");
    link.setHref("http://www.westfalia-it.com");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Walkingtree ");
    link.setHref("http://www.walkingtree.in");
    link.setTarget("_blank");
    link.setParent(content);
    link.setLabel("Sysnova");
    link.setHref("http://www.sysnova.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Idalica");
    link.setHref("http://www.idalica.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("ERPCyA");
    link.setHref("http://www.erpcya.com/");
    link.setTarget("_blank");
    link.setParent(content);
    separator = new Separator();
    separator.setParent(vbox);
    div = new Div();
    div.setParent(vbox);
    div.setWidth("100%");
    caption = new Label("Contributors");
    caption.setStyle("font-weight: bold;");
    div.appendChild(caption);
    separator = new Separator();
    separator.setBar(true);
    separator.setParent(div);
    content = new Vbox();
    content.setWidth("100%");
    content.setParent(div);
    link = new ToolBarButton();
    link.setLabel("Victor PĂ©rez");
    link.setHref("http://wiki.adempiere.net/User:vpj-cd");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Paul Bowden");
    link.setHref("http://wiki.adempiere.net/User:Phib");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Michael McKay");
    link.setHref("http://wiki.adempiere.net/User:MJMcKay");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Mario Calderon");
    link.setHref("http://wiki.adempiere.net/User:mar_cal_westf");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Ashley G Ramdass");
    link.setHref("http://wiki.adempiere.net/User:Agramdass");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Low Heng Sin");
    link.setHref("http://wiki.adempiere.net/User:Hengsin");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Carlos Ruiz");
    link.setHref("http://wiki.adempiere.net/User:CarlosRuiz");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Teo Sarca");
    link.setHref("http://wiki.adempiere.net/User:Teo_sarca");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Trifon Trifonov");
    link.setHref("http://wiki.adempiere.net/User:Trifonnt");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Yamel Senih");
    link.setHref("http://wiki.adempiere.net/User:Yamel_Senih");
    link.setTarget("_blank");
    link.setParent(content);
    return tabPanel;
}
Also used : Div(org.zkoss.zul.Div) Hbox(org.zkoss.zul.Hbox) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Label(org.adempiere.webui.component.Label) Tabpanel(org.adempiere.webui.component.Tabpanel) Vbox(org.zkoss.zul.Vbox) Separator(org.zkoss.zul.Separator)

Example 20 with Label

use of org.adempiere.webui.component.Label in project adempiere by adempiere.

the class InfoPanel method init.

protected void init() {
    ThemeUtils.addSclass("ad-infopanel", this);
    if (isModal()) {
        setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
        setBorder("normal");
        setClosable(true);
        setWidth(p_width + "px");
        setHeight(p_height + "px");
        setContentStyle("overflow: auto");
        setSizable(true);
        setMaximizable(true);
        ThemeUtils.addSclass("ad-infopanel-modal", this);
    } else {
        setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
        //			setBorder("none");
        //			setWidth("100%");
        //			setHeight("100%");
        //			setStyle("position: absolute");
        ThemeUtils.addSclass("ad-infopanel-embedded", this);
    }
    // Elaine 2008/12/16
    confirmPanel = new ConfirmPanel(true, true, false, true, true, true);
    confirmPanel.addActionListener(Events.ON_CLICK, this);
    // Elaine 2008/12/16
    confirmPanel.getButton(ConfirmPanel.A_CUSTOMIZE).setVisible(hasCustomize());
    confirmPanel.getButton(ConfirmPanel.A_HISTORY).setVisible(hasHistory());
    confirmPanel.getButton(ConfirmPanel.A_ZOOM).setVisible(hasZoom());
    confirmPanel.getButton(ConfirmPanel.A_OK).setVisible(p_saveResults);
    checkAutoQuery.setText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
    checkAutoQuery.setTooltip(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
    checkAutoQuery.setName("AutoQuery");
    checkAutoQuery.setSelected(MSysConfig.getValue(SYSCONFIG_INFO_AUTO_QUERY, "Y", Env.getAD_Client_ID(Env.getCtx())).equals("Y"));
    checkAutoQuery.setAttribute("zk_component_ID", "Lookup_Confirm_checkAutoQuery");
    checkAutoQuery.addActionListener(this);
    confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(checkAutoQuery, confirmPanel.getButton(ConfirmPanel.A_REFRESH));
    confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(new Separator("vertical"), confirmPanel.getButton(ConfirmPanel.A_REFRESH));
    //
    statusBar.setEastVisibility(false);
    statusBar.setAttribute("zk_component_ID", "info_statusBar");
    //
    p_southLayout.setVflex("min");
    Center center = new Center();
    center.appendChild(confirmPanel);
    p_southLayout.appendChild(center);
    South south = new South();
    south.appendChild(statusBar);
    p_southLayout.appendChild(south);
    //
    // Reset button
    bReset = confirmPanel.createButton(ConfirmPanel.A_RESET);
    bReset.addActionListener(this);
    lblReset = new Label();
    lblReset.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Reset")));
    p_table.setOddRowSclass(null);
    p_table.setAttribute("zk_component_ID", "Lookup_Data_SearchResults");
    p_table.setVflex(true);
    // Sizes
    p_centerNorth.setVflex("min");
    p_centerCenter.setVflex("1");
    p_centerSouth.setHeight("25%");
    //
    ThemeUtils.addSclass("info-panel-center", p_centerLayout);
    // May be empty
    p_centerLayout.appendChild(p_centerNorth);
    // the table
    p_centerLayout.appendChild(p_centerCenter);
    // detail tabs or other
    p_centerLayout.appendChild(p_centerSouth);
    //
    // Need to use a container for p_table so we can insert paging if required.
    Div div = new Div();
    div.appendChild(p_table);
    div.setVflex("1");
    div.setHflex("1");
    p_centerCenter.appendChild(div);
    p_centerCenter.setAutoscroll(false);
    p_centerCenter.setHflex("1");
    //
    p_centerSouth.setCollapsible(true);
    p_centerSouth.setSplittable(true);
    p_centerSouth.setHflex("1");
    //  Setup the north reset button and criteria grid
    West spWest = new West();
    spWest.setHflex("min");
    ThemeUtils.addSclass("criteria", spWest);
    Center spCenter = new Center();
    //spCenter.setWidth("100%");
    spCenter.setHflex("1");
    spCenter.setVflex("min");
    ThemeUtils.addSclass("criteria", spCenter);
    p_northLayout.setHflex("min");
    p_northLayout.setVflex("min");
    p_northLayout.appendChild(spWest);
    p_northLayout.appendChild(spCenter);
    // spWest - the reset button
    Grid bGrid = GridFactory.newGridLayout();
    bGrid.setSizedByContent(true);
    Columns bColumns = new Columns();
    Column col = new Column();
    col.setHflex("min");
    bColumns.appendChild(col);
    bGrid.appendChild(bColumns);
    Rows bRows = new Rows();
    Row bRow = new Row();
    bGrid.appendChild(bRows);
    bRows.appendChild(bRow);
    bRow.appendChild(bReset);
    bRow = new Row();
    bRows.appendChild(bRow);
    bRow.appendChild(lblReset);
    spWest.appendChild(bGrid);
    // The criteria table
    //p_criteriaGrid.setSizedByContent(true);
    spCenter.appendChild(p_criteriaGrid);
    Borderlayout mainPanel = new Borderlayout();
    mainPanel.setWidth("100%");
    mainPanel.setHeight("100%");
    //
    North north = new North();
    mainPanel.appendChild(north);
    north.appendChild(p_northLayout);
    //
    center = new Center();
    mainPanel.appendChild(center);
    center.appendChild(p_centerLayout);
    //
    south = new South();
    mainPanel.appendChild(south);
    south.appendChild(p_southLayout);
    //
    if (!isModal()) {
        mainPanel.setStyle("position: absolute");
    }
    this.appendChild(mainPanel);
    this.addEventListener(Events.ON_OK, this);
    this.setVisible(true);
}
Also used : Center(org.zkoss.zul.Center) West(org.zkoss.zul.West) Grid(org.adempiere.webui.component.Grid) South(org.zkoss.zul.South) Label(org.adempiere.webui.component.Label) Columns(org.adempiere.webui.component.Columns) Borderlayout(org.zkoss.zul.Borderlayout) Div(org.zkoss.zul.Div) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) IDColumn(org.compiere.minigrid.IDColumn) Column(org.adempiere.webui.component.Column) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Separator(org.zkoss.zul.Separator) Rows(org.adempiere.webui.component.Rows)

Aggregations

Label (org.adempiere.webui.component.Label)69 Row (org.adempiere.webui.component.Row)29 Rows (org.adempiere.webui.component.Rows)28 Div (org.zkoss.zul.Div)18 Hbox (org.zkoss.zul.Hbox)17 Panel (org.adempiere.webui.component.Panel)15 Grid (org.adempiere.webui.component.Grid)13 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)11 Textbox (org.adempiere.webui.component.Textbox)11 Center (org.zkoss.zkex.zul.Center)10 Separator (org.zkoss.zul.Separator)10 North (org.zkoss.zkex.zul.North)7 Checkbox (org.adempiere.webui.component.Checkbox)6 Caption (org.zkoss.zul.Caption)6 South (org.zkoss.zul.South)6 Listbox (org.adempiere.webui.component.Listbox)5 WTableDirEditor (org.adempiere.webui.editor.WTableDirEditor)5 South (org.zkoss.zkex.zul.South)5 Vbox (org.zkoss.zul.Vbox)5 SimpleDateFormat (java.text.SimpleDateFormat)4