use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromInvoiceUI method zkInit.
// dynInit
/**
* Init ZK
* @throws Exception
*/
protected void zkInit() throws Exception {
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", false));
shipmentLabel.setText(Msg.getElement(Env.getCtx(), "M_InOut_ID", false));
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("110px");
parameterLayout.setWidth("100%");
Panel parameterPanel = v_CreateFromPanel.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
Grid parameterStdLayout = GridFactory.newGridLayout();
Panel parameterStdPanel = new Panel();
parameterStdPanel.appendChild(parameterStdLayout);
Center center = new Center();
parameterLayout.appendChild(center);
center.appendChild(parameterStdPanel);
Rows rows = (Rows) parameterStdLayout.newRows();
Row row = rows.newRow();
row.appendChild(bPartnerLabel.rightAlign());
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
row.appendChild(orderLabel.rightAlign());
row.appendChild(orderField);
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(shipmentLabel.rightAlign());
row.appendChild(shipmentField);
// Add RMA document selection to panel
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(rmaLabel.rightAlign());
row.appendChild(rmaField);
// Add to Main
v_CreateFromPanel.setWidth("100%");
v_CreateFromPanel.setHeight("100%");
v_Container.appendChild(v_CreateFromPanel);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromShipmentUI method zkInit.
// dynInit
/**
* Instance Data
* @throws Exception
*/
protected void zkInit() throws Exception {
boolean isRMAWindow = isRMA();
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", false));
invoiceLabel.setText(Msg.getElement(Env.getCtx(), "C_Invoice_ID", false));
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
locatorLabel.setText(Msg.translate(Env.getCtx(), "M_Locator_ID"));
sameWarehouseCb.setText(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", true));
sameWarehouseCb.setTooltiptext(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", false));
upcLabel.setText(Msg.getElement(Env.getCtx(), "UPC", false));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("120px");
parameterLayout.setWidth("100%");
Panel parameterPanel = v_CreateFromPanel.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
Grid parameterStdLayout = GridFactory.newGridLayout();
Panel parameterStdPanel = new Panel();
parameterStdPanel.appendChild(parameterStdLayout);
Center center = new Center();
parameterLayout.appendChild(center);
center.appendChild(parameterStdPanel);
parameterStdPanel.appendChild(parameterStdLayout);
Rows rows = (Rows) parameterStdLayout.newRows();
Row row = rows.newRow();
row.appendChild(bPartnerLabel.rightAlign());
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
if (!isRMAWindow) {
row.appendChild(orderLabel.rightAlign());
row.appendChild(orderField);
}
row = rows.newRow();
row.appendChild(locatorLabel.rightAlign());
row.appendChild(locatorField.getComponent());
if (!isRMAWindow) {
row.appendChild(invoiceLabel.rightAlign());
row.appendChild(invoiceField);
}
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(sameWarehouseCb);
row = rows.newRow();
row.appendChild(upcLabel.rightAlign());
row.appendChild(upcField.getComponent());
if (isRMAWindow) {
// Add RMA document selection to panel
row.appendChild(rmaLabel.rightAlign());
row.appendChild(rmaField);
}
// Add to Main
v_CreateFromPanel.setWidth("100%");
v_CreateFromPanel.setHeight("100%");
v_Container.appendChild(v_CreateFromPanel);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCharge method createAccountPanel.
/**
* 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 createAccountPanel() {
Borderlayout borderlayout = new Borderlayout();
borderlayout.setStyle("position: absolute");
borderlayout.setWidth("100%");
borderlayout.setHeight("100%");
m_pnlAccount.appendChild(borderlayout);
North north = new North();
north.setBorder("none");
borderlayout.appendChild(north);
Label label = new Label(Msg.getMsg(Env.getCtx(), "ChargeFromAccount"));
label.setStyle("font-weight: bold;");
north.appendChild(label);
Center center = new Center();
center.setBorder("none");
center.setHflex("true");
center.setVflex("true");
center.setAutoscroll(true);
borderlayout.appendChild(center);
center.appendChild(m_tblData);
South south = new South();
south.setBorder("none");
borderlayout.appendChild(south);
Panel southPanel = new Panel();
southPanel.setAlign("right");
south.appendChild(southPanel);
m_btnAccount.setLabel(Msg.getMsg(Env.getCtx(), AD_MESSAGE_CREATE) + " " + Msg.getMsg(Env.getCtx(), "From") + " " + Msg.getElement(Env.getCtx(), "Account_ID"));
m_btnAccount.addEventListener(Events.ON_CLICK, this);
southPanel.appendChild(m_btnAccount);
return;
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class NavBarDesktop method doCreatePart.
protected Component doCreatePart(Component parent) {
SidePanel pnlSide = new SidePanel();
HeaderPanel pnlHead = new HeaderPanel();
pnlSide.getMenuPanel().addMenuListener(this);
layout = new Borderlayout();
if (parent != null) {
layout.setParent(parent);
layout.setWidth("100%");
layout.setHeight("100%");
layout.setStyle("position: absolute");
} else
layout.setPage(page);
dashboardRunnable = new DashboardRunnable(layout.getDesktop(), this);
North n = new North();
n.setSplittable(true);
n.setCollapsible(false);
layout.appendChild(n);
pnlHead.setParent(n);
leftRegion = new West();
layout.appendChild(leftRegion);
leftRegion.setWidth("300px");
leftRegion.setCollapsible(true);
leftRegion.setSplittable(true);
leftRegion.setTitle("Navigation");
//leftRegion.setHflex("true");
leftRegion.setVflex("true");
leftRegion.addEventListener(Events.ON_OPEN, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
OpenEvent oe = (OpenEvent) event;
UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
pref.setProperty(UserPreference.P_MENU_COLLAPSED, !oe.isOpen());
pref.savePreference();
}
});
UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
boolean menuCollapsed = pref.isPropertyBool(UserPreference.P_MENU_COLLAPSED);
leftRegion.setOpen(!menuCollapsed);
navigationPanel = new Accordion();
navigationPanel.setParent(leftRegion);
navigationPanel.setWidth("100%");
navigationPanel.setHeight("100%");
navigationPanel.add(pnlSide, "Application Menu");
Div div = new Div();
favPanel = (DPFavourites) Executions.createComponents(FAVOURITES_PATH, div, null);
navigationPanel.add(div, "Favourites");
//setup drag and drop for favourites
div = navigationPanel.getHeader(1);
div.setDroppable(DPFavourites.FAVOURITE_DROPPABLE);
div.addEventListener(Events.ON_DROP, this);
div = new Div();
Component component = Executions.createComponents(ACTIVITIES_PATH, div, null);
if (component instanceof DashboardPanel) {
DashboardPanel dashboardPanel = (DashboardPanel) component;
dashboardRunnable.add(dashboardPanel);
}
navigationPanel.add(div, "Activities");
div = new Div();
Executions.createComponents(VIEWS_PATH, div, null);
navigationPanel.add(div, Msg.getMsg(Env.getCtx(), "View").replaceAll("&", ""));
navigationPanel.setSelectedIndex(0);
windowArea = new Center();
windowArea.setParent(layout);
windowArea.setHflex("true");
windowArea.setVflex("true");
windowContainer.createPart(windowArea);
createHomeTab();
return layout;
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class NavBar2Desktop method doCreatePart.
protected Component doCreatePart(Component parent) {
SidePanel pnlSide = new SidePanel();
HeaderPanel pnlHead = new HeaderPanel();
pnlSide.getMenuPanel().addMenuListener(this);
layout = new Borderlayout();
if (parent != null) {
layout.setParent(parent);
layout.setWidth("100%");
layout.setHeight("100%");
layout.setStyle("position: absolute");
} else
layout.setPage(page);
dashboardRunnable = new DashboardRunnable(layout.getDesktop(), this);
North n = new North();
n.setSplittable(true);
n.setCollapsible(false);
layout.appendChild(n);
pnlHead.setParent(n);
West w = new West();
layout.appendChild(w);
w.setWidth("300px");
w.setCollapsible(true);
w.setSplittable(true);
w.setTitle(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Menu")));
//w.setHflex("true");
w.setVflex("true");
w.addEventListener(Events.ON_OPEN, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
OpenEvent oe = (OpenEvent) event;
UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
pref.setProperty(UserPreference.P_MENU_COLLAPSED, !oe.isOpen());
pref.savePreference();
}
});
UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
boolean menuCollapsed = pref.isPropertyBool(UserPreference.P_MENU_COLLAPSED);
w.setOpen(!menuCollapsed);
pnlSide.setParent(w);
Center center = new Center();
center.setParent(layout);
center.setHflex("true");
center.setVflex("true");
Borderlayout innerLayout = new Borderlayout();
innerLayout.setHeight("100%");
innerLayout.setWidth("100%");
innerLayout.setParent(center);
West innerW = new West();
innerW.setWidth("200px");
innerW.setCollapsible(true);
innerW.setTitle("Navigation");
innerW.setSplittable(true);
innerW.setCollapsible(true);
innerW.setParent(innerLayout);
shortcutPanel = new Accordion();
shortcutPanel.setWidth("100%");
shortcutPanel.setHeight("100%");
innerW.appendChild(shortcutPanel);
Div div = new Div();
Executions.createComponents(FAVOURITES_PATH, div, null);
shortcutPanel.add(div, "Favourites");
div = new Div();
Component component = Executions.createComponents(ACTIVITIES_PATH, div, null);
if (component instanceof DashboardPanel) {
DashboardPanel dashboardPanel = (DashboardPanel) component;
dashboardRunnable.add(dashboardPanel);
}
shortcutPanel.add(div, "Activities");
shortcutPanel.setSelectedIndex(0);
windowArea = new Center();
windowArea.setParent(innerLayout);
windowArea.setHflex("true");
windowArea.setVflex("true");
windowContainer.createPart(windowArea);
createHomeTab();
return layout;
}
Aggregations