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;
}
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());
}
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);
}
Aggregations