Search in sources :

Example 21 with Button

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

the class AboutWindow method init.

private void init() {
    this.setWidth("500px");
    this.setHeight("450px");
    this.setPosition("center");
    this.setTitle(ThemeManager.getBrowserTitle());
    this.setClosable(true);
    this.setSizable(true);
    this.addEventListener(Events.ON_SIZE, this);
    Vbox layout = new Vbox();
    layout.setWidth("100%");
    layout.setParent(this);
    tabbox = new Tabbox();
    tabbox.setParent(layout);
    tabbox.setWidth("480px");
    tabbox.setHeight("380px");
    //		tabbox.setSclass("lite");
    Tabs tabs = new Tabs();
    tabs.setParent(tabbox);
    tabPanels = new Tabpanels();
    tabPanels.setParent(tabbox);
    tabPanels.setWidth("480px");
    //about
    Tab tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "About"));
    tab.setParent(tabs);
    Tabpanel tabPanel = createAbout();
    tabPanel.setParent(tabPanels);
    //Credit
    tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "Credits"));
    tab.setParent(tabs);
    tabPanel = createCredit();
    tabPanel.setParent(tabPanels);
    //Info
    tab = new Tab();
    tab.setLabel(Msg.getMsg(Env.getCtx(), "Info"));
    tab.setParent(tabs);
    tabPanel = createInfo();
    tabPanel.setParent(tabPanels);
    //Trace
    tab = new Tab();
    tab.setLabel("Errors");
    tabLog = tab;
    tab.setParent(tabs);
    tabPanel = createTrace();
    tabPanel.setParent(tabPanels);
    Hbox hbox = new Hbox();
    hbox.setParent(layout);
    hbox.setPack("end");
    hbox.setWidth("100%");
    Button btnOk = new Button();
    btnOk.setImage("/images/Ok24.png");
    btnOk.addEventListener(Events.ON_CLICK, this);
    btnOk.setParent(hbox);
    this.setBorder("normal");
}
Also used : Hbox(org.zkoss.zul.Hbox) Tab(org.adempiere.webui.component.Tab) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabbox(org.adempiere.webui.component.Tabbox) Vbox(org.zkoss.zul.Vbox) Tabpanel(org.adempiere.webui.component.Tabpanel)

Example 22 with Button

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

the class InfoSchedule method dynInit.

//	jbInit
/**
	 * 	Dynamic Init
	 *  @param createNew if true, allows to create new assignments
	 */
private void dynInit(boolean createNew) {
    //	Resource
    fillResourceType();
    fillResource();
    fieldResourceType.addEventListener(Events.ON_SELECT, this);
    fieldResource.addEventListener(Events.ON_SELECT, this);
    //	Date - Elaine 2008/12/12
    fieldDate.setValue(m_dateFrom);
    fieldDate.getDatebox().addEventListener(Events.ON_BLUR, this);
    fieldDate.getTimebox().addEventListener(Events.ON_BLUR, this);
    //		fieldDate.addEventListener(Events.ON_BLUR, this);
    bPrevious.addEventListener(Events.ON_CLICK, this);
    bNext.addEventListener(Events.ON_CLICK, this);
    //
    //
    confirmPanel.addActionListener(Events.ON_CLICK, this);
    if (createNew) {
        Button btnNew = new Button();
        btnNew.setName("btnNew");
        btnNew.setId("New");
        btnNew.setImage(ServletFns.resolveThemeURL("~./images/New24.png"));
        confirmPanel.addComponentsLeft(btnNew);
        btnNew.addEventListener(Events.ON_CLICK, this);
    }
    displayCalendar();
}
Also used : Button(org.adempiere.webui.component.Button)

Example 23 with Button

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

the class FindWindow method initAdvanced.

/**
     * initialise Advanced Tab
     * @throws IOException 
     *
    **/
