use of org.zkoss.zkex.zul.South 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.South in project adempiere by adempiere.
the class WAttachment method staticInit.
// WAttachment
/**
* Static setup.
* <pre>
* - northPanel
* - toolBar
* - title
* - centerPane [split]
* - previewPanel (left)
* - text (right)
* - confirmPanel
* </pre>
* @throws Exception
*/
void staticInit() throws Exception {
this.setMaximizable(true);
this.setWidth("700px");
this.setHeight("600px");
this.setTitle("Attachment");
this.setClosable(true);
this.setSizable(true);
this.setBorder("normal");
this.appendChild(mainPanel);
mainPanel.setHeight("100%");
mainPanel.setWidth("100%");
North northPanel = new North();
northPanel.setCollapsible(false);
northPanel.setSplittable(false);
cbContent.setMold("select");
cbContent.setRows(0);
cbContent.addEventListener(Events.ON_SELECT, this);
toolBar.appendChild(bLoad);
toolBar.appendChild(bDelete);
toolBar.appendChild(bSave);
toolBar.appendChild(cbContent);
mainPanel.appendChild(northPanel);
Div div = new Div();
div.appendChild(toolBar);
text.setRows(3);
text.setWidth("100%");
div.appendChild(text);
northPanel.appendChild(div);
bSave.setEnabled(false);
bSave.setImage("/images/Export24.png");
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AttachmentSave"));
bSave.addEventListener(Events.ON_CLICK, this);
bLoad.setImage("/images/Import24.png");
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
bLoad.addEventListener(Events.ON_CLICK, this);
bDelete.setImage("/images/Delete24.png");
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
bDelete.addEventListener(Events.ON_CLICK, this);
previewPanel.appendChild(preview);
preview.setHeight("100%");
preview.setWidth("100%");
Center centerPane = new Center();
centerPane.setAutoscroll(true);
centerPane.setFlex(true);
mainPanel.appendChild(centerPane);
centerPane.appendChild(previewPanel);
South southPane = new South();
mainPanel.appendChild(southPane);
southPane.appendChild(confirmPanel);
southPane.setHeight("30px");
bCancel.setImage("/images/Cancel24.png");
bCancel.addEventListener(Events.ON_CLICK, this);
bOk.setImage("/images/Ok24.png");
bOk.addEventListener(Events.ON_CLICK, this);
bDeleteAll.setImage("/images/Delete24.png");
bDeleteAll.addEventListener(Events.ON_CLICK, this);
bRefresh.setImage("/images/Refresh24.png");
bRefresh.addEventListener(Events.ON_CLICK, this);
confirmPanel.appendChild(bDeleteAll);
confirmPanel.appendChild(bRefresh);
confirmPanel.appendChild(bCancel);
confirmPanel.appendChild(bOk);
}
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 WPOS method dynInit.
// init
/**************************************************************************
* Dynamic Init.
* PosPanel has a GridBagLayout.
* The Sub Panels return their position
*/
private boolean dynInit() {
setMPOS();
userPinListener = new WPOSUserPinListener(this);
//Delay 5 seconds by default
userPinTimer = new Timer((getPINEntryTimeout() + 5) * 1000);
userPinTimer.addEventListener(Events.ON_TIMER, userPinListener);
userPinListener.setTimer(userPinTimer);
userPinTimer.setRunning(false);
Borderlayout mainLayout = new Borderlayout();
actionPanel = new WPOSActionPanel(this);
documentPanel = new WPOSDocumentPanel(this);
orderLinePanel = new WPOSOrderLinePanel(this);
infoProductPanel = new WPOSInfoProduct(this);
quantityPanel = new WPOSQuantityPanel(this);
East east = new East();
Center center = new Center();
West westPanel = new West();
South southPanel = new South();
Borderlayout fullPanel = new Borderlayout();
Borderlayout mediumPanel = new Borderlayout();
statusBar.appendChild(userPinTimer);
southPanel.appendChild(statusBar);
center.setStyle("border: none; width:40%");
center.appendChild(fullPanel);
mainLayout.appendChild(center);
center.setStyle("border: none; height:auto%;");
fullPanel.setWidth("100%");
fullPanel.setHeight("auto");
fullPanel.setStyle("overflow:hidden;height:auto;");
westPanel.appendChild(this.actionPanel);
east.appendChild(documentPanel);
this.actionPanel.appendChild(infoProductPanel.getPanel());
if (IsShowLineControl())
this.actionPanel.appendChild(quantityPanel.getPanel());
this.actionPanel.appendChild(orderLinePanel);
east.setSplittable(true);
east.setStyle("border: none; min-width:44%; width:44%");
fullPanel.appendChild(westPanel);
Center centerPanel = new Center();
fullPanel.appendChild(centerPanel);
centerPanel.appendChild(mediumPanel);
// FR [ 44 ] Change Button location
westPanel.setStyle("display:inline-block;border: none; width:100%; height:auto;float:left;overflow:hidden;");
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.appendChild(east);
mainLayout.appendChild(southPanel);
form.appendChild(mainLayout);
// Seek to last
if (hasRecord()) {
lastRecord();
}
refreshPanel();
form.setHeight("100%");
return true;
}
use of org.zkoss.zkex.zul.South in project adempiere by adempiere.
the class WPOSKeyboard method init.
/**
* Initialize
* @param startText
* @param POSKeyLayout_ID
*/
public void init(int POSKeyLayout_ID) {
Panel panel = new Panel();
appendChild(panel);
// Content
Panel mainPanel = new Panel();
Borderlayout mainLayout = new Borderlayout();
Grid productLayout = GridFactory.newGridLayout();
appendChild(panel);
// North
Panel northPanel = new Panel();
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
//
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(northPanel);
northPanel.appendChild(productLayout);
productLayout.setWidth("100%");
appendChild(mainPanel);
Rows rows = null;
Row row = null;
rows = productLayout.newRows();
row = rows.newRow();
String txtCalcId = txtCalc.getId();
row.appendChild(txtCalc);
txtCalc.setName("number");
txtCalc.setWidth("92%");
WPOSKeyPanel keys = new WPOSKeyPanel(POSKeyLayout_ID, this, txtCalcId, keyBoardType);
center = new Center();
center.setStyle("border: none");
keys.setWidth("100%");
keys.setHeight("99%");
center.appendChild(keys);
mainLayout.appendChild(center);
South south = new South();
ConfirmPanel confirm = new ConfirmPanel(true, false, true, false, false, false, false);
confirm.addActionListener(this);
south.appendChild(confirm);
mainLayout.appendChild(south);
}
Aggregations