Search in sources :

Example 36 with Separator

use of org.zkoss.zul.Separator in project adempiere by adempiere.

the class DPViews method createViewPanel.

private Box createViewPanel() {
    Vbox vbox = new Vbox();
    if (MRole.getDefault().isAllow_Info_Product()) {
        Button btnViewItem = new Button("InfoProduct");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoProduct")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/InfoProduct16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_BPartner()) {
        Button btnViewItem = new Button("InfoBPartner");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoBPartner")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/InfoBPartner16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account()) {
        Button btnViewItem = new Button("InfoAccount");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoAccount")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/InfoAccount16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_Schedule()) {
        Button btnViewItem = new Button("InfoSchedule");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoSchedule")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/InfoSchedule16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    vbox.appendChild(new Separator("horizontal"));
    if (MRole.getDefault().isAllow_Info_Order()) {
        Button btnViewItem = new Button("InfoOrder");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoOrder")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_Invoice()) {
        Button btnViewItem = new Button("InfoInvoice");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoInvoice")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_InOut()) {
        Button btnViewItem = new Button("InfoInOut");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoInOut")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_Payment()) {
        Button btnViewItem = new Button("InfoPayment");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoPayment")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_CashJournal()) {
        Button btnViewItem = new Button("InfoCashLine");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoCashLine")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_Resource()) {
        Button btnViewItem = new Button("InfoAssignment");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoAssignment")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    if (MRole.getDefault().isAllow_Info_Asset()) {
        Button btnViewItem = new Button("InfoAsset");
        btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoAsset")));
        btnViewItem.setImage(ServletFns.resolveThemeURL("~./images/Info16.png"));
        btnViewItem.addEventListener(Events.ON_CLICK, this);
        vbox.appendChild(btnViewItem);
    }
    return vbox;
}
Also used : Button(org.adempiere.webui.component.Button) Vbox(org.zkoss.zul.Vbox) Separator(org.zkoss.zul.Separator)

Example 37 with Separator

use of org.zkoss.zul.Separator in project adempiere by adempiere.

the class WOnlyCurrentDays method jbInit.

/**
	 * 	Static Initializer
	 * 	@throws Exception
	 */
private void jbInit() throws Exception {
    bShowAll.setLabel(Msg.getMsg(Env.getCtx(), "All"));
    bShowAll.addEventListener(Events.ON_CLICK, this);
    bShowYear.setLabel(Msg.getMsg(Env.getCtx(), "Year"));
    bShowYear.addEventListener(Events.ON_CLICK, this);
    bShowMonth.setLabel(Msg.getMsg(Env.getCtx(), "Month"));
    bShowMonth.addEventListener(Events.ON_CLICK, this);
    bShowWeek.setLabel(Msg.getMsg(Env.getCtx(), "Week"));
    bShowWeek.addEventListener(Events.ON_CLICK, this);
    bShowDay.setLabel(Msg.getMsg(Env.getCtx(), "Day"));
    bShowDay.addEventListener(Events.ON_CLICK, this);
    mainPanel.setWidth("100%");
    mainPanel.setStyle("text-align:center");
    mainPanel.appendChild(bShowDay);
    mainPanel.appendChild(bShowWeek);
    mainPanel.appendChild(bShowMonth);
    mainPanel.appendChild(bShowYear);
    mainPanel.appendChild(bShowAll);
    this.setWidth("450px");
    this.setBorder("normal");
    this.setTitle(Msg.getMsg(Env.getCtx(), "VOnlyCurrentDays"));
    this.setClosable(true);
    this.setAttribute("mode", "modal");
    this.appendChild(new Separator());
    this.appendChild(mainPanel);
    this.appendChild(new Separator());
}
Also used : Separator(org.zkoss.zul.Separator)

Example 38 with Separator

use of org.zkoss.zul.Separator in project adempiere by adempiere.

the class UserPanel method init.

private void init() {
    // vbox
    this.setSclass("user-panel");
    this.setAlign("right");
    // Top row
    lblUserNameValue.setValue(getUserName() + "@" + getClientName() + "." + getOrgName() + "/" + getRoleName());
    lblUserNameValue.setId("loginUserAndRole");
    ThemeUtils.addSclass("user-panel-username", lblUserNameValue);
    this.appendChild(lblUserNameValue);
    Hbox hbox = new Hbox();
    ThemeUtils.addSclass("user-panel-buttons", hbox);
    this.appendChild(hbox);
    hbox.setPack("end");
    hbox.setVflex("1");
    // TODO - make configurable
    context.setLabel(Msg.getMsg(Env.getCtx(), "Context"));
    context.setId("context");
    context.addEventListener(Events.ON_CLICK, this);
    ThemeUtils.addSclass("link", context);
    context.setParent(hbox);
    Separator sep = new Separator("vertical");
    sep.setBar(true);
    sep.setParent(hbox);
    preference.setLabel(Msg.getMsg(Env.getCtx(), "Preference"));
    preference.setId("preference");
    preference.addEventListener(Events.ON_CLICK, this);
    ThemeUtils.addSclass("link", preference);
    preference.setParent(hbox);
    sep = new Separator("vertical");
    sep.setBar(true);
    sep.setParent(hbox);
    role.setLabel(this.getRoleName());
    role.setId("role");
    role.addEventListener(Events.ON_CLICK, this);
    ThemeUtils.addSclass("link", role);
    role.setParent(hbox);
    sep = new Separator("vertical");
    sep.setBar(true);
    sep.setParent(hbox);
    logout.setLabel(Msg.getMsg(Env.getCtx(), "Logout"));
    logout.setId("logout");
    logout.addEventListener(Events.ON_CLICK, this);
    ThemeUtils.addSclass("link", logout);
    logout.setParent(hbox);
}
Also used : Hbox(org.zkoss.zul.Hbox) Separator(org.zkoss.zul.Separator)

Aggregations

Separator (org.zkoss.zul.Separator)38 Row (org.adempiere.webui.component.Row)11 Center (org.zkoss.zul.Center)11 Label (org.adempiere.webui.component.Label)10 Rows (org.adempiere.webui.component.Rows)10 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)9 Div (org.zkoss.zul.Div)9 North (org.zkoss.zul.North)9 Hbox (org.zkoss.zul.Hbox)8 South (org.zkoss.zul.South)8 Panel (org.adempiere.webui.component.Panel)7 Borderlayout (org.zkoss.zul.Borderlayout)7 North (org.zkoss.zkex.zul.North)6 South (org.zkoss.zkex.zul.South)5 Vbox (org.zkoss.zul.Vbox)5 Button (org.adempiere.webui.component.Button)4 Tabpanel (org.adempiere.webui.component.Tabpanel)4 Borderlayout (org.zkoss.zkex.zul.Borderlayout)4 Center (org.zkoss.zkex.zul.Center)4 Space (org.zkoss.zul.Space)4