private void initAdvanced() throws IOException {
    ToolBarButton btnNew = new ToolBarButton();
    btnNew.setImage("/images/New24.png");
    btnNew.setAttribute("name", "btnNewAdv");
    btnNew.addEventListener(Events.ON_CLICK, this);
    ToolBarButton btnDelete = new ToolBarButton();
    btnDelete.setAttribute("name", "btnDeleteAdv");
    btnDelete.setImage("/images/Delete24.png");
    btnDelete.addEventListener(Events.ON_CLICK, this);
    ToolBarButton btnSave = new ToolBarButton();
    btnSave.setAttribute("name", "btnSaveAdv");
    btnSave.setImage("/images/Save24.png");
    btnSave.addEventListener(Events.ON_CLICK, this);
    fQueryName = new Combobox();
    fQueryName.setTooltiptext(m_sToolTipText);
    fQueryName.setReadonly(false);
    fQueryName.addEventListener(Events.ON_FOCUS, this);
    fQueryName.addEventListener(Events.ON_BLUR, this);
    fQueryName.addEventListener(Events.ON_SELECT, this);
    //	Get from Action
    WAppsAction action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
    Button btnOk = action.getButton();
    btnOk.setName("btnOkAdv");
    btnOk.addEventListener(Events.ON_CLICK, this);
    //	
    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");
    ToolBar toolBar = new ToolBar();
    toolBar.appendChild(btnNew);
    toolBar.appendChild(btnDelete);
    toolBar.appendChild(fQueryName);
    toolBar.appendChild(btnSave);
    toolBar.setWidth("100%");
    fQueryName.setStyle("margin-left: 3px; margin-right: 3px; position: relative; top: 5px;");
    btnSave.setDisabled(m_AD_Tab_ID <= 0);
    Hbox confirmPanel = new Hbox();
    confirmPanel.appendChild(pnlButtonRight);
    confirmPanel.setWidth("100%");
    advancedPanel = new Listbox();
    ListHead listhead = new ListHead();
    listhead.setSizable(true);
    ListHeader lstHAndOr = new ListHeader();
    lstHAndOr.setLabel(Msg.getMsg(Env.getCtx(), "And/Or"));
    lstHAndOr.setWidth("40px");
    ListHeader lstHLeftBracket = new ListHeader();
    lstHLeftBracket.setLabel("(");
    lstHLeftBracket.setWidth("20px");
    ListHeader lstHColumn = new ListHeader();
    lstHColumn.setLabel(Msg.translate(Env.getCtx(), "AD_Column_ID"));
    lstHColumn.setWidth("100px");
    ListHeader lstHOperator = new ListHeader();
    lstHOperator.setLabel(Msg.getMsg(Env.getCtx(), "Operator"));
    ListHeader lstHQueryValue = new ListHeader();
    lstHQueryValue.setLabel(Msg.getMsg(Env.getCtx(), "QueryValue"));
    lstHQueryValue.setWidth("170px");
    ListHeader lstHQueryTo = new ListHeader();
    lstHQueryTo.setLabel(Msg.getMsg(Env.getCtx(), "QueryValue2"));
    lstHQueryTo.setWidth("170px");
    ListHeader lstHRightBracket = new ListHeader();
    lstHRightBracket.setLabel(")");
    lstHRightBracket.setWidth("20px");
    listhead.appendChild(lstHAndOr);
    listhead.appendChild(lstHLeftBracket);
    listhead.appendChild(lstHColumn);
    listhead.appendChild(lstHOperator);
    listhead.appendChild(lstHQueryValue);
    listhead.appendChild(lstHQueryTo);
    listhead.appendChild(lstHRightBracket);
    advancedPanel.appendChild(listhead);
    advancedPanel.setVflex(true);
    Borderlayout layout = new Borderlayout();
    layout.setStyle("height: 100%; width: 99%; position: relative;");
    winAdvanced.appendChild(layout);
    North north = new North();
    layout.appendChild(north);
    north.appendChild(toolBar);
    Center center = new Center();
    layout.appendChild(center);
    center.appendChild(advancedPanel);
    center.setFlex(true);
    South south = new South();
    layout.appendChild(south);
    south.appendChild(confirmPanel);
    winAdvanced.setHeight("100%");
    winAdvanced.setWidth("100%");
    winAdvanced.addEventListener(Events.ON_OK, this);
}
Also used : Hbox(org.zkoss.zul.Hbox) Center(org.zkoss.zkex.zul.Center) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Combobox(org.adempiere.webui.component.Combobox) South(org.zkoss.zkex.zul.South) Borderlayout(org.zkoss.zkex.zul.Borderlayout) WAppsAction(org.adempiere.webui.component.WAppsAction) Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Button(org.adempiere.webui.component.Button) ToolBarButton(org.adempiere.webui.component.ToolBarButton) ListHead(org.adempiere.webui.component.ListHead) ToolBar(org.adempiere.webui.component.ToolBar) ListHeader(org.adempiere.webui.component.ListHeader) North(org.zkoss.zkex.zul.North) Listbox(org.adempiere.webui.component.Listbox)

Example 24 with Button

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

the class AboutWindow method createTrace.

private Tabpanel createTrace() {
    Tabpanel tabPanel = new Tabpanel();
    Vbox vbox = new Vbox();
    vbox.setParent(tabPanel);
    vbox.setWidth("100%");
    vbox.setHeight("100%");
    Hbox hbox = new Hbox();
    bErrorsOnly = new Checkbox();
    bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
    //default only show error
    bErrorsOnly.setChecked(true);
    bErrorsOnly.addEventListener(Events.ON_CHECK, this);
    hbox.appendChild(bErrorsOnly);
    btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
    btnDownload.addEventListener(Events.ON_CLICK, this);
    hbox.appendChild(btnDownload);
    btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
    btnErrorEmail.addEventListener(Events.ON_CLICK, this);
    hbox.appendChild(btnErrorEmail);
    vbox.appendChild(hbox);
    Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
    logTable = new Listbox();
    ListHead listHead = new ListHead();
    listHead.setParent(logTable);
    listHead.setSizable(true);
    for (Object obj : columnNames) {
        ListHeader header = new ListHeader(obj.toString());
        header.setWidth("100px");
        listHead.appendChild(header);
    }
    vbox.appendChild(logTable);
    logTable.setWidth("480px");
    logTable.setHeight("310px");
    logTable.setVflex(false);
    updateLogTable();
    return tabPanel;
}
Also used : Hbox(org.zkoss.zul.Hbox) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Checkbox(org.adempiere.webui.component.Checkbox) ListHead(org.adempiere.webui.component.ListHead) ListHeader(org.adempiere.webui.component.ListHeader) Listbox(org.adempiere.webui.component.Listbox) Tabpanel(org.adempiere.webui.component.Tabpanel) Vbox(org.zkoss.zul.Vbox)

