use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class ADWindowPanel method doCreatePart.
protected Component doCreatePart(Component parent) {
layout = new Borderlayout();
if (parent != null) {
layout.setParent(parent);
layout.setStyle("position:absolute");
layout.setHeight("100%");
layout.setWidth("100%");
} else {
layout.setPage(page);
}
if (!isEmbedded()) {
North n = new North();
n.setParent(layout);
n.setCollapsible(false);
n.setFlex(true);
Vbox box = new Vbox();
box.setWidth("100%");
toolbar.setParent(box);
box.setParent(n);
toolbar.setWindowNo(getWindowNo());
// FR [ 588 ]
South s = new South();
layout.appendChild(s);
s.setCollapsible(false);
statusBar.setParent(s);
} else {
South s = new South();
layout.appendChild(s);
s.setCollapsible(false);
statusBar.setParent(s);
}
LayoutUtils.addSclass("adwindow-status", statusBar);
if (!isEmbedded() && adTab.isUseExternalSelection()) {
String tabPlacement = SessionManager.getSessionApplication().getUserPreference().getProperty(UserPreference.P_WINDOW_TAB_PLACEMENT);
if (tabPlacement == null || "left".equalsIgnoreCase(tabPlacement)) {
west = new West();
layout.appendChild(west);
west.setSplittable(false);
west.setAutoscroll(true);
west.setFlex(true);
LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west);
adTab.setTabplacement(IADTab.LEFT);
adTab.getTabSelectionComponent().setParent(west);
if (SessionManager.getSessionApplication().getUserPreference().isPropertyBool(UserPreference.P_WINDOW_TAB_COLLAPSIBLE)) {
west.setTitle(Msg.getElement(Env.getCtx(), "AD_Tab_ID"));
west.setCollapsible(true);
}
} else {
east = new East();
layout.appendChild(east);
east.setSplittable(false);
east.setAutoscroll(true);
east.setFlex(true);
LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east);
adTab.setTabplacement(IADTab.RIGHT);
adTab.getTabSelectionComponent().setParent(east);
if (SessionManager.getSessionApplication().getUserPreference().isPropertyBool(UserPreference.P_WINDOW_TAB_COLLAPSIBLE)) {
east.setTitle(Msg.getElement(Env.getCtx(), "AD_Tab_ID"));
east.setCollapsible(true);
}
}
LayoutUtils.addSclass("adwindow-nav-content", (HtmlBasedComponent) adTab.getTabSelectionComponent());
}
contentArea = new Center();
contentArea.setParent(layout);
contentArea.setAutoscroll(true);
contentArea.setFlex(true);
adTab.createPart(contentArea);
if (parent instanceof Tabpanel) {
TabOnCloseHanlder handler = new TabOnCloseHanlder();
((Tabpanel) parent).setOnCloseHandler(handler);
}
if (!isEmbedded()) {
if (keyListener != null)
keyListener.detach();
keyListener = new Keylistener();
statusBar.appendChild(keyListener);
keyListener.setCtrlKeys("#f1#f2#f3#f4#f5#f6#f7#f8#f9#f10#f11#f12^f^i^n^s^d@#left@#right@#up@#down@#pgup@#pgdn@p^p@z@x#enter");
keyListener.addEventListener(Events.ON_CTRL_KEY, toolbar);
keyListener.addEventListener(Events.ON_CTRL_KEY, this);
keyListener.setAutoBlur(false);
}
layout.setAttribute(ITabOnSelectHandler.ATTRIBUTE_KEY, new ITabOnSelectHandler() {
public void onSelect() {
IADTab adTab = getADTab();
if (adTab != null) {
IADTabPanel iadTabpanel = adTab.getSelectedTabpanel();
if (iadTabpanel != null && iadTabpanel instanceof ADTabPanel) {
ADTabPanel adTabpanel = (ADTabPanel) iadTabpanel;
if (adTabpanel.isGridView()) {
adTabpanel.getGridView().scrollToCurrentRow();
}
}
}
}
});
return layout;
}
use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class WScanBarUI method zkInit.
private void zkInit() {
Borderlayout contentPane = new Borderlayout();
form.appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(newGrid);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(productPanel);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(gridConfirm);
}
use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class WExpressReceiptScanBarUI method zkInit.
private void zkInit() {
Borderlayout contentPane = new Borderlayout();
form.appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(newGrid);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(m_panelProduct);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(m_grdConfirm);
}
use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class WExpressReceiptScanBarUI 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%");
m_panelProduct.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;
}
use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class FindWindow method initSimple.
/**
* initialise lookup record tab
* @throws IOException
*
**/
private void initSimple() throws IOException {
lblDocumentNo = new Label();
lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
lblDescription = new Label();
lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
lblName = new Label();
lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
lblValue = new Label();
lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
fieldDocumentNo = new Textbox();
fieldDocumentNo.setId("fieldDocumentNo");
fieldDocumentNo.setMaxlength(40);
fieldDescription = new Textbox();
fieldDescription.setId("fieldDescription");
fieldDescription.setMaxlength(40);
fieldName = new Textbox();
fieldName.setMaxlength(40);
fieldValue = new Textbox();
fieldValue.setMaxlength(40);
// Get button from Action
WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
Button btnNew = action.getButton();
btnNew.setName("btnNew");
btnNew.addEventListener(Events.ON_CLICK, this);
// Get button from Action
action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
Button btnOk = action.getButton();
btnOk.setName("btnOkSimple");
btnOk.addEventListener(Events.ON_CLICK, this);
// Get from action
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");
pnlButtonRight.setWidth("100%");
Panel pnlButtonLeft = new Panel();
pnlButtonLeft.appendChild(btnNew);
Hbox hboxButton = new Hbox();
hboxButton.appendChild(pnlButtonLeft);
hboxButton.appendChild(pnlButtonRight);
hboxButton.setWidth("100%");
pnlDocument = new Row();
pnlDocument.setId("pnlDocument");
pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
pnlDocument.appendChild(fieldDocumentNo);
pnlDescription = new Row();
pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
pnlDescription.appendChild(fieldDescription);
pnlValue = new Row();
pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
pnlValue.appendChild(fieldValue);
pnlName = new Row();
pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
pnlName.appendChild(fieldName);
contentSimple = new Grid();
contentSimple.setId("contentSimple");
contentSimple.setWidth("100%");
contentSimple.makeNoStrip();
contentSimpleRows = new Rows();
contentSimple.appendChild(contentSimpleRows);
contentSimpleRows.appendChild(pnlValue);
contentSimpleRows.appendChild(pnlName);
contentSimpleRows.appendChild(pnlDocument);
contentSimpleRows.appendChild(pnlDescription);
contentSimple.setVflex(true);
Borderlayout layout = new Borderlayout();
layout.setStyle("height: 100%; width: 99%; position: relative");
winLookupRecord.appendChild(layout);
Center center = new Center();
layout.appendChild(center);
center.appendChild(contentSimple);
center.setFlex(true);
South south = new South();
layout.appendChild(south);
south.appendChild(hboxButton);
winLookupRecord.setWidth("100%");
winLookupRecord.setHeight("100%");
winLookupRecord.addEventListener(Events.ON_OK, this);
}
Aggregations