use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.
the class DefaultDesktop 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.setFlex(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);
windowArea = new Center();
windowArea.setParent(layout);
windowArea.setFlex(true);
windowContainer.createPart(windowArea);
createHomeTab();
return layout;
}
use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromPanel method zkInit.
/**
* Create UI
* @throws IOException
*/
protected void zkInit() throws IOException {
Borderlayout contentPane = new Borderlayout();
appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(parameterPanel);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(dataTable);
WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
Button selectAllButton = selectAllAction.getButton();
confirmPanel.addComponentsLeft(selectAllButton);
selectAllButton.addActionListener(this);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(confirmPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
}
use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.
the class WDeleteSelection method initComponents.
/**
* Init components
*/
private void initComponents() {
container = new Window();
container.setTitle(Msg.getMsg(Env.getCtx(), "DeleteSelection"));
container.setAttribute("modal", Boolean.TRUE);
container.setWidth("500px");
container.setHeight("400px");
container.setBorder("normal");
container.setSizable(true);
container.setClosable(true);
container.setMaximizable(true);
// Init list
listbox = new Listbox();
// FR [ 2877111 ]
Vector<String> data = getData();
for (int i = 0; i < data.size(); i++) {
String record = data.get(i);
listbox.appendItem(record, record);
}
// Is a multiple selection
listbox.setMultiple(true);
// Instance Panel
confirmPanel = new ConfirmPanel(true);
//
Div div = new Div();
div.setStyle("width: 100%; height: 100%");
Pre pre = new Pre();
Text text = new Text(Msg.getMsg(Env.getCtx(), "DeleteSelectionDescription"));
text.setParent(pre);
pre.setParent(div);
//
Borderlayout layout = new Borderlayout();
layout.setParent(container);
layout.setWidth("100%");
layout.setHeight("100%");
North north = new North();
north.setParent(layout);
north.appendChild(div);
Center center = new Center();
center.setParent(layout);
center.setFlex(true);
center.appendChild(listbox);
listbox.setWidth("100%");
listbox.setVflex(true);
//
South south = new South();
south.setParent(layout);
south.appendChild(confirmPanel);
// Add Listener
confirmPanel.addActionListener(Events.ON_CLICK, this);
// Default Selected
if (isDefaultSelected() && getSelection() != null) {
listbox.setSelectedIndices(getSelection());
}
}
use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.
the class WRecordInfo method init.
/**
* Static Layout
* @throws Exception
*/
private void init() throws Exception {
Div div = new Div();
div.setStyle("width: 100%; height: 100%");
Pre pre = new Pre();
Text text = new Text(getInfo());
text.setParent(pre);
pre.setParent(div);
//
Borderlayout layout = new Borderlayout();
layout.setParent(v_Container);
layout.setWidth("100%");
layout.setHeight("100%");
Center center = new Center();
center.setParent(layout);
center.setFlex(true);
if (isOk()) {
North north = new North();
north.setParent(layout);
north.appendChild(div);
center.appendChild(table);
table.setWidth("100%");
table.setVflex(true);
} else {
center.appendChild(div);
}
//
South south = new South();
south.setParent(layout);
south.appendChild(confirmPanel);
confirmPanel.addActionListener(Events.ON_CLICK, this);
}
use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.
the class WScanBarUI 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%");
productPanel.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;
}
Aggregations