Example 25 with Button

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

the class WLocationDialog method initComponents.

private void initComponents() {
    lblAddress1 = new Label(Msg.getElement(Env.getCtx(), "Address1"));
    lblAddress1.setStyle(LABEL_STYLE);
    lblAddress2 = new Label(Msg.getElement(Env.getCtx(), "Address2"));
    lblAddress2.setStyle(LABEL_STYLE);
    lblAddress3 = new Label(Msg.getElement(Env.getCtx(), "Address3"));
    lblAddress3.setStyle(LABEL_STYLE);
    lblAddress4 = new Label(Msg.getElement(Env.getCtx(), "Address4"));
    lblAddress4.setStyle(LABEL_STYLE);
    lblCity = new Label(Msg.getMsg(Env.getCtx(), "City"));
    lblCity.setStyle(LABEL_STYLE);
    lblZip = new Label(Msg.getMsg(Env.getCtx(), "Postal"));
    lblZip.setStyle(LABEL_STYLE);
    lblRegion = new Label(Msg.getMsg(Env.getCtx(), "Region"));
    lblRegion.setStyle(LABEL_STYLE);
    lblPostal = new Label(Msg.getMsg(Env.getCtx(), "Postal"));
    lblPostal.setStyle(LABEL_STYLE);
    lblPostalAdd = new Label(Msg.getMsg(Env.getCtx(), "PostalAdd"));
    lblPostalAdd.setStyle(LABEL_STYLE);
    lblCountry = new Label(Msg.getMsg(Env.getCtx(), "Country"));
    lblCountry.setStyle(LABEL_STYLE);
    txtAddress1 = new Textbox();
    txtAddress1.setCols(20);
    txtAddress2 = new Textbox();
    txtAddress2.setCols(20);
    txtAddress3 = new Textbox();
    txtAddress3.setCols(20);
    txtAddress4 = new Textbox();
    txtAddress4.setCols(20);
    //autocomplete City
    txtCity = new WAutoCompleterCity(m_WindowNo);
    txtCity.setCols(20);
    txtCity.setAutodrop(true);
    txtCity.setAutocomplete(true);
    txtCity.addEventListener(Events.ON_CHANGING, this);
    //txtCity
    txtPostal = new Textbox();
    txtPostal.setCols(20);
    txtPostalAdd = new Textbox();
    txtPostalAdd.setCols(20);
    lstRegion = new Listbox();
    lstRegion.setMold("select");
    lstRegion.setWidth("154px");
    lstRegion.setRows(0);
    lstCountry = new Listbox();
    lstCountry.setMold("select");
    lstCountry.setWidth("154px");
    lstCountry.setRows(0);
    btnUrl = new Button();
    btnUrl.setImage(ServletFns.resolveThemeURL("~./images/Online10.png"));
    btnUrl.addEventListener(Events.ON_CLICK, this);
    btnOk = new Button();
    btnOk.setImage(ServletFns.resolveThemeURL("~./images/Ok16.png"));
    btnOk.addEventListener(Events.ON_CLICK, this);
    btnCancel = new Button();
    btnCancel.setImage(ServletFns.resolveThemeURL("~./images/Cancel16.png"));
    btnCancel.addEventListener(Events.ON_CLICK, this);
    mainPanel = GridFactory.newGridLayout();
    mainPanel.setStyle("padding:5px");
}
Also used : Button(org.adempiere.webui.component.Button) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox) Listbox(org.adempiere.webui.component.Listbox)

Aggregations

Button (org.adempiere.webui.component.Button)33 Vbox (org.zkoss.zul.Vbox)7 Component (org.zkoss.zk.ui.Component)6 Hbox (org.zkoss.zul.Hbox)6 ToolBarButton (org.adempiere.webui.component.ToolBarButton)5 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)4 Listbox (org.adempiere.webui.component.Listbox)4 Panel (org.adempiere.webui.component.Panel)4 Textbox (org.adempiere.webui.component.Textbox)4 WAppsAction (org.adempiere.webui.component.WAppsAction)4 Label (org.adempiere.webui.component.Label)3 Tabpanel (org.adempiere.webui.component.Tabpanel)3 Center (org.zkoss.zul.Center)3 North (org.zkoss.zul.North)3 Separator (org.zkoss.zul.Separator)3 Checkbox (org.adempiere.webui.component.Checkbox)2 Combobox (org.adempiere.webui.component.Combobox)2 ListHead (org.adempiere.webui.component.ListHead)2 ListHeader (org.adempiere.webui.component.ListHeader)2 Row (org.adempiere.webui.component.Row)2