IDEMPIERE-2969:update to use zk8-osgi library

adapt with change in http://tracker.zkoss.org/browse/ZK-2718
This commit is contained in:
hieplq 2015-12-10 19:12:36 +07:00
parent 3f0c230be9
commit 649fb46b23
170 changed files with 1539 additions and 1288 deletions

View File

@ -52,7 +52,7 @@ public class AdempiereIdGenerator implements IdGenerator {
boolean useIdSpace = true;
if (Util.isEmpty(uuid)) {
useIdSpace = false;
String attribute = comp.getWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
String attribute = comp.getClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
if (!Util.isEmpty(attribute)) {
String widgetName = getWidgetName(comp.getWidgetClass());
uuid = widgetName+"0"+attribute;
@ -156,7 +156,7 @@ public class AdempiereIdGenerator implements IdGenerator {
}
if (Util.isEmpty(id)) {
String attribute = comp.getWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
String attribute = comp.getClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
if (attribute != null && attribute.length() > 0) {
String widgetName = getWidgetName(comp.getWidgetClass());
locatorBuilder.append("@")
@ -171,7 +171,7 @@ public class AdempiereIdGenerator implements IdGenerator {
Component parent = comp.getParent();
while(parent != null) {
if (Util.isEmpty(id) || (parent instanceof IdSpace)) {
String parentLocator = parent.getWidgetAttribute(ZK_LOCATOR_ATTRIBUTE);
String parentLocator = parent.getClientAttribute(ZK_LOCATOR_ATTRIBUTE);
if (parentLocator != null && parentLocator.trim().length() > 0) {
locatorBuilder.insert(0, parentLocator+ " ");
break;
@ -180,6 +180,6 @@ public class AdempiereIdGenerator implements IdGenerator {
parent = parent.getParent();
}
comp.setWidgetAttribute(ZK_LOCATOR_ATTRIBUTE, locatorBuilder.toString());
comp.setClientAttribute(ZK_LOCATOR_ATTRIBUTE, locatorBuilder.toString());
}
}

View File

@ -22,6 +22,8 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.VerticalBox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.apache.ecs.xhtml.center;
import org.compiere.model.MAttachmentEntry;
import org.compiere.util.CLogger;
import org.zkoss.util.media.AMedia;
@ -62,7 +64,7 @@ public class FedexLabelWindow extends Window implements EventListener<Event>
private void init()
{
this.setBorder("normal");
this.setWidth("730px");
ZKUpdateUtil.setWidth(this, "730px");
VerticalBox box = new VerticalBox();
this.appendChild(box);
lbx = ListboxFactory.newDropdownListbox();
@ -75,8 +77,8 @@ public class FedexLabelWindow extends Window implements EventListener<Event>
box.appendChild(new Separator());
content = new Iframe();
content.setHeight("500px");
content.setWidth("700px");
ZKUpdateUtil.setHeight(content, "500px");
ZKUpdateUtil.setWidth(content, "700px");
content.setId("content");
content.setName(content.getUuid());
box.appendChild(content);

View File

@ -18,6 +18,7 @@ import java.util.logging.Level;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MArchive;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -50,8 +51,8 @@ public class LabelAppletWindow extends Window implements EventListener<Event>
Applet applet = new Applet();
applet.setCode("PrintLabelApplet.class");
applet.setArchive("labelapplet.jar");
applet.setWidth("0");
applet.setHeight("0");
ZKUpdateUtil.setWidth(applet, "0");
ZKUpdateUtil.setHeight(applet, "0");
applet.setParam("size", list.size() + "");
for(int i = 0; i < list.size(); i++)

View File

@ -27,6 +27,7 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.VerticalBox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MAttachmentEntry;
import org.compiere.util.CLogger;
import org.zkoss.util.media.AMedia;
@ -70,7 +71,7 @@ public class UPSHtmlLabelWindow extends Window implements EventListener<Event>
private void init()
{
this.setBorder("normal");
this.setWidth("730px");
ZKUpdateUtil.setWidth(this, "730px");
VerticalBox box = new VerticalBox();
this.appendChild(box);
html = ListboxFactory.newDropdownListbox();
@ -82,8 +83,8 @@ public class UPSHtmlLabelWindow extends Window implements EventListener<Event>
box.appendChild(html);
box.appendChild(new Separator());
content = new Iframe();
content.setHeight("500px");
content.setWidth("700px");
ZKUpdateUtil.setHeight(content, "500px");
ZKUpdateUtil.setWidth(content, "700px");
content.setId("content");
content.setName(content.getUuid());
box.appendChild(content);

View File

@ -34,6 +34,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridField;
import org.compiere.model.MRole;
@ -311,15 +312,15 @@ public class ValuePreference extends Window implements EventListener<Event>
cbInfowindow.setChecked(true);
//
setPanel.appendChild(setLayout);
setPanel.setHflex("1");
ZKUpdateUtil.setHflex(setPanel, "1");
fAttribute.setReadonly(true);
fValue.setReadonly(true);
Vbox box = new Vbox();
box.setWidth("100%");
box.setHeight("100%");
ZKUpdateUtil.setWidth(box, "100%");
ZKUpdateUtil.setHeight(box, "100%");
box.setParent(this);
box.setHflex("1");
ZKUpdateUtil.setHflex(box, "1");
box.appendChild(setPanel);
Rows rows = new Rows();
@ -331,7 +332,7 @@ public class ValuePreference extends Window implements EventListener<Event>
div.appendChild(lAttribute);
row.appendCellChild(div, 1);
row.appendCellChild(fAttribute, 4);
fAttribute.setWidth("96%");
ZKUpdateUtil.setWidth(fAttribute, "96%");
row.appendCellChild(lAttributeValue, 1);
rows.appendChild(row);
@ -341,7 +342,7 @@ public class ValuePreference extends Window implements EventListener<Event>
div.appendChild(lValue);
row.appendCellChild(div, 1);
row.appendCellChild(fValue, 4);
fValue.setWidth("96%");
ZKUpdateUtil.setWidth(fValue, "96%");
row.appendCellChild(lValueValue, 1);
rows.appendChild(row);
@ -382,7 +383,7 @@ public class ValuePreference extends Window implements EventListener<Event>
//
Separator separator = new Separator();
separator.setHeight("10px");
ZKUpdateUtil.setHeight(separator, "10px");
box.appendChild(separator);
box.appendChild(confirmPanel);
@ -390,7 +391,7 @@ public class ValuePreference extends Window implements EventListener<Event>
setLayout.makeNoStrip();
setLayout.setOddRowSclass("even");
this.setWidth("500px");
ZKUpdateUtil.setWidth(this, "500px");
this.setSizable(true);
} // jbInit

View File

@ -22,6 +22,7 @@ import javax.servlet.ServletRequest;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.part.AbstractUIPart;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.LoginWindow;
import org.zkoss.web.servlet.Servlets;
import org.zkoss.zhtml.Text;
@ -76,7 +77,7 @@ public class WLogin extends AbstractUIPart
div.appendChild(new Text(msg));
browserWarningWindow.appendChild(div);
browserWarningWindow.setPosition("top,right");
browserWarningWindow.setWidth("550px");
ZKUpdateUtil.setWidth(browserWarningWindow, "550px");
browserWarningWindow.setPage(page);
browserWarningWindow.doOverlapped();
}

View File

@ -50,6 +50,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaElement;
@ -250,11 +251,11 @@ public class WAcctViewer extends Window implements EventListener<Event>
private void init() throws Exception
{
// Selection Panel
selectionPanel.setHflex("1");
ZKUpdateUtil.setHflex(selectionPanel, "1");
// Accounting Schema
Grid grid = new Grid();
grid.setHflex("1");
ZKUpdateUtil.setHflex(grid, "1");
grid.setSclass("grid-layout");
selectionPanel.appendChild(grid);
@ -262,10 +263,10 @@ public class WAcctViewer extends Window implements EventListener<Event>
Columns columns = new Columns();
grid.appendChild(columns);
Column column = new Column();
column.setWidth("30%");
ZKUpdateUtil.setWidth(column, "30%");
columns.appendChild(column);
column = new Column();
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
columns.appendChild(column);
Rows rows = grid.newRows();
@ -277,7 +278,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
Row row = rows.newRow();
row.appendChild(lacctSchema);
row.appendChild(selAcctSchema);
selAcctSchema.setHflex("1");
ZKUpdateUtil.setHflex(selAcctSchema, "1");
selDocument.setLabel(Msg.getMsg(Env.getCtx(), "SelectDocument"));
selDocument.addEventListener(Events.ON_CHECK, this);
@ -301,7 +302,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
row = rows.newRow();
row.appendChild(lpostingType);
row.appendChild(selPostingType);
selPostingType.setHflex("1");
ZKUpdateUtil.setHflex(selPostingType, "1");
// Date
@ -325,7 +326,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
row = rows.newRow();
row.appendChild(lOrg);
row.appendChild(selOrg);
selOrg.setHflex("1");
ZKUpdateUtil.setHflex(selOrg, "1");
// Account
@ -384,7 +385,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
displayQty.setLabel(Msg.getMsg(Env.getCtx(), "DisplayQty"));
displayQty.addEventListener(Events.ON_CHECK, this);
displayPanel.setWidth("100%");
ZKUpdateUtil.setWidth(displayPanel, "100%");
displayPanel.appendChild(displayDocumentInfo);
displayPanel.appendChild(displaySourceAmt);
displayPanel.appendChild(displayQty);
@ -392,15 +393,15 @@ public class WAcctViewer extends Window implements EventListener<Event>
grid = new Grid();
grid.setSclass("grid-layout");
grid.setHflex("1");
ZKUpdateUtil.setHflex(grid, "1");
displayPanel.appendChild(grid);
columns = new Columns();
grid.appendChild(columns);
column = new Column();
column.setWidth("70%");
ZKUpdateUtil.setWidth(column, "70%");
columns.appendChild(column);
column = new Column();
column.setWidth("30%");
ZKUpdateUtil.setWidth(column, "30%");
columns.appendChild(column);
rows = grid.newRows();
@ -408,35 +409,35 @@ public class WAcctViewer extends Window implements EventListener<Event>
lSort.setValue(Msg.getMsg(Env.getCtx(), "SortBy"));
lGroup.setValue(Msg.getMsg(Env.getCtx(), "GroupBy"));
row.appendChild(lSort);
lSort.setHflex("1");
ZKUpdateUtil.setHflex(lSort, "1");
row.appendChild(lGroup);
row = rows.newRow();
sortBy1.setMold("select");
sortBy1.setRows(1);
row.appendChild(sortBy1);
sortBy1.setHflex("1");
ZKUpdateUtil.setHflex(sortBy1, "1");
row.appendChild(group1);
row = rows.newRow();
sortBy2.setMold("select");
sortBy2.setRows(1);
row.appendChild(sortBy2);
sortBy2.setHflex("1");
ZKUpdateUtil.setHflex(sortBy2, "1");
row.appendChild(group2);
row = rows.newRow();
sortBy3.setMold("select");
sortBy3.setRows(1);
row.appendChild(sortBy3);
sortBy3.setHflex("1");
ZKUpdateUtil.setHflex(sortBy3, "1");
row.appendChild(group3);
row = rows.newRow();
sortBy4.setMold("select");
sortBy4.setRows(1);
row.appendChild(sortBy4);
sortBy4.setHflex("1");
ZKUpdateUtil.setHflex(sortBy4, "1");
row.appendChild(group4);
//"images/InfoAccount16.png"
@ -452,15 +453,15 @@ public class WAcctViewer extends Window implements EventListener<Event>
groupSelection.appendChild(selectionPanel);
Hlayout boxQueryPanel = new Hlayout();
boxQueryPanel.setHflex("3");
ZKUpdateUtil.setHflex(boxQueryPanel, "3");
boxQueryPanel.appendChild(groupSelection);
groupSelection.setHflex("2");
ZKUpdateUtil.setHflex(groupSelection, "2");
Separator separator = new Separator();
separator.setOrient("vertical");
boxQueryPanel.appendChild(separator);
boxQueryPanel.appendChild(groupDisplay);
groupDisplay.setHflex("1");
ZKUpdateUtil.setHflex(groupDisplay, "1");
// South Panel
@ -489,11 +490,11 @@ public class WAcctViewer extends Window implements EventListener<Event>
bExport.addEventListener(Events.ON_CLICK, this);
bExport.setVisible(false);
southPanel.setHflex("5");
ZKUpdateUtil.setHflex(southPanel, "5");
Grid southLeftGrid = new Grid();
southLeftGrid.setSclass("grid-layout");
southPanel.appendChild(southLeftGrid);
southLeftGrid.setHflex("4");
ZKUpdateUtil.setHflex(southLeftGrid, "4");
rows = southLeftGrid.newRows();
Row southLeft = rows.newRow();
Hlayout repostLayout = new Hlayout();
@ -501,12 +502,12 @@ public class WAcctViewer extends Window implements EventListener<Event>
repostLayout.appendChild(bRePost);
repostLayout.appendChild(new Separator());
repostLayout.appendChild(forcePost);
repostLayout.setVflex("1");
ZKUpdateUtil.setVflex(repostLayout, "1");
southLeft.appendChild(statusLine);
Grid southRight = new Grid();
southRight.setSclass("grid-layout");
southRight.setHflex("1");
ZKUpdateUtil.setHflex(southRight, "1");
southPanel.appendChild(southRight);
Panel southRightPanel = new Panel();
southRightPanel.appendChild(bZoom); // Elaine 2009/07/29
@ -521,27 +522,27 @@ public class WAcctViewer extends Window implements EventListener<Event>
resultPanel = new Borderlayout();
resultPanel.setStyle("position: absolute");
resultPanel.setWidth("99%");
resultPanel.setHeight("99%");
ZKUpdateUtil.setWidth(resultPanel, "99%");
ZKUpdateUtil.setHeight(resultPanel, "99%");
result.appendChild(resultPanel);
Center resultCenter = new Center();
resultPanel.appendChild(resultCenter);
table.setHflex("1");
table.setVflex(true);
table.setHeight("99%");
ZKUpdateUtil.setHflex(table, "1");
ZKUpdateUtil.setVflex(table, true);
ZKUpdateUtil.setHeight(table, "99%");
table.setStyle("position: absolute;");
resultCenter.appendChild(table);
table.setHflex("1");
table.setVflex("1");
ZKUpdateUtil.setHflex(table, "1");
ZKUpdateUtil.setVflex(table, "1");
table.addEventListener(Events.ON_DOUBLE_CLICK, this);
pagingPanel = new South();
resultPanel.appendChild(pagingPanel);
pagingPanel.appendChild(paging);
result.setHflex("1");
result.setHeight("100%");
ZKUpdateUtil.setHflex(result, "1");
ZKUpdateUtil.setHeight(result, "100%");
result.setStyle("position: relative");
paging.addEventListener("onPaging", this);
@ -550,7 +551,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
// Query Tab
query.setHflex("1");
ZKUpdateUtil.setHflex(query, "1");
query.appendChild(boxQueryPanel);
// Tabbox
@ -564,35 +565,35 @@ public class WAcctViewer extends Window implements EventListener<Event>
tabs.appendChild(tabQuery);
tabs.appendChild(tabResult);
tabpanels.setHflex("1");
ZKUpdateUtil.setHflex(tabpanels, "1");
tabpanels.appendChild(query);
tabpanels.appendChild(result);
tabbedPane.setHflex("1");
tabbedPane.setVflex("1");
ZKUpdateUtil.setHflex(tabbedPane, "1");
ZKUpdateUtil.setVflex(tabbedPane, "1");
tabbedPane.appendChild(tabs);
tabbedPane.appendChild(tabpanels);
Borderlayout layout = new Borderlayout();
layout.setParent(this);
layout.setHeight("100%");
layout.setWidth("100%");
ZKUpdateUtil.setHeight(layout, "100%");
ZKUpdateUtil.setWidth(layout, "100%");
layout.setStyle("background-color: transparent; margin: 0; position: absolute; padding: 0;");
Center center = new Center();
center.setParent(layout);
center.setStyle("background-color: transparent; padding: 2px;");
tabbedPane.setParent(center);
tabbedPane.setHflex("1");
tabbedPane.setVflex("1");
ZKUpdateUtil.setHflex(tabbedPane, "1");
ZKUpdateUtil.setVflex(tabbedPane, "1");
South south = new South();
south.setParent(layout);
south.setStyle("background-color: transparent");
south.setHeight("36px");
ZKUpdateUtil.setHeight(south, "36px");
southPanel.setParent(south);
southPanel.setVflex("1");
southPanel.setHflex("1");
ZKUpdateUtil.setVflex(southPanel, "1");
ZKUpdateUtil.setHflex(southPanel, "1");
this.setTitle(Msg.getMsg(Env.getCtx(), TITLE));
this.setClosable(true);

View File

@ -37,6 +37,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MRole;
@ -91,7 +92,7 @@ public class ADSortTab extends Panel implements IADTabpanel
this.gridTab = gridTab;
m_AD_Table_ID = gridTab.getAD_Table_ID();
this.setVflex("true");
ZKUpdateUtil.setVflex(this, "true");
} // ADSortTab
/** Logger */
@ -265,8 +266,8 @@ public class ADSortTab extends Panel implements IADTabpanel
noLabel.setValue("No");
yesLabel.setValue("Yes");
yesList.setVflex(true);
noList.setVflex(true);
ZKUpdateUtil.setVflex(yesList, true);
ZKUpdateUtil.setVflex(noList, true);
setId(AdempiereIdGenerator.escapeId(gridTab.getName()));
@ -345,16 +346,16 @@ public class ADSortTab extends Panel implements IADTabpanel
listHeader.setParent(listHead);
Hlayout hlayout = new Hlayout();
hlayout.setVflex("true");
hlayout.setHflex("true");
ZKUpdateUtil.setVflex(hlayout, "true");
ZKUpdateUtil.setHflex(hlayout, "true");
hlayout.setStyle("margin: auto;");
appendChild(hlayout);
noList.setHflex("1");
noList.setVflex(true);
ZKUpdateUtil.setHflex(noList, "1");
ZKUpdateUtil.setVflex(noList, true);
hlayout.appendChild(noList);
yesList.setVflex(true);
yesList.setHflex("1");
ZKUpdateUtil.setVflex(yesList, true);
ZKUpdateUtil.setHflex(yesList, "1");
hlayout.appendChild(yesList);
addEventListener(ON_ACTIVATE_EVENT, new EventListener<Event>() {
@ -964,7 +965,7 @@ public class ADSortTab extends Panel implements IADTabpanel
@Override
public void setDetailPaneMode(boolean detailMode) {
this.detailPaneMode = detailMode;
this.setVflex("true");
ZKUpdateUtil.setVflex(this, "true");
}
public boolean isDetailPaneMode() {

View File

@ -55,6 +55,7 @@ import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener;
@ -236,11 +237,11 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
{
LayoutUtils.addSclass("adtab-content", this);
this.setWidth("100%");
ZKUpdateUtil.setWidth(this, "100%");
form = new Grid();
form.setHflex("1");
form.setHeight(null);
ZKUpdateUtil.setHflex(form, "1");
ZKUpdateUtil.setHeight(form, null);
form.setVflex(false);
form.setSclass("grid-layout adwindow-form");
form.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "form");
@ -298,7 +299,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
int maxHeight = browserHeight - topmarginpx;
if (prefHeight <= maxHeight) {
height = Integer.toString(prefHeight) + "px";
formContainer.getSouth().setHeight(height);
ZKUpdateUtil.setHeight(formContainer.getSouth(), height);
}
} catch (Exception e) {
// just ignore exception is harmless here, consequence is just not setting height so it will assume the default of theme
@ -360,7 +361,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
treePanel = new ADTreePanel(windowNo, gridTab.getTabNo());
West west = new West();
west.appendChild(treePanel);
west.setWidth("300px");
ZKUpdateUtil.setWidth(west, "300px");
west.setCollapsible(true);
west.setSplittable(true);
west.setAutoscroll(true);
@ -370,8 +371,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
Vlayout div = new Vlayout();
div.appendChild(form);
center.appendChild(div);
div.setVflex("1");
div.setHflex("1");
ZKUpdateUtil.setVflex(div, "1");
ZKUpdateUtil.setHflex(div, "1");
div.setSclass("adtab-form");
div.setStyle("overflow-y: visible;");
div.setSpacing("0px");
@ -387,8 +388,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
div.setSclass("adtab-form");
div.appendChild(form);
div.setStyle("overflow-y: visible;");
div.setVflex("1");
div.setWidth("100%");
ZKUpdateUtil.setVflex(div, "1");
ZKUpdateUtil.setWidth(div, "100%");
div.setSpacing("0px");
Borderlayout layout = new Borderlayout();
@ -430,7 +431,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
for (int h=0;h<numCols;h++){
Column col = new Column();
col.setWidth(equalWidth + "%");
ZKUpdateUtil.setWidth(col, equalWidth + "%");
columns.appendChild(col);
}
@ -1560,7 +1561,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
} else {
attachDetailPane();
}
this.setVflex("true");
ZKUpdateUtil.setVflex(this, "true");
listPanel.setDetailPaneMode(detailPaneMode);
}
}

View File

@ -19,6 +19,7 @@ import org.adempiere.webui.component.SimpleTreeModel;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.panel.TreeSearchPanel;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
@ -83,13 +84,13 @@ public class ADTreePanel extends Panel implements EventListener<Event>
private void init()
{
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "treepanel");
this.setWidth("100%");
this.setHeight("100%");
ZKUpdateUtil.setWidth(this, "100%");
ZKUpdateUtil.setHeight(this, "100%");
tree = new Tree();
tree.setMultiple(false);
tree.setWidth("100%");
tree.setVflex(true);
ZKUpdateUtil.setWidth(tree, "100%");
ZKUpdateUtil.setVflex(tree, true);
tree.setPageSize(-1); // Due to bug in the new paging functionality
tree.setStyle("border: none");

View File

@ -33,6 +33,7 @@ import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.panel.ITabOnCloseHandler;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.zkoss.zk.au.out.AuScript;
@ -90,7 +91,7 @@ public class ADWindowContent extends AbstractADWindowContent
Div div = new Div();
div.setStyle("height: 100%; width: 100%");
north.appendChild(div);
north.setVflex("0");
ZKUpdateUtil.setVflex(north, "0");
toolbar.setParent(div);
toolbar.setWindowNo(getWindowNo());
breadCrumb = new BreadCrumb(getWindowNo());
@ -143,8 +144,8 @@ public class ADWindowContent extends AbstractADWindowContent
contentArea = new Div();
contentArea.setParent(layout);
contentArea.setVflex("1");
contentArea.setHflex("1");
ZKUpdateUtil.setVflex(contentArea, "1");
ZKUpdateUtil.setHflex(contentArea, "1");
contentArea.setStyle("overflow: auto;");
adTabbox.createPart(contentArea);

View File

@ -34,6 +34,7 @@ import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.event.ToolbarListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MRole;
@ -264,7 +265,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
configureKeyMap();
setWidth("100%");
ZKUpdateUtil.setWidth(this, "100%");
}

View File

@ -70,6 +70,7 @@ import org.adempiere.webui.panel.action.ReportAction;
import org.adempiere.webui.part.AbstractUIPart;
import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.CustomizeGridViewDialog;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.FindWindow;
@ -752,8 +753,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
findWindow.setTitle(null);
findWindow.setBorder("none");
findWindow.setStyle("position: absolute; border-bottom: 2px solid #484848; padding: 2px; background-color: #fff;");
findWindow.setWidth("100%");
findWindow.setHeight("60%");
ZKUpdateUtil.setWidth(findWindow, "100%");
ZKUpdateUtil.setHeight(findWindow, "60%");
findWindow.setZindex(1000);
findWindow.setSizable(false);
findWindow.setContentStyle("background-color: #fff; width: 99%; margin: auto;");

View File

@ -29,6 +29,7 @@ import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.event.ToolbarListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WRecordInfo;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.MRole;
@ -96,7 +97,7 @@ public class BreadCrumb extends Div implements EventListener<Event> {
layout.setPack("start");
layout.setAlign("center");
this.appendChild(layout);
layout.setHeight("100%");
ZKUpdateUtil.setHeight(layout, "100%");
layout.setStyle("float: left");
this.setVisible(false);

View File

@ -27,6 +27,7 @@ import java.util.logging.Level;
import org.adempiere.util.Callback;
import org.adempiere.webui.component.ADTabListModel;
import org.adempiere.webui.component.ADTabListModel.ADTabLabel;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener;
@ -256,8 +257,8 @@ public class CompositeADTabbox extends AbstractADTabbox
protected Component doCreatePart(Component parent)
{
layout = new Vlayout();
layout.setHeight("100%");
layout.setWidth("100%");
ZKUpdateUtil.setHeight(layout, "100%");
ZKUpdateUtil.setWidth(layout, "100%");
layout.setStyle("position: relative");
if (parent != null) {
layout.setParent(parent);
@ -407,7 +408,7 @@ public class CompositeADTabbox extends AbstractADTabbox
headerTab.setDetailPane(createDetailPane());
} else
tabPanel.setVisible(false);
headerTab.getDetailPane().setHflex("1");
ZKUpdateUtil.setHflex(headerTab.getDetailPane(), "1");
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel);
tabPanel.setDetailPaneMode(true);
headerTab.getDetailPane().setVflex("true");
@ -417,8 +418,8 @@ public class CompositeADTabbox extends AbstractADTabbox
headerTab.getDetailPane().setVflex("true");
}
HtmlBasedComponent htmlComponent = (HtmlBasedComponent) tabPanel;
htmlComponent.setVflex("1");
htmlComponent.setWidth("100%");
ZKUpdateUtil.setVflex(htmlComponent, "1");
ZKUpdateUtil.setWidth(htmlComponent, "100%");
tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel));
}
@ -543,7 +544,7 @@ public class CompositeADTabbox extends AbstractADTabbox
}
detailPane.setAttribute("detailpane.tablist", list);
detailPane.setVflex("true");
ZKUpdateUtil.setVflex(detailPane, "true");
if (headerTab.getDetailPane() == null) {
headerTab.setDetailPane(detailPane);
}

View File

@ -23,6 +23,7 @@ import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MToolBarButton;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -126,7 +127,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
});
tabbox.setSclass("adwindow-detailpane-tabbox");
tabbox.setTabscroll(true);
tabbox.setWidth("100%");
ZKUpdateUtil.setWidth(tabbox, "100%");
createPopup();
@ -264,7 +265,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
Tabpanels tabpanels = tabbox.getTabpanels();
if (tabpanels == null) {
tabpanels = new Tabpanels();
tabpanels.setWidth("100%");
ZKUpdateUtil.setWidth(tabpanels, "100%");
tabbox.appendChild(tabpanels);
}
Tabpanel tp = new Tabpanel();
@ -396,7 +397,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
toolbar.appendChild(messageContainer);
toolbar.setSclass("adwindow-detailpane-toolbar");
toolbar.setVflex("0");
ZKUpdateUtil.setVflex(toolbar, "0");
messageContainers.put(tabLabel.AD_Tab_ID, messageContainer);
tabPanel.setAttribute("AD_Tab_ID", tabLabel.AD_Tab_ID);
@ -600,7 +601,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
private void createPopup() {
msgPopupCnt = new Div();
msgPopupCnt.setVflex("1");
ZKUpdateUtil.setVflex(msgPopupCnt, "1");
msgPopup = new Window();
@ -609,7 +610,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
msgPopup.setClosable(true);
msgPopup.setSizable(true);
msgPopup.setContentStyle("overflow: auto");
msgPopup.setWidth("500px");
ZKUpdateUtil.setWidth(msgPopup, "500px");
msgPopup.appendChild(msgPopupCnt);
msgPopup.setPage(SessionManager.getAppDesktop().getComponent().getPage());
msgPopup.setShadow(true);
@ -638,8 +639,10 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
*/
@Override
public void setVflex(String flex) {
if (getHeight() != null)
setHeight(null);
super.setVflex(flex);
tabbox.setVflex(flex);
ZKUpdateUtil.setVflex(tabbox, flex);
}
/**

View File

@ -38,6 +38,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.util.DisplayType;
@ -513,7 +514,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
}
}
div.setStyle(divStyle);
div.setWidth("100%");
ZKUpdateUtil.setWidth(div, "100%");
div.setAttribute("columnName", gridPanelFields[i].getColumnName());
div.addEventListener(Events.ON_CLICK, rowListener);
div.addEventListener(Events.ON_DOUBLE_CLICK, rowListener);

View File

@ -34,6 +34,7 @@ import org.adempiere.webui.component.NumberBox;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.util.SortComparator;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.GridTable;
@ -150,10 +151,10 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
setId("gridView");
createListbox();
this.setHflex("1");
ZKUpdateUtil.setHflex(this, "1");
gridFooter = new Div();
gridFooter.setVflex("0");
ZKUpdateUtil.setVflex(gridFooter, "0");
//default paging size
if (AEnv.isTablet())
@ -175,7 +176,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
appendChild(listbox);
appendChild(gridFooter);
this.setVflex("true");
ZKUpdateUtil.setVflex(this, "true");
setStyle(HEADER_GRID_STYLE);
gridFooter.setStyle(HEADER_GRID_STYLE);
@ -187,8 +188,8 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
protected void createListbox() {
listbox = new Grid();
listbox.setSizedByContent(false);
listbox.setVflex("1");
listbox.setHflex("1");
ZKUpdateUtil.setVflex(listbox, "1");
ZKUpdateUtil.setHflex(listbox, "1");
listbox.setSclass("adtab-grid");
listbox.setEmptyMessage(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Processing")));
}
@ -465,7 +466,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
}
org.zkoss.zul.Column selection = new Column();
selection.setWidth("22px");
ZKUpdateUtil.setWidth(selection, "22px");
try{
selection.setSort("none");
} catch (Exception e) {}
@ -477,7 +478,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
columns.appendChild(selection);
org.zkoss.zul.Column indicator = new Column();
indicator.setWidth("22px");
ZKUpdateUtil.setWidth(indicator, "22px");
try {
indicator.setSort("none");
} catch (Exception e) {}
@ -509,24 +510,24 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
column.setLabel(gridField[i].getHeader());
if (columnWidthMap != null && columnWidthMap.get(gridField[i].getAD_Field_ID()) != null && !columnWidthMap.get(gridField[i].getAD_Field_ID()).equals("")) {
column.setWidth(columnWidthMap.get(gridField[i].getAD_Field_ID()));
ZKUpdateUtil.setWidth(column, columnWidthMap.get(gridField[i].getAD_Field_ID()));
} else {
if (gridField[i].getDisplayType()==DisplayType.YesNo) {
if (i > 0) {
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
} else {
int estimatedWidth=60;
int headerWidth = (gridField[i].getHeader().length()+2) * 8;
if (headerWidth > estimatedWidth)
estimatedWidth = headerWidth;
column.setWidth(estimatedWidth+"px");
ZKUpdateUtil.setWidth(column, estimatedWidth+"px");
}
} else if (DisplayType.isNumeric(gridField[i].getDisplayType()) && "Line".equals(gridField[i].getColumnName())) {
//special treatment for line
if (i > 0)
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
else
column.setWidth("60px");
ZKUpdateUtil.setWidth(column, "60px");
} else {
int estimatedWidth = 0;
if (DisplayType.isNumeric(gridField[i].getDisplayType()))
@ -548,17 +549,17 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
if (DisplayType.isLookup(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_COMBOBOX_WIDTH)
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
}
else if (DisplayType.isNumeric(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_NUMERIC_COL_WIDTH)
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
}
else if (!DisplayType.isText(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_COLUMN_WIDTH)
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
}
}
@ -568,7 +569,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
estimatedWidth = MAX_COLUMN_WIDTH;
else if ( estimatedWidth < MIN_COLUMN_WIDTH)
estimatedWidth = MIN_COLUMN_WIDTH;
column.setWidth(Integer.toString(estimatedWidth) + "px");
ZKUpdateUtil.setWidth(column, Integer.toString(estimatedWidth) + "px");
}
}
}
@ -1164,7 +1165,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
Component firstChild = parent.getFirstChild();
if ( gridFooter.getParent() != firstChild ) {
firstChild.appendChild(gridFooter);
gridFooter.setHflex("0");
ZKUpdateUtil.setHflex(gridFooter, "0");
gridFooter.setSclass("adwindow-detailpane-adtab-grid-south");
}
break;
@ -1177,7 +1178,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
else
{
if (gridFooter.getParent() != this) {
gridFooter.setHflex("1");
ZKUpdateUtil.setHflex(gridFooter, "1");
gridFooter.setSclass("adtab-grid-south");
appendChild(gridFooter);
}

View File

@ -6,6 +6,7 @@ package org.adempiere.webui.adwindow;
import java.util.List;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zul.Button;
import org.zkoss.zul.Vbox;
@ -23,11 +24,11 @@ public class ProcessButtonPopup extends Window {
public void render(List<Button> buttons) {
setSclass("toolbar-popup-window process-buttons-popup");
//setWidth("250px");
setHflex("min");
ZKUpdateUtil.setHflex(this, "min");
setBorder("normal");
Vbox vbox = new Vbox();
vbox.setHflex("true");
ZKUpdateUtil.setHflex(vbox, "true");
appendChild(vbox);
vbox.setSclass("toolbar-popup-window-cnt");
vbox.setAlign("stretch");
@ -36,7 +37,7 @@ public class ProcessButtonPopup extends Window {
if (button.getPage() != null) {
button.detach();
}
button.setHflex("1");
ZKUpdateUtil.setHflex(button, "1");
vbox.appendChild(button);
}
}

View File

@ -23,6 +23,7 @@ import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.process.ProcessInfoLog;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.Component;
@ -274,7 +275,7 @@ public class StatusBar extends Panel implements EventListener<Event>
private void createPopup() {
msgPopupCnt = new Div();
msgPopupCnt.setVflex("1");
ZKUpdateUtil.setVflex(msgPopupCnt, "1");
msgPopup = new Window();
@ -282,7 +283,7 @@ public class StatusBar extends Panel implements EventListener<Event>
msgPopup.setClosable(true);
msgPopup.setSizable(true);
msgPopup.setContentStyle("overflow: auto");
msgPopup.setWidth("500px");
ZKUpdateUtil.setWidth(msgPopup, "500px");
msgPopup.appendChild(msgPopupCnt);
msgPopup.setShadow(true);
msgPopupCaption = new Caption();

View File

@ -48,6 +48,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.compiere.Adempiere;
@ -274,7 +275,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
topParameterLayout = new Vlayout();
topParameterLayout.setSclass("top-parameter-layout");
mainParameterLayout.appendChild(topParameterLayout);
topParameterLayout.setVflex("true");
ZKUpdateUtil.setVflex(topParameterLayout, "true");
// button and advanced control
bottomParameterLayout = new Vlayout();
bottomParameterLayout.setSclass("bottom-parameter-layout");
@ -324,10 +325,10 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
Columns columns = new Columns();
grid.appendChild(columns);
Column col = new Column();
col.setWidth("30%");
ZKUpdateUtil.setWidth(col, "30%");
columns.appendChild(col);
col = new Column();
col.setWidth("70%");
ZKUpdateUtil.setWidth(col, "70%");
columns.appendChild(col);
Rows rows = new Rows();

View File

@ -22,6 +22,7 @@ import java.util.Comparator;
import java.util.List;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.I_AD_SearchDefinition;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@ -69,8 +70,8 @@ public class DocumentSearchController implements EventListener<Event>{
public void create(Component parent) {
layout = new Vlayout();
layout.setStyle("padding: 3px;");
layout.setWidth("100%");
layout.setVflex("true");
ZKUpdateUtil.setWidth(layout, "100%");
ZKUpdateUtil.setVflex(layout, "true");
parent.appendChild(layout);

View File

@ -36,6 +36,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.FeedbackManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.apache.commons.io.IOUtils;
import org.compiere.model.MAttachment;
@ -89,7 +90,7 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
setTitle(Msg.getMsg(Env.getCtx(), "RequestNew"));
setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
setWidth("400px");
ZKUpdateUtil.setWidth(this, "400px");
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setShadow(true);
@ -135,15 +136,15 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
txtSummary = new Textbox();
txtSummary.setRows(10);
txtSummary.setWidth("95%");
txtSummary.setHeight("100%");
ZKUpdateUtil.setWidth(txtSummary, "95%");
ZKUpdateUtil.setHeight(txtSummary, "100%");
confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(this);
Grid grid = GridFactory.newGridLayout();
grid.setVflex("min");
ZKUpdateUtil.setVflex(grid, "min");
Rows rows = new Rows();
grid.appendChild(rows);
@ -186,16 +187,16 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
row.appendChild(new Label(Msg.getMsg(Env.getCtx(), "Attachment")));
attachmentBox = new Div();
attachmentBox.setHflex("1");
attachmentBox.setVflex("1");
ZKUpdateUtil.setHflex(attachmentBox, "1");
ZKUpdateUtil.setVflex(attachmentBox, "1");
row = rows.newRow();
row.setStyle("padding: 0px 4px 4px 6px");
row.appendChild(attachmentBox);
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("min");
ZKUpdateUtil.setHflex(borderlayout, "1");
ZKUpdateUtil.setVflex(borderlayout, "min");
North northPane = new North();
northPane.setSclass("dialog-content");
@ -203,8 +204,8 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
borderlayout.appendChild(northPane);
northPane.appendChild(grid);
grid.setVflex("1");
grid.setHflex("1");
ZKUpdateUtil.setVflex(grid, "1");
ZKUpdateUtil.setHflex(grid, "1");
South southPane = new South();
southPane.setSclass("dialog-footer");

View File

@ -21,6 +21,7 @@ import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.util.DocumentSearch;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
@ -75,7 +76,7 @@ public class GlobalSearch extends Div implements EventListener<Event> {
bandbox = new Bandbox();
bandbox.setSclass("global-search-box");
appendChild(bandbox);
bandbox.setWidth("100%");
ZKUpdateUtil.setWidth(bandbox, "100%");
bandbox.setAutodrop(true);
bandbox.addEventListener(Events.ON_CHANGING, this);
bandbox.addEventListener(Events.ON_CHANGE, this);
@ -83,11 +84,11 @@ public class GlobalSearch extends Div implements EventListener<Event> {
bandbox.addEventListener(Events.ON_CTRL_KEY, this);
Bandpopup popup = new Bandpopup();
popup.setHeight("500px");
ZKUpdateUtil.setHeight(popup, "500px");
bandbox.appendChild(popup);
tabbox = new Tabbox();
tabbox.setVflex("true");
ZKUpdateUtil.setVflex(tabbox, "true");
tabbox.addEventListener(Events.ON_SELECT, this);
Tabs tabs = new Tabs();
tabbox.appendChild(tabs);
@ -97,7 +98,7 @@ public class GlobalSearch extends Div implements EventListener<Event> {
Tabpanels tabPanels = new Tabpanels();
tabbox.appendChild(tabPanels);
Tabpanel tabPanel = new Tabpanel();
tabPanel.setVflex("true");
ZKUpdateUtil.setVflex(tabPanel, "true");
tabPanel.setSclass("global-search-tabpanel");
tabPanels.appendChild(tabPanel);
popup.appendChild(tabbox);

View File

@ -19,6 +19,7 @@ import java.util.Calendar;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.h3;
import org.apache.ecs.xhtml.h4;
@ -52,15 +53,15 @@ public class HelpWindow extends Window {
this.setTitle(Msg.getMsg(Env.getCtx(), "Help"));
this.gridWindow = gridWindow;
this.setWidth("99%");
this.setHeight("100%");
ZKUpdateUtil.setWidth(this, "99%");
ZKUpdateUtil.setHeight(this, "100%");
this.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
this.setSclass("help-window");
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("1");
ZKUpdateUtil.setHflex(borderlayout, "1");
ZKUpdateUtil.setVflex(borderlayout, "1");
Center centerPane = new Center();
centerPane.setAutoscroll(true);

View File

@ -24,6 +24,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeItemAction;
import org.adempiere.webui.util.TreeNodeAction;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MTreeNode;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -178,14 +179,14 @@ public class MenuSearchController implements EventListener<Event>{
refreshModel();
layout = new Vlayout();
layout.setHeight("100%");
ZKUpdateUtil.setHeight(layout, "100%");
parent.appendChild(layout);
listbox = new Listbox();
listbox.setEmptyMessage(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "FindZeroRecords")));
listbox.setStyle("border: none");
listbox.setWidth("100%");
listbox.setVflex("true");
ZKUpdateUtil.setWidth(listbox, "100%");
ZKUpdateUtil.setVflex(listbox, "true");
layout.appendChild(listbox);
listbox.setItemRenderer(new MenuItemRenderer());
listbox.addEventListener(Events.ON_SELECT, this);
@ -195,7 +196,7 @@ public class MenuSearchController implements EventListener<Event>{
Listheader listheader = new Listheader();
listhead.appendChild(listheader);
listheader = new Listheader();
listheader.setWidth("32px");
ZKUpdateUtil.setWidth(listheader, "32px");
listhead.appendChild(listheader);
layout.addEventListener(ON_SEARCH_ECHO, this);

View File

@ -37,6 +37,7 @@ import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.model.X_AD_CtxHelp;
@ -340,7 +341,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
if (resultPanelLayout == null){
resultPanelLayout = new Vlayout();
resultPanelLayout.setSclass("result-parameter-layout");
resultPanelLayout.setVflex("true");
ZKUpdateUtil.setVflex(resultPanelLayout, "true");
// reference for update late
messageResultContent = setHeadMessage(resultPanelLayout, null);

View File

@ -41,6 +41,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.IProcessParameter;
import org.compiere.model.GridField;
@ -107,10 +108,10 @@ public class ProcessParameterPanel extends Panel implements
Columns columns = new Columns();
centerPanel.appendChild(columns);
Column col = new Column();
col.setWidth("30%");
ZKUpdateUtil.setWidth(col, "30%");
columns.appendChild(col);
col = new Column();
col.setWidth("70%");
ZKUpdateUtil.setWidth(col, "70%");
columns.appendChild(col);
}
@ -336,7 +337,7 @@ public class ProcessParameterPanel extends Panel implements
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
editor2.setProcessParameter(true);
//override attribute
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
editor2.getComponent().setClientAttribute("columnName", mField2.getColumnName()+"_To");
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
// New Field value to be updated to editor
mField2.addPropertyChangeListener(editor2);

View File

@ -48,6 +48,7 @@ import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Allocation;
import org.compiere.model.MAllocationHdr;
@ -155,8 +156,8 @@ public class WAllocation extends Allocation
{
//
form.appendChild(mainLayout);
mainLayout.setWidth("99%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "99%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date"));
autoWriteOff.setSelected(false);
autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true));
@ -197,11 +198,11 @@ public class WAllocation extends Allocation
Rows rows = null;
Row row = null;
parameterLayout.setWidth("80%");
ZKUpdateUtil.setWidth(parameterLayout, "80%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendCellChild(bpartnerLabel.rightAlign());
bpartnerSearch.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(bpartnerSearch.getComponent(), "true");
row.appendCellChild(bpartnerSearch.getComponent(),2);
bpartnerSearch.showMenu();
Hbox box = new Hbox();
@ -209,13 +210,13 @@ public class WAllocation extends Allocation
box.appendChild(dateField.getComponent());
row.appendCellChild(box);
row.appendCellChild(organizationLabel.rightAlign());
organizationPick.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(organizationPick.getComponent(), "true");
row.appendCellChild(organizationPick.getComponent(),1);
organizationPick.showMenu();
row = rows.newRow();
row.appendCellChild(currencyLabel.rightAlign(),1);
currencyPick.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(currencyPick.getComponent(), "true");
row.appendCellChild(currencyPick.getComponent(),1);
currencyPick.showMenu();
row.appendCellChild(multiCurrency,1);
@ -228,37 +229,37 @@ public class WAllocation extends Allocation
south.appendChild(southPanel);
southPanel.appendChild(allocationPanel);
allocationPanel.appendChild(allocationLayout);
allocationLayout.setHflex("min");
ZKUpdateUtil.setHflex(allocationLayout, "min");
rows = allocationLayout.newRows();
row = rows.newRow();
row.appendCellChild(differenceLabel.rightAlign());
row.appendCellChild(allocCurrencyLabel.rightAlign());
differenceField.setHflex("true");
ZKUpdateUtil.setHflex(differenceField, "true");
row.appendCellChild(differenceField);
row.appendCellChild(chargeLabel.rightAlign());
chargePick.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(chargePick.getComponent(), "true");
row.appendCellChild(chargePick.getComponent());
row.appendCellChild(DocTypeLabel.rightAlign());
chargePick.showMenu();
DocTypePick.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(DocTypePick.getComponent(), "true");
row.appendCellChild(DocTypePick.getComponent());
DocTypePick.showMenu();
allocateButton.setHflex("true");
ZKUpdateUtil.setHflex(allocateButton, "true");
row.appendCellChild(allocateButton);
row.appendCellChild(refreshButton);
paymentPanel.appendChild(paymentLayout);
paymentPanel.setWidth("100%");
paymentPanel.setHeight("100%");
paymentLayout.setWidth("100%");
paymentLayout.setHeight("100%");
ZKUpdateUtil.setWidth(paymentPanel, "100%");
ZKUpdateUtil.setHeight(paymentPanel, "100%");
ZKUpdateUtil.setWidth(paymentLayout, "100%");
ZKUpdateUtil.setHeight(paymentLayout, "100%");
paymentLayout.setStyle("border: none");
invoicePanel.appendChild(invoiceLayout);
invoicePanel.setWidth("100%");
invoicePanel.setHeight("100%");
invoiceLayout.setWidth("100%");
invoiceLayout.setHeight("100%");
ZKUpdateUtil.setWidth(invoicePanel, "100%");
ZKUpdateUtil.setHeight(invoicePanel, "100%");
ZKUpdateUtil.setWidth(invoiceLayout, "100%");
ZKUpdateUtil.setHeight(invoiceLayout, "100%");
invoiceLayout.setStyle("border: none");
north = new North();
@ -272,8 +273,8 @@ public class WAllocation extends Allocation
Center center = new Center();
paymentLayout.appendChild(center);
center.appendChild(paymentTable);
paymentTable.setWidth("99%");
paymentTable.setHeight("99%");
ZKUpdateUtil.setWidth(paymentTable, "99%");
ZKUpdateUtil.setHeight(paymentTable, "99%");
center.setStyle("border: none");
north = new North();
@ -287,23 +288,23 @@ public class WAllocation extends Allocation
center = new Center();
invoiceLayout.appendChild(center);
center.appendChild(invoiceTable);
invoiceTable.setWidth("99%");
invoiceTable.setHeight("99%");
ZKUpdateUtil.setWidth(invoiceTable, "99%");
ZKUpdateUtil.setHeight(invoiceTable, "99%");
center.setStyle("border: none");
//
center = new Center();
mainLayout.appendChild(center);
center.appendChild(infoPanel);
infoPanel.setHflex("1");
infoPanel.setVflex("1");
ZKUpdateUtil.setHflex(infoPanel, "1");
ZKUpdateUtil.setVflex(infoPanel, "1");
infoPanel.setStyle("border: none");
infoPanel.setWidth("100%");
infoPanel.setHeight("100%");
ZKUpdateUtil.setWidth(infoPanel, "100%");
ZKUpdateUtil.setHeight(infoPanel, "100%");
north = new North();
north.setStyle("border: none");
north.setHeight("49%");
ZKUpdateUtil.setHeight(north, "49%");
infoPanel.appendChild(north);
north.appendChild(paymentPanel);
north.setSplittable(true);
@ -311,8 +312,8 @@ public class WAllocation extends Allocation
center.setStyle("border: none");
infoPanel.appendChild(center);
center.appendChild(invoicePanel);
invoicePanel.setHflex("1");
invoicePanel.setVflex("1");
ZKUpdateUtil.setHflex(invoicePanel, "1");
ZKUpdateUtil.setVflex(invoicePanel, "1");
} // jbInit
/**
@ -343,7 +344,7 @@ public class WAllocation extends Allocation
// Translation
statusBar.appendChild(new Label(Msg.getMsg(Env.getCtx(), "AllocateStatus")));
statusBar.setVflex("min");
ZKUpdateUtil.setVflex(statusBar, "min");
// Date set to Login Date
Calendar cal = Calendar.getInstance();

View File

@ -53,6 +53,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Archive;
import org.compiere.model.MArchive;
@ -198,8 +199,8 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
private void jbInit() throws Exception
{
tabbox.setWidth("100%");
tabbox.setHeight("90%");
ZKUpdateUtil.setWidth(tabbox, "100%");
ZKUpdateUtil.setHeight(tabbox, "90%");
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
tabbox.addEventListener(Events.ON_SELECT, this);
@ -251,17 +252,17 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
gridQuery.appendChild(columns);
Column column = new Column();
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
column.setAlign("right");
columns.appendChild(column);
column = new Column();
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column.setAlign("left");
columns.appendChild(column);
column = new Column();
column.setWidth("25%");
ZKUpdateUtil.setWidth(column, "25%");
column.setAlign("left");
columns.appendChild(column);
@ -278,49 +279,49 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
rows.appendChild(row);
row.appendChild(processLabel);
row.appendChild(processField);
processField.setHflex("1");
ZKUpdateUtil.setHflex(processField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(bPartnerLabel);
row.appendChild(bPartnerField.getComponent());
bPartnerField.getComponent().setHflex("1");
ZKUpdateUtil.setHflex(bPartnerField.getComponent(), "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(tableLabel);
row.appendChild(tableField);
tableField.setHflex("1");
ZKUpdateUtil.setHflex(tableField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(nameQLabel);
row.appendChild(nameQField);
nameQField.setHflex("1");
ZKUpdateUtil.setHflex(nameQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(descriptionQLabel);
row.appendChild(descriptionQField);
descriptionQField.setHflex("1");
ZKUpdateUtil.setHflex(descriptionQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(helpQLabel);
row.appendChild(helpQField);
helpQField.setHflex("1");
ZKUpdateUtil.setHflex(helpQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(createdByQLabel);
row.appendChild(createdByQField);
createdByQField.setHflex("1");
ZKUpdateUtil.setHflex(createdByQField, "1");
row.appendChild(new Space());
row = new Row();
@ -350,17 +351,17 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
gridView.appendChild(columns);
Column column = new Column();
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
column.setAlign("left");
columns.appendChild(column);
column = new Column();
column.setHflex("1");
ZKUpdateUtil.setHflex(column, "1");
column.setAlign("center");
columns.appendChild(column);
column = new Column();
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
column.setAlign("right");
columns.appendChild(column);
@ -376,12 +377,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
row = new Row();
rows.appendChild(row);
row.appendCellChild(createdByLabel, 3);
createdByLabel.setHflex("1");
ZKUpdateUtil.setHflex(createdByLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(createdByField, 3);
createdByField.setHflex("1");
ZKUpdateUtil.setHflex(createdByField, "1");
row = new Row();
rows.appendChild(row);
@ -395,36 +396,36 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
row = new Row();
rows.appendChild(row);
row.appendCellChild(nameLabel, 3);
nameLabel.setHflex("1");
ZKUpdateUtil.setHflex(nameLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(nameField, 3);
nameField.setHflex("1");
ZKUpdateUtil.setHflex(nameField, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(descriptionLabel, 3);
descriptionLabel.setHflex("1");
ZKUpdateUtil.setHflex(descriptionLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(descriptionField, 3);
descriptionField.setRows(3);
descriptionField.setHeight("100%");
descriptionField.setHflex("1");
ZKUpdateUtil.setHeight(descriptionField, "100%");
ZKUpdateUtil.setHflex(descriptionField, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(helpLabel, 3);
helpLabel.setHflex("1");
ZKUpdateUtil.setHflex(helpLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(helpField, 3);
helpField.setRows(3);
helpField.setHeight("100%");
helpField.setHflex("1");
ZKUpdateUtil.setHeight(helpField, "100%");
ZKUpdateUtil.setHflex(helpField, "1");
row = new Row();
rows.appendChild(row);
@ -448,14 +449,14 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
Tabpanel tabViewPanel = new Tabpanel();
Hbox boxViewSeparator = new Hbox();
boxViewSeparator.setWidth("100%");
boxViewSeparator.setHeight("100%");
ZKUpdateUtil.setWidth(boxViewSeparator, "100%");
ZKUpdateUtil.setHeight(boxViewSeparator, "100%");
cell = new Cell();
cell.setWidth("70%");
ZKUpdateUtil.setWidth(cell, "70%");
cell.appendChild(iframe);
boxViewSeparator.appendChild(cell);
cell = new Cell();
cell.setWidth("30%");
ZKUpdateUtil.setWidth(cell, "30%");
cell.appendChild(gridView);
boxViewSeparator.appendChild(cell);
tabViewPanel.appendChild(boxViewSeparator);
@ -469,12 +470,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
iframe.setId("reportFrame");
int height = Double.valueOf(SessionManager.getAppDesktop().getClientInfo().desktopHeight * 0.8).intValue();
height = height - 50;
iframe.setHeight(height + "px");
iframe.setWidth("100%");
ZKUpdateUtil.setHeight(iframe, height + "px");
ZKUpdateUtil.setWidth(iframe, "100%");
//iframe.setAutohide(true);
form.setWidth("100%");
form.setHeight("100%");
ZKUpdateUtil.setWidth(form, "100%");
ZKUpdateUtil.setHeight(form, "100%");
form.appendChild(tabbox);
form.appendChild(confirmPanel);
}

View File

@ -37,6 +37,7 @@ import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MAttribute;
import org.compiere.model.MAttributeValue;
@ -101,20 +102,20 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
modeCombo.appendItem(MODES[i], MODES[i]);
modeCombo.setMold("select");
tabbox.setWidth("100%");
tabbox.setHeight("85%");
ZKUpdateUtil.setWidth(tabbox, "100%");
ZKUpdateUtil.setHeight(tabbox, "85%");
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
tabbox.addEventListener(Events.ON_SELECT, this);
Grid gridSelection = new Grid();
gridSelection.setWidth("500px");
ZKUpdateUtil.setWidth(gridSelection, "500px");
gridSelection.setStyle("margin:0; padding:0;");
gridSelection.makeNoStrip();
gridSelection.setOddRowSclass("even");
gridView.setWidth("100%");
gridView.setHeight("100%");
ZKUpdateUtil.setWidth(gridView, "100%");
ZKUpdateUtil.setHeight(gridView, "100%");
gridView.setSizedByContent(false);
Rows rows = new Rows();
@ -127,7 +128,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
div.appendChild(attributeLabel1);
row.appendCellChild(div, 1);
row.appendCellChild(attributeCombo1, 2);
attributeCombo1.setWidth("100%");
ZKUpdateUtil.setWidth(attributeCombo1, "100%");
row = new Row();
rows.appendChild(row);
@ -136,7 +137,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
div.appendChild(attributeLabel2);
row.appendCellChild(div, 1);
row.appendCellChild(attributeCombo2, 2);
attributeCombo2.setWidth("100%");
ZKUpdateUtil.setWidth(attributeCombo2, "100%");
row = new Row();
rows.appendChild(row);
@ -145,7 +146,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
div.appendChild(labelPriceList);
row.appendCellChild(div, 1);
row.appendCellChild(pickPriceList, 2);
pickPriceList.setWidth("100%");
ZKUpdateUtil.setWidth(pickPriceList, "100%");
row = new Row();
rows.appendChild(row);
@ -154,7 +155,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
div.appendChild(labelWarehouse);
row.appendCellChild(div, 1);
row.appendCellChild(pickWarehouse, 2);
pickWarehouse.setWidth("100%");
ZKUpdateUtil.setWidth(pickWarehouse, "100%");
div = new Div();
div.setStyle("text-align: center;");
@ -184,8 +185,8 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
tabpanels.appendChild(tabAttributeGridPanel);
tabs.appendChild(tabAttributeGrid);
this.setWidth("100%");
this.setHeight("100%");
ZKUpdateUtil.setWidth(this, "100%");
ZKUpdateUtil.setHeight(this, "100%");
this.appendChild(tabbox);
tabbox.addEventListener(Events.ON_SELECT, this);
this.appendChild(confirmPanel);
@ -456,7 +457,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
if (rowIndex == 0 && colIndex == 0)
{
Vbox descr = new Vbox();
descr.setWidth("100%");
ZKUpdateUtil.setWidth(descr, "100%");
if (xValues != null)
{
Div div = new Div();

View File

@ -41,6 +41,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
@ -236,7 +237,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
productField.addEventListener(Events.ON_SELECT, this);
productQty.addEventListener(Events.ON_CHANGE, this);
productField.setWidth("99%");
ZKUpdateUtil.setWidth(productField, "99%");
boxProductQty.appendChild(lblProduct.rightAlign());
boxProductQty.appendChild(productField);
boxProductQty.appendChild(lblQty.rightAlign());
@ -248,7 +249,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
orderField.setRows(1);
orderField.setMold("select");
orderField.setWidth("99%");
ZKUpdateUtil.setWidth(orderField, "99%");
for (int i = 0; i < keyNamePair.length; i++)
{
@ -271,7 +272,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
{
invoiceField.setRows(1);
invoiceField.setMold("select");
invoiceField.setWidth("99%");
ZKUpdateUtil.setWidth(invoiceField, "99%");
keyNamePair = getInvoices();
@ -296,7 +297,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
{
projectField.setRows(1);
projectField.setMold("select");
projectField.setWidth("99%");
ZKUpdateUtil.setWidth(projectField, "99%");
keyNamePair = getProjects();
@ -626,7 +627,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
private Div createDivPanel (int with) {
Div divPanel = new Div ();
divPanel.setWidth(String.format("%1$spx", with));
ZKUpdateUtil.setWidth(divPanel, String.format("%1$spx", with));
divPanel.setStyle("padding-right:0;padding-left:0");
return divPanel;
}
@ -634,14 +635,14 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
private Hlayout createHlayoutPanel (String width) {
Hlayout layout = new Hlayout();
layout.setSpacing("0");
layout.setWidth(width);
ZKUpdateUtil.setWidth(layout, width);
return layout;
}
private Vlayout createVlayoutPanel (String width) {
Vlayout layout = new Vlayout();
layout.setSpacing("0");
layout.setWidth(width);
ZKUpdateUtil.setWidth(layout, width);
return layout;
}

View File

@ -39,6 +39,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Charge;
import org.compiere.util.CLogger;
@ -251,8 +252,8 @@ public class WCharge extends Charge implements IFormController, EventListener<Ev
{
Borderlayout borderlayout = new Borderlayout();
borderlayout.setStyle("position: absolute");
borderlayout.setWidth("100%");
borderlayout.setHeight("100%");
ZKUpdateUtil.setWidth(borderlayout, "100%");
ZKUpdateUtil.setHeight(borderlayout, "100%");
m_pnlAccount.appendChild(borderlayout);
North north = new North();
@ -267,8 +268,8 @@ public class WCharge extends Charge implements IFormController, EventListener<Ev
center.setAutoscroll(true);
borderlayout.appendChild(center);
center.appendChild(m_tblData);
m_tblData.setVflex("1");
m_tblData.setHflex("1");
ZKUpdateUtil.setVflex(m_tblData, "1");
ZKUpdateUtil.setHflex(m_tblData, "1");
South south = new South();
south.setBorder("none");

View File

@ -37,6 +37,7 @@ import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.CreateFromDepositBatch;
import org.compiere.model.GridTab;
@ -201,8 +202,8 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("130px");
parameterLayout.setWidth("100%");
ZKUpdateUtil.setHeight(parameterLayout, "130px");
ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@ -219,14 +220,14 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements
Column column = new Column();
columns.appendChild(column);
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column = new Column();
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
columns.appendChild(column);
Rows rows = (Rows) parameterBankLayout.newRows();

View File

@ -25,6 +25,7 @@ import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.CreateFromForm;
import org.compiere.util.Env;
@ -114,12 +115,12 @@ public class WCreateFromForm extends ADForm implements EventListener<Event>, WTa
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
ZKUpdateUtil.setWidth(this,"750px");
ZKUpdateUtil.setHeight(this, "550px");
setSizable(true);
setBorder("normal");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
ZKUpdateUtil.setWidth(contentPane, "100%");
ZKUpdateUtil.setHeight(contentPane, "100%");
}
public void onEvent(Event e) throws Exception

View File

@ -32,12 +32,15 @@ import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromInvoice;
import org.compiere.model.GridTab;
import org.compiere.model.MDocType;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import static org.compiere.model.SystemIDs.*;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -133,8 +136,8 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("110px");
parameterLayout.setWidth("100%");
ZKUpdateUtil.setHeight(parameterLayout, "110px");
ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@ -152,14 +155,14 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
row.appendChild(orderLabel.rightAlign());
orderField.setHflex("1");
ZKUpdateUtil.setHflex(orderField, "1");
row.appendChild(orderField);
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(shipmentLabel.rightAlign());
shipmentField.setHflex("1");
ZKUpdateUtil.setHflex(shipmentField, "1");
row.appendChild(shipmentField);
// Add RMA document selection to panel
@ -167,7 +170,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(rmaLabel.rightAlign());
rmaField.setHflex("1");
ZKUpdateUtil.setHflex(rmaField, "1");
row.appendChild(rmaField);
}

View File

@ -28,11 +28,14 @@ import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromRMA;
import org.compiere.model.GridTab;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import static org.compiere.model.SystemIDs.*;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -103,8 +106,8 @@ public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListen
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("110px");
parameterLayout.setWidth("100%");
ZKUpdateUtil.setHeight(parameterLayout, "110px");
ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);

View File

@ -38,13 +38,16 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromShipment;
import org.compiere.model.GridTab;
import org.compiere.model.MLocatorLookup;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MProduct;
import static org.compiere.model.SystemIDs.*;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -154,8 +157,8 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
upcLabel.setText(Msg.getElement(Env.getCtx(), "UPC", false));
Vlayout vlayout = new Vlayout();
vlayout.setVflex("1");
vlayout.setWidth("100%");
ZKUpdateUtil.setVflex(vlayout, "1");
ZKUpdateUtil.setWidth(vlayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(vlayout);
@ -172,7 +175,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
if (! isRMAWindow) {
row.appendChild(orderLabel.rightAlign());
row.appendChild(orderField);
orderField.setHflex("1");
ZKUpdateUtil.setHflex(orderField, "1");
}
row = rows.newRow();
@ -181,7 +184,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
if (! isRMAWindow) {
row.appendChild(invoiceLabel.rightAlign());
row.appendChild(invoiceField);
invoiceField.setHflex("1");
ZKUpdateUtil.setHflex(invoiceField, "1");
}
row = rows.newRow();
@ -195,7 +198,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
// Add RMA document selection to panel
row.appendChild(rmaLabel.rightAlign());
row.appendChild(rmaField);
rmaField.setHflex("1");
ZKUpdateUtil.setHflex(rmaField, "1");
}
}

View File

@ -37,6 +37,7 @@ import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.CreateFromStatement;
import org.compiere.model.GridTab;
@ -191,8 +192,8 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("130px");
parameterLayout.setWidth("100%");
ZKUpdateUtil.setHeight(parameterLayout, "130px");
ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@ -209,14 +210,14 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event
Column column = new Column();
columns.appendChild(column);
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column = new Column();
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
columns.appendChild(column);
Rows rows = (Rows) parameterBankLayout.newRows();

View File

@ -25,6 +25,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.CreateFrom;
import org.compiere.util.Trx;
@ -107,12 +108,12 @@ public class WCreateFromWindow extends Window implements EventListener<Event>, W
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
ZKUpdateUtil.setWidth(this, "750px");
ZKUpdateUtil.setHeight(this, "550px");
setSizable(true);
setBorder("normal");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
ZKUpdateUtil.setWidth(contentPane, "100%");
ZKUpdateUtil.setHeight(contentPane, "100%");
}
public void onEvent(Event e) throws Exception

View File

@ -33,6 +33,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.FactReconcile;
import org.compiere.model.MClient;
import org.compiere.model.MColumn;
@ -173,34 +174,34 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
Rows rows = null;
Row row = null;
parameterLayout.setWidth("90%");
ZKUpdateUtil.setWidth(parameterLayout, "90%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendCellChild(labelAcctSchema.rightAlign());
fieldAcctSchema.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldAcctSchema.getComponent(), "true");
row.appendCellChild(fieldAcctSchema.getComponent(), 2);
row.appendCellChild(labelOrg.rightAlign());
fieldOrg.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldOrg.getComponent(), "true");
row.appendCellChild(fieldOrg.getComponent(), 2);
row = rows.newRow();
row.appendCellChild(labelAccount.rightAlign());
fieldAccount.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldAccount.getComponent(), "true");
row.appendCellChild(fieldAccount.getComponent(), 2);
row.appendCellChild(labelReconciled);
row.appendCellChild(isReconciled, 2);
row = rows.newRow();
row.appendCellChild(labelBPartner.rightAlign());
fieldBPartner.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldBPartner.getComponent(), "true");
row.appendCellChild(fieldBPartner.getComponent(), 2);
row.appendCellChild(labelProduct.rightAlign());
fieldProduct.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldProduct.getComponent(), "true");
row.appendCellChild(fieldProduct.getComponent(), 2);
row = rows.newRow();
row.appendCellChild(labelDateAcct.rightAlign());
fieldDateAcct.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldDateAcct.getComponent(), "true");
row.appendCellChild(fieldDateAcct.getComponent(), 2);
row.appendCellChild(labelDateAcct2.rightAlign());
fieldDateAcct2.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fieldDateAcct2.getComponent(), "true");
row.appendCellChild(fieldDateAcct2.getComponent(), 2);
row = rows.newRow();
row.appendChild(bRefresh);
@ -209,8 +210,8 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(miniTable);
miniTable.setWidth("99%");
miniTable.setHeight("99%");
ZKUpdateUtil.setWidth(miniTable, "99%");
ZKUpdateUtil.setHeight(miniTable, "99%");
center.setStyle("border: none");
// Command Panel
@ -219,22 +220,22 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
mainLayout.appendChild(south);
south.appendChild(commandPanel);
commandPanel.appendChild(commandLayout);
commandLayout.setWidth("90%");
ZKUpdateUtil.setWidth(commandLayout, "90%");
rows = commandLayout.newRows();
row = rows.newRow();
row.appendCellChild(bZoom, 2);
bZoom.setHflex("true");
bZoom.setWidth("100%");
ZKUpdateUtil.setHflex(bZoom, "true");
ZKUpdateUtil.setWidth(bZoom, "100%");
row.appendCellChild(differenceLabel.rightAlign());
differenceLabel.setHflex("true");
ZKUpdateUtil.setHflex(differenceLabel, "true");
row.appendCellChild(differenceField, 2);
differenceField.setHflex("true");
ZKUpdateUtil.setHflex(differenceField, "true");
row.appendCellChild(bGenerate, 2);
bGenerate.setHflex("true");
ZKUpdateUtil.setHflex(bGenerate, "true");
row.appendCellChild(bReset, 2);
bReset.setHflex("true");
ZKUpdateUtil.setHflex(bReset, "true");
row.appendCellChild(bCancel);
bCancel.setHflex("true");
ZKUpdateUtil.setHflex(bCancel, "true");
}
/**

View File

@ -41,6 +41,7 @@ import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ReaderInputStream;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.impexp.ImpFormat;
import org.compiere.impexp.ImpFormatRow;
@ -134,14 +135,14 @@ public class WFileImport extends ADForm implements EventListener<Event>
jbInit();
dynInit();
this.setWidth("100%");
ZKUpdateUtil.setWidth(this, "100%");
this.setClosable(true);
this.setTitle("Import File Loader");
this.setBorder("normal");
Borderlayout layout = new Borderlayout();
layout.setHeight("100%");
layout.setWidth("100%");
ZKUpdateUtil.setHeight(layout, "100%");
ZKUpdateUtil.setWidth(layout, "100%");
this.appendChild(layout);
North north = new North();
layout.appendChild(north);
@ -149,8 +150,8 @@ public class WFileImport extends ADForm implements EventListener<Event>
Center center = new Center();
layout.appendChild(center);
center.appendChild(centerPanel);
centerPanel.setVflex("1");
centerPanel.setHflex("1");
ZKUpdateUtil.setVflex(centerPanel, "1");
ZKUpdateUtil.setHflex(centerPanel, "1");
South south = new South();
layout.appendChild(south);
south.appendChild(confirmPanel);
@ -211,22 +212,22 @@ public class WFileImport extends ADForm implements EventListener<Event>
hbox.appendChild(record);
hbox.appendChild(bNext);
rawData.setHflex("1");
ZKUpdateUtil.setHflex(rawData, "1");
rawData.setRows(MAX_SHOWN_LINES);
rawData.setHeight("100%");
ZKUpdateUtil.setHeight(rawData, "100%");
northPanel.setHflex("1");
northPanel.setVflex("0");
ZKUpdateUtil.setHflex(northPanel, "1");
ZKUpdateUtil.setVflex(northPanel, "0");
northPanel.appendChild(hbox);
northPanel.appendChild(rawData);
northPanel.appendChild(new Separator());
previewPanel.setHflex("1");
previewPanel.setVflex("1");
ZKUpdateUtil.setHflex(previewPanel, "1");
ZKUpdateUtil.setVflex(previewPanel, "1");
previewPanel.setStyle("overflow: auto");
centerPanel.setHflex("1");
centerPanel.setVflex("1");
ZKUpdateUtil.setHflex(centerPanel, "1");
ZKUpdateUtil.setVflex(centerPanel, "1");
centerPanel.appendChild(previewPanel);
confirmPanel.addActionListener(Events.ON_CLICK, this);
@ -491,14 +492,14 @@ public class WFileImport extends ADForm implements EventListener<Event>
Hbox hbox = new Hbox();
hbox.setAlign("center");
hbox.setWidth("100%");
ZKUpdateUtil.setWidth(hbox, "100%");
hbox.setStyle("padding-bottom: 3px");
Cell cell = new Cell();
cell.setWidth("30%");
ZKUpdateUtil.setWidth(cell, "30%");
cell.appendChild(m_labels[i].rightAlign());
hbox.appendChild(cell);
cell = new Cell();
cell.setWidth("70%");
ZKUpdateUtil.setWidth(cell, "70%");
int length = row.getEndNo() - row.getStartNo();
@ -509,7 +510,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
m_fields[i] = new Textbox();
m_fields[i].setStyle("margin-left: 2px");
m_fields[i].setWidth("300px");
ZKUpdateUtil.setWidth(m_fields[i], "300px");
cell.appendChild(m_fields[i]);
hbox.appendChild(cell);

View File

@ -43,6 +43,7 @@ import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.apps.form.GenForm;
@ -121,20 +122,20 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
dynInit();
Borderlayout contentPane = new Borderlayout();
this.appendChild(contentPane);
contentPane.setWidth("99%");
contentPane.setHeight("100%");
ZKUpdateUtil.setWidth(contentPane, "99%");
ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
center.appendChild(tabbedPane);
tabbedPane.setVflex("1");
tabbedPane.setHflex("1");
ZKUpdateUtil.setVflex(tabbedPane, "1");
ZKUpdateUtil.setHflex(tabbedPane, "1");
South south = new South();
south.setStyle("border: none");
contentPane.appendChild(south);
south.appendChild(statusBar);
LayoutUtils.addSclass("status-border", statusBar);
south.setHeight("22px");
ZKUpdateUtil.setHeight(south, "22px");
}
catch(Exception ex)
{
@ -156,8 +157,8 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
void zkInit() throws Exception
{
//
selPanel.setWidth("99%");
selPanel.setHeight("90%");
ZKUpdateUtil.setWidth(selPanel, "99%");
ZKUpdateUtil.setHeight(selPanel, "90%");
selPanel.setStyle("border: none; position: absolute");
DesktopTabpanel tabpanel = new DesktopTabpanel();
tabpanel.appendChild(selPanel);
@ -180,9 +181,9 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
Center center = new Center();
selPanel.appendChild(center);
center.appendChild(miniTable);
miniTable.setVflex("1");
miniTable.setHflex("1");
miniTable.setHeight("99%");
ZKUpdateUtil.setVflex(miniTable, "1");
ZKUpdateUtil.setHflex(miniTable, "1");
ZKUpdateUtil.setHeight(miniTable, "99%");
confirmPanelSel.addActionListener(this);
//
tabpanel = new DesktopTabpanel();
@ -191,8 +192,8 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
tab = new Tab(Msg.getMsg(Env.getCtx(), "Generate"));
tabs.appendChild(tab);
tab.setDisabled(true);
genPanel.setWidth("99%");
genPanel.setHeight("90%");
ZKUpdateUtil.setWidth(genPanel, "99%");
ZKUpdateUtil.setHeight(genPanel, "90%");
genPanel.setStyle("border: none; position: absolute");
center = new Center();
genPanel.appendChild(center);

View File

@ -26,6 +26,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.InOutGen;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@ -100,22 +101,22 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
Row row = form.getParameterPanel().newRows().newRow();
row.appendCellChild(lWarehouse.rightAlign());
fWarehouse.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fWarehouse.getComponent(), "true");
row.appendCellChild(fWarehouse.getComponent());
row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
fBPartner.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
row.appendCellChild(fBPartner.getComponent());
row.appendCellChild(new Space());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
cmbDocType.setHflex("true");
ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
docAction.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
row.appendCellChild(new Space());
} // jbInit

View File

@ -26,6 +26,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.InvoiceGen;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@ -101,22 +102,22 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
Row row = form.getParameterPanel().newRows().newRow();
row.appendCellChild(lOrg.rightAlign());
fOrg.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fOrg.getComponent(), "true");
row.appendCellChild(fOrg.getComponent());
row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
fBPartner.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
row.appendCellChild(fBPartner.getComponent());
row.appendCellChild(new Space());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
cmbDocType.setHflex("true");
ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
docAction.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
row.appendCellChild(new Space());
} // jbInit

View File

@ -44,6 +44,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.Match;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
@ -200,8 +201,8 @@ public class WMatch extends Match
form.appendChild(mainPanel);
mainPanel.setStyle("width: 99%; height: 100%; padding: 0; margin: 0");
mainPanel.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
northPanel.appendChild(northLayout);
matchFromLabel.setText(Msg.translate(Env.getCtx(), "MatchFrom"));
matchToLabel.setText(Msg.translate(Env.getCtx(), "MatchTo"));
@ -273,43 +274,43 @@ public class WMatch extends Match
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(centerPanel);
centerPanel.setHflex("1");
centerPanel.setVflex("1");
centerLayout.setWidth("100%");
centerLayout.setHeight("100%");
ZKUpdateUtil.setHflex(centerPanel, "1");
ZKUpdateUtil.setVflex(centerPanel, "1");
ZKUpdateUtil.setWidth(centerLayout, "100%");
ZKUpdateUtil.setHeight(centerLayout, "100%");
north = new North();
centerLayout.appendChild(north);
north.setStyle("border: none");
Panel p = new Panel();
p.appendChild(xMatchedBorder);
p.appendChild(xMatchedTable);
xMatchedTable.setWidth("99%");
xMatchedTable.setHeight("85%");
ZKUpdateUtil.setWidth(xMatchedTable, "99%");
ZKUpdateUtil.setHeight(xMatchedTable, "85%");
p.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
north.appendChild(p);
north.setHeight("44%");
ZKUpdateUtil.setHeight(north, "44%");
south = new South();
centerLayout.appendChild(south);
south.setStyle("border: none");
xMatchedToTable.setWidth("99%");
xMatchedToTable.setHeight("99%");
ZKUpdateUtil.setWidth(xMatchedToTable, "99%");
ZKUpdateUtil.setHeight(xMatchedToTable, "99%");
south.appendChild(xMatchedToTable);
south.setHeight("44%");
ZKUpdateUtil.setHeight(south, "44%");
center = new Center();
centerLayout.appendChild(center);
center.setStyle("border: none");
// center.setHeight("6%");
// ZKUpdateUtil.setHeight(center, "6%");
center.appendChild(xPanel);
xPanel.setVflex("1");
xPanel.setHflex("1");
ZKUpdateUtil.setVflex(xPanel, "1");
ZKUpdateUtil.setHflex(xPanel, "1");
xPanel.appendChild(sameBPartner);
xPanel.appendChild(new Space());
xPanel.appendChild(sameProduct);
xPanel.appendChild(new Space());
xPanel.appendChild(sameQty);
xPanel.setHeight("50px");
ZKUpdateUtil.setHeight(xPanel, "50px");
xPanel.appendChild(new Separator());
xPanel.appendChild(xMatchedToBorder);
} // jbInit

View File

@ -32,6 +32,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Merge;
import org.compiere.model.Lookup;
@ -150,8 +151,8 @@ public class WMerge extends Merge implements IFormController, EventListener<Even
void zkInit () throws Exception
{
form.appendChild (mainLayout);
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
//
South south = new South();
mainLayout.appendChild(south);

View File

@ -45,6 +45,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.apps.form.PayPrint;
@ -96,8 +97,8 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
dynInit();
zkInit();
Borderlayout contentLayout = new Borderlayout();
contentLayout.setWidth("100%");
contentLayout.setHeight("100%");
ZKUpdateUtil.setWidth(contentLayout, "100%");
ZKUpdateUtil.setHeight(contentLayout, "100%");
form.appendChild(contentLayout);
Center center = new Center();
contentLayout.appendChild(center);
@ -500,7 +501,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
AEnv.mergePdf(pdfList, outFile);
chequeViewer = new SimplePDFViewer(form.getFormName(), new FileInputStream(outFile));
chequeViewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
chequeViewer.setWidth("100%");
ZKUpdateUtil.setWidth(chequeViewer, "100%");
}
catch (Exception e)
{
@ -564,7 +565,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
String name = Msg.translate(Env.getCtx(), "Remittance");
remitViewer = new SimplePDFViewer(form.getFormName() + " - " + name, new FileInputStream(outFile));
remitViewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
remitViewer.setWidth("100%");
ZKUpdateUtil.setWidth(remitViewer, "100%");
}
catch (Exception e)
{

View File

@ -52,6 +52,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.PaySelect;
import org.compiere.model.MPaySelection;
@ -153,8 +154,8 @@ public class WPaySelect extends PaySelect
form.appendChild(mainPanel);
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("99%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
ZKUpdateUtil.setWidth(mainLayout, "99%");
parameterPanel.appendChild(parameterLayout);
//
labelBankAccount.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));

View File

@ -30,6 +30,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.editor.WDateEditor;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.PaymentFormCash;
import org.compiere.model.GridTab;
@ -84,13 +85,13 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener<E
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
bAmountField.getComponent().setWidth("150px");
ZKUpdateUtil.setWidth(bAmountField.getComponent(), "150px");
Rows rows = bPanelLayout.newRows();
Row row = rows.newRow();

View File

@ -32,6 +32,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.PaymentFormCheck;
import org.compiere.model.GridTab;
@ -89,8 +90,8 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
sCheckLabel.setText(Msg.translate(Env.getCtx(), "CheckNo"));
sCheckField.setCols(8);
sCurrencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID"));
sNumberField.setWidth("100pt");
sRoutingField.setWidth("70pt");
ZKUpdateUtil.setWidth(sNumberField, "100pt");
ZKUpdateUtil.setWidth(sRoutingField, "70pt");
sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
LayoutUtils.addSclass("txt-btn", sOnline);
sOnline.addActionListener(this);
@ -101,13 +102,13 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
sAmountField.getComponent().setWidth("150px");
ZKUpdateUtil.setWidth(sAmountField.getComponent(), "150px");
Rows rows = sPanelLayout.newRows();
Row row = rows.newRow();

View File

@ -30,7 +30,9 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.apache.ecs.xhtml.col;
import org.compiere.grid.PaymentFormCreditCard;
import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor;
@ -97,13 +99,13 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
kAmountField.getComponent().setWidth("150px");
ZKUpdateUtil.setWidth(kAmountField.getComponent(), "150px");
kAmountField.getComponent().setId("K_Ammount");
Rows rows = kLayout.newRows();

View File

@ -29,6 +29,7 @@ import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.PaymentFormDirect;
import org.compiere.model.GridTab;
@ -84,11 +85,11 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
Rows rows = tPanelLayout.newRows();
Row row = rows.newRow();

View File

@ -25,6 +25,7 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.PaymentFormOnCredit;
import org.compiere.model.GridTab;
import org.compiere.util.Env;
@ -60,11 +61,11 @@ public class WPaymentFormOnCredit extends PaymentFormOnCredit {
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
Rows rows = pPanelLayout.newRows();
Row row = rows.newRow();

View File

@ -19,6 +19,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.PaymentForm;
import org.compiere.util.Env;
@ -71,7 +72,7 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
this.setTitle(Msg.getMsg(Env.getCtx(), "Payment"));
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setWidth("500px");
ZKUpdateUtil.setWidth(this, "500px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
@ -82,12 +83,12 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
Center center = new Center();
center.setSclass("dialog-content");
mainLayout.appendChild(center);
mainLayout.setHflex("1");
mainLayout.setVflex("min");
ZKUpdateUtil.setHflex(mainLayout, "1");
ZKUpdateUtil.setVflex(mainLayout, "min");
center.appendChild(centerPanel = getPanel());
LayoutUtils.addSclass("payment-form-content", centerPanel);
centerPanel.setVflex("1");
centerPanel.setHflex("1");
ZKUpdateUtil.setVflex(centerPanel, "1");
ZKUpdateUtil.setHflex(centerPanel, "1");
center.setAutoscroll(true);
//
South south = new South();

View File

@ -46,6 +46,7 @@ import org.adempiere.webui.panel.WRC5SummaryFieldsPanel;
import org.adempiere.webui.panel.WRCTabPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.model.MRole;
@ -169,7 +170,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
form.setStyle("width: 90%; height: 90%; position: absolute; border:none; padding:none; margin:none;");
headerPanel.setHeight("40px");
ZKUpdateUtil.setHeight(headerPanel, "40px");
headerPanel.setWidth("100%");
headerPanel.appendChild(new Separator("vertical"));
@ -222,8 +223,8 @@ public class WReportCustomization implements IFormController,EventListener<Even
headerPanel.appendChild(new Separator("horizontal"));
tabbox.setWidth("100%");
tabbox.setHeight("84%");//IDEMPIERE-2476, Pritesh Shah
ZKUpdateUtil.setWidth(tabbox, "100%");
ZKUpdateUtil.setHeight(tabbox, "84%");//IDEMPIERE-2476, Pritesh Shah
tabfo2.addEventListener(Events.ON_CLICK, this);
tabsc3.addEventListener(Events.ON_CLICK, this);
@ -309,7 +310,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
foot.appendChild(confirmPanelMain);
confirmPanelMain.addActionListener(this);
confirmPanelMain.setVflex("0");
ZKUpdateUtil.setVflex(confirmPanelMain, "0");
f.appendChild(foot);
grid.appendChild(f);
@ -452,8 +453,8 @@ public class WReportCustomization implements IFormController,EventListener<Even
{
winExportFile = new Window();
winExportFile.setTitle(Msg.getMsg(Env.getCtx(), "Export"));
winExportFile.setWidth("450px");
winExportFile.setHeight("300px");
ZKUpdateUtil.setWidth(winExportFile, "450px");
ZKUpdateUtil.setHeight(winExportFile, "300px");
winExportFile.setClosable(true);
winExportFile.setBorder("normal");
winExportFile.setStyle("position:absolute");
@ -477,13 +478,13 @@ public class WReportCustomization implements IFormController,EventListener<Even
div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType")));
hb.appendChild(div);
hb.appendChild(cboType);
cboType.setWidth("100%");
hb.setVflex("1");
ZKUpdateUtil.setWidth(cboType, "100%");
ZKUpdateUtil.setVflex(hb, "1");
hb.setStyle("margin-top: 10px");
Vbox vb = new Vbox();
vb.setVflex("1");
vb.setWidth("100%");
ZKUpdateUtil.setVflex(vb, "1");
ZKUpdateUtil.setWidth(vb, "100%");
winExportFile.appendChild(vb);
vb.appendChild(hb);
vb.appendChild(confirmPanel);
@ -497,7 +498,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
}
};
confirmPanel.addActionListener(exportListener);
confirmPanel.setVflex("0");
ZKUpdateUtil.setVflex(confirmPanel, "0");
}
winExportFile.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
AEnv.showWindow(winExportFile);

View File

@ -33,6 +33,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@ -93,13 +94,13 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
Borderlayout contentPane = new Borderlayout();
form.appendChild(contentPane);
contentPane.setWidth("99%");
contentPane.setHeight("100%");
ZKUpdateUtil.setWidth(contentPane, "99%");
ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
gridPanel.setHflex("true");
gridPanel.setVflex("true");
ZKUpdateUtil.setHflex(gridPanel, "true");
ZKUpdateUtil.setVflex(gridPanel, "true");
center.appendChild(gridPanel);
South south = new South();
south.setStyle("border: none");
@ -127,25 +128,25 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
// AD_User.AD_User_ID
MLookup userLkp = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 212, DisplayType.Search);
fUser = new WSearchEditor("AD_User_ID", false, false, true, userLkp);
fUser.getComponent().setWidth("220px");
ZKUpdateUtil.setWidth(fUser.getComponent(), "220px");
txtOldPassword = new Textbox();
txtOldPassword.setId("txtOldPassword");
txtOldPassword.setType("password");
txtOldPassword.setCols(25);
txtOldPassword.setWidth("220px");
ZKUpdateUtil.setWidth(txtOldPassword, "220px");
txtNewPassword = new Textbox();
txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password");
txtNewPassword.setCols(25);
txtNewPassword.setWidth("220px");
ZKUpdateUtil.setWidth(txtNewPassword, "220px");
txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setCols(25);
txtRetypeNewPassword.setWidth("220px");
ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px");
cbForceChangeNextLogin = new Checkbox();
cbForceChangeNextLogin.setLabel(Msg.getMsg(Env.getCtx(), "ForceChangeOnNextLogin"));
@ -154,24 +155,24 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
txtNewEMail = new Textbox();
txtNewEMail.setId("txtNewEMail");
txtNewEMail.setCols(25);
txtNewEMail.setWidth("220px");
ZKUpdateUtil.setWidth(txtNewEMail, "220px");
txtNewEMailUser = new Textbox();
txtNewEMailUser.setId("txtNewEMailUser");
txtNewEMailUser.setCols(25);
txtNewEMailUser.setWidth("220px");
ZKUpdateUtil.setWidth(txtNewEMailUser, "220px");
txtNewEMailUserPW = new Textbox();
txtNewEMailUserPW.setId("txtNewEMailUserPW");
txtNewEMailUserPW.setType("password");
txtNewEMailUserPW.setCols(25);
txtNewEMailUserPW.setWidth("220px");
ZKUpdateUtil.setWidth(txtNewEMailUserPW, "220px");
txtRetypeNewEMailPW = new Textbox();
txtRetypeNewEMailPW.setId("txtRetypeNewEMail");
txtRetypeNewEMailPW.setType("password");
txtRetypeNewEMailPW.setCols(25);
txtRetypeNewEMailPW.setWidth("220px");
ZKUpdateUtil.setWidth(txtRetypeNewEMailPW, "220px");
confirmPanel = new ConfirmPanel(true);
}
@ -185,11 +186,11 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
Column column = new Column();
columns.appendChild(column);
column.setWidth("40%");
ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
column.setWidth("60%");
ZKUpdateUtil.setWidth(column, "60%");
Rows rows = new Rows();
gridPanel.appendChild(rows);

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -99,14 +100,14 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
final int noStatementRows = 3;
final int noResultRows = 20;
m_grdMain.setWidth("80%");
ZKUpdateUtil.setWidth(m_grdMain, "80%");
// create the top row of components
m_txbSqlField.setMultiline(true);
m_txbSqlField.setMaxlength(maxStatementLength);
m_txbSqlField.setRows(noStatementRows);
m_txbSqlField.setHeight("100%");
m_txbSqlField.setHflex("1");
ZKUpdateUtil.setHeight(m_txbSqlField, "100%");
ZKUpdateUtil.setHflex(m_txbSqlField, "1");
m_txbSqlField.setCols(noColumns);
m_txbSqlField.setReadonly(false);
@ -121,8 +122,8 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
// create the bottom row of components
m_txbResultField.setCols(noColumns);
m_txbResultField.setRows(noResultRows);
m_txbResultField.setHeight("100%");
m_txbResultField.setHflex("1");
ZKUpdateUtil.setHeight(m_txbResultField, "100%");
ZKUpdateUtil.setHflex(m_txbResultField, "1");
m_txbResultField.setReadonly(true);
rwBottom.appendCellChild(m_txbResultField, 3);
@ -135,13 +136,13 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
Borderlayout contentPane = new Borderlayout();
this.appendChild(contentPane);
contentPane.setWidth("99%");
contentPane.setHeight("100%");
ZKUpdateUtil.setWidth(contentPane, "99%");
ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
m_grdMain.setHflex("true");
m_grdMain.setVflex("true");
ZKUpdateUtil.setHflex(m_grdMain, "true");
ZKUpdateUtil.setVflex(m_grdMain, "true");
center.appendChild(m_grdMain);
return;

View File

@ -40,6 +40,7 @@ import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.SetupWizard;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@ -349,12 +350,12 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
*/
private void jbInit () throws Exception
{
form.setWidth("99%");
form.setHeight("100%");
ZKUpdateUtil.setWidth(form, "99%");
ZKUpdateUtil.setHeight(form, "100%");
form.setStyle("position: absolute; padding: 0; margin: 0");
form.appendChild (mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
mainLayout.setStyle("position: absolute");
bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh16.png"));
@ -388,13 +389,13 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
north.setHeight("38px");
ZKUpdateUtil.setHeight(north, "38px");
//
northPanel.appendChild(progressbar);
progressbar.setWidth("100%");
ZKUpdateUtil.setWidth(progressbar, "100%");
progressbar.setZclass("progressmeter-setupwizard");
northPanel.appendChild(progressLabel);
progressLabel.setWidth("100%");
ZKUpdateUtil.setWidth(progressLabel, "100%");
progressLabel.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center; border:0; text-align: center; ");
refreshProgress();
@ -405,14 +406,14 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
statusField = new WTableDirEditor("WizardStatus", true, false, true,wizardL);
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
centerBox.setVflex("1");
centerBox.setHflex("1");
ZKUpdateUtil.setVflex(centerBox, "1");
ZKUpdateUtil.setHflex(centerBox, "1");
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(centerBox);
centerBox.appendChild(wfnodeTree);
centerBox.setWidth("100%");
wfnodeTree.setVflex("1");
ZKUpdateUtil.setWidth(centerBox, "100%");
ZKUpdateUtil.setVflex(wfnodeTree, "1");
centerBox.appendChild(centerBoxdown);
centerBoxdown.setOrient("horizontal");
centerBoxdown.setAlign("center");
@ -423,8 +424,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
center.setAutoscroll(true);
Div div = new Div();
div.setHeight("88%");
div.setHflex("1");
ZKUpdateUtil.setHeight(div, "88%");
ZKUpdateUtil.setHflex(div, "1");
div.setStyle("text-align:center ");
pretitleLabel.setStyle("font-weight: bold; font-size: 14px");
@ -433,8 +434,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
titleLabel.setLeft("50%");
div.appendChild(helpFrame);
helpFrame.setWidth("99%");
helpFrame.setHeight("80%");
ZKUpdateUtil.setWidth(helpFrame, "99%");
ZKUpdateUtil.setHeight(helpFrame, "80%");
helpFrame.setStyle("border: 1px solid lightgray; margin:auto");
Div divNote = new Div();
@ -445,8 +446,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
divNote.appendChild(notesField);
notesField.setRows(4);
notesField.setHeight("100%");
notesField.setWidth("99%");
ZKUpdateUtil.setHeight(notesField, "100%");
ZKUpdateUtil.setWidth(notesField, "99%");
MLookup lookup = MLookupFactory.get(Env.getCtx(), form.getWindowNo(),
0, 200913, DisplayType.Search);
@ -478,7 +479,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
east.appendChild(div);
east.setCollapsible(true);
east.setSplittable(true);
east.setWidth("70%");
ZKUpdateUtil.setWidth(east, "70%");
east.setAutoscroll(true);
setNotesPanelVisible(false);

View File

@ -38,6 +38,7 @@ import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.StatementCreateFromBatch;
import org.compiere.model.MBankStatement;
@ -191,8 +192,8 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("130px");
parameterLayout.setWidth("100%");
ZKUpdateUtil.setHeight(parameterLayout, "130px");
ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = form.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@ -209,14 +210,14 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
Column column = new Column();
columns.appendChild(column);
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
column = new Column();
column.setWidth("15%");
ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column = new Column();
column.setWidth("35%");
ZKUpdateUtil.setWidth(column, "35%");
columns.appendChild(column);
Rows rows = (Rows) parameterBankLayout.newRows();

View File

@ -50,6 +50,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.WTabEditorForm;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.TabEditor;
import org.compiere.model.GridField;
import org.compiere.model.MField;
@ -151,13 +152,13 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
private void dynList()
{
visible.addEventListener(Events.ON_SELECT, this);
visible.setVflex("70");
ZKUpdateUtil.setVflex(visible, "70");
visible.setItemDraggable(true);
visible.setDroppable("true");
visible.addOnDropListener(this);
invisible.addEventListener(Events.ON_SELECT, this);
invisible.setVflex("30");
ZKUpdateUtil.setVflex(invisible, "30");
invisible.setItemDraggable(true);
invisible.setDroppable("true");
invisible.addOnDropListener(this);
@ -178,8 +179,8 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
form = new Grid();
form.makeNoStrip();
form.setHflex("1");
form.setHeight(null);
ZKUpdateUtil.setHflex(form, "1");
ZKUpdateUtil.setHeight(form, null);
form.setVflex(false);
int numCols = getNumColumns();
@ -194,7 +195,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
for (int h=0;h<numCols;h++){
Column col = new Column();
col.setWidth(equalWidth + "%");
ZKUpdateUtil.setWidth(col, equalWidth + "%");
columns.appendChild(col);
}
@ -400,12 +401,12 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
//
Column column = new Column();
columns.appendChild(column);
column.setHflex("min");
ZKUpdateUtil.setHflex(column, "min");
column.setAlign("right");
column = new Column();
columns.appendChild(column);
column.setHflex("1");
ZKUpdateUtil.setHflex(column, "1");
Rows rows = new Rows();
gridView.appendChild(rows);
@ -422,7 +423,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
row = new Row();
Label labelName = new Label(Msg.getElement(Env.getCtx(), MField.COLUMNNAME_Name));
editorName = new WStringEditor(MField.COLUMNNAME_Name, false, true, false, 0, 0, null, null);
((WStringEditor) editorName).getComponent().setHflex("1");
ZKUpdateUtil.setHflex(((WStringEditor) editorName).getComponent(), "1");
row.appendChild(labelName.rightAlign());
row.appendChild(editorName.getComponent());
// editorName.addValueChangeListener(this);
@ -451,7 +452,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
Label labelAD_FieldGroup_ID = new Label(Msg.getElement(Env.getCtx(), MField.COLUMNNAME_AD_FieldGroup_ID));
MLookup lookup = MLookupFactory.get (Env.getCtx(), tabform.getWindowNo(), 0, COLUMN_AD_FIELD_AD_FIELDGROUP_ID, DisplayType.TableDir);
editorAD_FieldGroup_ID = new WTableDirEditor(MField.COLUMNNAME_AD_FieldGroup_ID, false, false, true, lookup);
((WTableDirEditor) editorAD_FieldGroup_ID).getComponent().setHflex("1");
ZKUpdateUtil.setHflex(((WTableDirEditor) editorAD_FieldGroup_ID).getComponent(), "1");
row.appendChild(labelAD_FieldGroup_ID.rightAlign());
row.appendChild(editorAD_FieldGroup_ID.getComponent());
editorAD_FieldGroup_ID.addValueChangeListener(this);
@ -509,8 +510,8 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
tabform.setSizable(true);
tabform.setClosable(true);
tabform.setMaximizable(true);
tabform.setWidth("95%");
tabform.setHeight("95%");
ZKUpdateUtil.setWidth(tabform, "95%");
ZKUpdateUtil.setHeight(tabform, "95%");
tabform.appendChild (mainLayout);
LayoutUtils.addSclass("tab-editor-form-content", mainLayout);
tabform.setBorder("normal");
@ -523,7 +524,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
LayoutUtils.addSclass("tab-editor-form-east-panel", east);
mainLayout.appendChild(east);
east.appendChild(propGrid);
east.setWidth("320px");
ZKUpdateUtil.setWidth(east, "320px");
ListHead visibleHead = new ListHead();
visibleHead.setParent(visible);
@ -540,14 +541,14 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
invisibleHeader.setParent(invisibleHead);
westVLayout = new Vlayout();
westVLayout.setHeight("100%");
ZKUpdateUtil.setHeight(westVLayout, "100%");
westVLayout.appendChild(visible);
westVLayout.appendChild(invisible);
createUI();
centerVLayout = new Vlayout();
centerVLayout.setHeight("100%");
ZKUpdateUtil.setHeight(centerVLayout, "100%");
centerVLayout.appendChild(form);
centerVLayout.setStyle("overflow:auto");
@ -562,7 +563,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
west.appendChild(westVLayout);
west.setCollapsible(true);
west.setSplittable(true);
west.setWidth("200px");
ZKUpdateUtil.setWidth(west, "200px");
} // jbInit
/**

View File

@ -42,6 +42,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.TreeBOM;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@ -164,12 +165,12 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
private void jbInit()
{
m_frame.setWidth("99%");
m_frame.setHeight("100%");
ZKUpdateUtil.setWidth(m_frame, "99%");
ZKUpdateUtil.setHeight(m_frame, "100%");
m_frame.setStyle("position: absolute; padding: 0; margin: 0");
m_frame.appendChild (mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
mainLayout.setStyle("position: absolute");
northPanel.appendChild(northLayout);
southPanel.appendChild(southLayout);
@ -180,8 +181,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
North north = new North();
north.appendChild(northPanel);
north.setHeight("6%");
northPanel.setWidth("100%");
ZKUpdateUtil.setHeight(north, "6%");
ZKUpdateUtil.setWidth(northPanel, "100%");
mainLayout.appendChild(north);
Rows rows = northLayout.newRows();
@ -200,8 +201,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
South south = new South();
south.appendChild(southPanel);
south.setHeight("10%");
southPanel.setWidth("100%");
ZKUpdateUtil.setHeight(south, "10%");
ZKUpdateUtil.setWidth(southPanel, "100%");
mainLayout.appendChild(south);
Rows rows2 = southLayout.newRows();
@ -220,7 +221,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
west.appendChild(treePane);
treePane.appendChild(m_tree);
m_tree.setStyle("border: none;");
west.setWidth("33%");
ZKUpdateUtil.setWidth(west, "33%");
west.setAutoscroll(true);
m_tree.addEventListener(Events.ON_SELECT, this);
@ -228,8 +229,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
mainLayout.appendChild(center);
center.appendChild(dataPane);
dataPane.appendChild(tableBOM);
dataPane.setHflex("1");
dataPane.setVflex("1");
ZKUpdateUtil.setHflex(dataPane, "1");
ZKUpdateUtil.setVflex(dataPane, "1");
center.setAutoscroll(true);
}

View File

@ -34,6 +34,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.TreeMaintenance;
import org.compiere.model.MTree;
@ -130,12 +131,12 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
bDelete.setImage(ThemeManager.getThemeResource("images/StepForward24.png"));
bDeleteAll.setImage(ThemeManager.getThemeResource("images/FastForward24.png"));
form.setWidth("99%");
form.setHeight("100%");
ZKUpdateUtil.setWidth(form,"99%");
ZKUpdateUtil.setHeight(form, "100%");
form.setStyle("position: absolute; padding: 0; margin: 0");
form.appendChild (mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
mainLayout.setStyle("position: absolute");
treeLabel.setText (Msg.translate(Env.getCtx(), "AD_Tree_ID"));
@ -154,15 +155,15 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
north.setHflex("1");
north.setVflex("1");
northPanel.setWidth("100%");
ZKUpdateUtil.setHflex(north, "1");
ZKUpdateUtil.setVflex(north, "1");
ZKUpdateUtil.setWidth(northPanel, "100%");
//
Hbox hbox = new Hbox();
hbox.setStyle("padding: 3px;");
hbox.setAlign("center");
hbox.setHflex("1");
hbox.setVflex("1");
ZKUpdateUtil.setHflex(hbox, "1");
ZKUpdateUtil.setVflex(hbox, "1");
northPanel.appendChild(hbox);
hbox.appendChild (new Space());
@ -174,7 +175,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
Cell cell = new Cell();
cell.setColspan(1);
cell.setRowspan(1);
cell.setHflex("1");
ZKUpdateUtil.setHflex(cell, "1");
cell.appendChild(treeInfo);
hbox.appendChild (cell);
hbox.appendChild (new Space());
@ -189,15 +190,15 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
searchBox.getTextbox().addEventListener(Events.ON_OK, this);
searchBox.getButton().setImage(ThemeManager.getThemeResource("images/Find16.png"));
searchBox.setToolTipText(Msg.getCleanMsg(Env.getCtx(), "TreeSearch"));
searchBox.setWidth("200px");
ZKUpdateUtil.setWidth(searchBox, "200px");
div.appendChild(searchBox);
hbox.appendChild(div);
//
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(centerTree);
centerTree.setVflex("1");
centerTree.setHflex("1");
ZKUpdateUtil.setVflex(centerTree, "1");
ZKUpdateUtil.setHflex(centerTree, "1");
center.setAutoscroll(true);
East east = new East();
@ -205,8 +206,8 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
east.appendChild(centerList);
east.setCollapsible(false);
east.setSplittable(true);
east.setWidth("45%");
centerList.setVflex(true);
ZKUpdateUtil.setWidth(east, "45%");
ZKUpdateUtil.setVflex(centerList, true);
centerList.setSizedByContent(false);
centerList.addEventListener(Events.ON_SELECT, this);
} // jbInit

View File

@ -41,6 +41,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.TrxMaterial;
import org.compiere.model.MLocatorLookup;
import org.compiere.model.MLookup;
@ -126,8 +127,8 @@ public class WTrxMaterial extends TrxMaterial
form.appendChild(mainPanel);
mainPanel.setStyle("width: 99%; height: 100%; border: none; padding: 0; margin: 0");
mainPanel.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
parameterPanel.appendChild(parameterLayout);
//
orgLabel.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
@ -144,20 +145,20 @@ public class WTrxMaterial extends TrxMaterial
Rows rows = parameterLayout.newRows();
Row row = rows.newRow();
row.appendCellChild(orgLabel.rightAlign());
orgField.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(orgField.getComponent(), "true");
row.appendCellChild(orgField.getComponent());
row.appendCellChild(mtypeLabel.rightAlign());
mtypeField.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(mtypeField.getComponent(), "true");
row.appendCellChild(mtypeField.getComponent());
row.appendCellChild(dateFLabel.rightAlign());
row.appendCellChild(dateFField.getComponent());
row = rows.newRow();
row.appendCellChild(locatorLabel.rightAlign());
locatorField.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(locatorField.getComponent(), "true");
row.appendCellChild(locatorField.getComponent());
row.appendCellChild(productLabel.rightAlign());
productField.getComponent().setHflex("true");
ZKUpdateUtil.setHflex(productField.getComponent(), "true");
row.appendCellChild(productField.getComponent());
row.appendCellChild(dateTLabel.rightAlign());
row.appendCellChild(dateTField.getComponent());
@ -219,8 +220,8 @@ public class WTrxMaterial extends TrxMaterial
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(m_gridController);
m_gridController.setVflex("1");
m_gridController.setHflex("1");
ZKUpdateUtil.setVflex(m_gridController, "1");
ZKUpdateUtil.setHflex(m_gridController, "1");
} // dynInit

View File

@ -22,6 +22,7 @@ import org.adempiere.base.Service;
import org.adempiere.webui.apps.graph.model.IndicatorModel;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MGoal;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -171,14 +172,14 @@ public class WPerformanceIndicator extends Panel implements EventListener<Event>
height = width > 300 ? width * 40 / 100 : width * 85 / 100;
if (height == 0)
return; // no space to render
this.setHeight(height+"px");
ZKUpdateUtil.setHeight(this, height+"px");
} else {
int ratio = (height * 100) / width;
if (ratio > 85 || ratio < 50) {
height = width > 300 ? width * 40 / 100 : width * 85 / 100;
if (height == 0)
return; // no space to render
this.setHeight(height+"px");
ZKUpdateUtil.setHeight(this, height+"px");
}
}
this.getChildren().clear();

View File

@ -30,6 +30,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.wf.WFGraphLayout;
import org.compiere.apps.wf.WFNodeWidget;
import org.compiere.model.MRole;
@ -85,7 +86,7 @@ public class WFEditor extends ADForm {
@Override
protected void initForm() {
this.setHeight("100%");
ZKUpdateUtil.setHeight(this, "100%");
Borderlayout layout = new Borderlayout();
layout.setStyle("width: 100%; height: 100%; position: absolute;");
appendChild(layout);
@ -131,7 +132,7 @@ public class WFEditor extends ADForm {
toolbar.appendChild(refreshButton);
refreshButton.addEventListener(Events.ON_CLICK, this);
refreshButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
north.setHeight("30px");
ZKUpdateUtil.setHeight(north, "30px");
createTable();
center = new Center();
@ -144,7 +145,7 @@ public class WFEditor extends ADForm {
South south = new South();
layout.appendChild(south);
south.appendChild(confirmPanel);
south.setHeight("36px");
ZKUpdateUtil.setHeight(south, "36px");
}
private void createTable() {
@ -231,7 +232,7 @@ public class WFEditor extends ADForm {
}
});
w.setWidth("250px");
ZKUpdateUtil.setWidth(w, "250px");
w.setBorder("normal");
w.setPage(this.getPage());
w.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@ -347,8 +348,8 @@ public class WFEditor extends ADForm {
else
{
Div div = new Div();
div.setWidth((WFGraphLayout.COLUMN_WIDTH) + "px");
div.setHeight((WFGraphLayout.ROW_HEIGHT) + "px");
ZKUpdateUtil.setWidth(div, (WFGraphLayout.COLUMN_WIDTH) + "px");
ZKUpdateUtil.setHeight(div, (WFGraphLayout.ROW_HEIGHT) + "px");
div.setAttribute("Node.XPosition", c+1);
div.setAttribute("Node.YPosition", i+1);
div.setDroppable("WFNode");

View File

@ -22,6 +22,7 @@ import java.util.logging.Level;
import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.wf.WFGraphLayout;
import org.compiere.apps.wf.WFNodeWidget;
import org.compiere.model.X_AD_CtxHelp;
@ -119,12 +120,12 @@ public class WFPanel extends Borderlayout implements EventListener<Event>, IHelp
div.setStyle("width:100%; height: 100%");
div.appendChild(infoTextPane);
south.appendChild(div);
south.setHeight("25%");
ZKUpdateUtil.setHeight(south, "25%");
south.setSplittable(true);
south.setCollapsible(true);
south.setAutoscroll(true);
div.setVflex("1");
div.setHflex("1");
ZKUpdateUtil.setVflex(div, "1");
ZKUpdateUtil.setHflex(div, "1");
} // jbInit
private void createTable() {

View File

@ -5,6 +5,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MQuery;
import org.compiere.model.MTable;
import org.compiere.util.CLogger;
@ -159,7 +160,7 @@ public class WFPopupItem extends Menuitem {
}
});
w.setWidth("250px");
ZKUpdateUtil.setWidth(w, "250px");
w.setBorder("normal");
w.setPage(this.getPage());
w.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {

View File

@ -39,6 +39,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@ -146,8 +147,8 @@ public class WWFActivity extends ADForm implements EventListener<Event>
private void init()
{
Grid grid = new Grid();
grid.setWidth("100%");
grid.setHeight("100%");
ZKUpdateUtil.setWidth(grid, "100%");
ZKUpdateUtil.setHeight(grid, "100%");
grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;");
grid.makeNoStrip();
grid.setOddRowSclass("even");
@ -162,8 +163,8 @@ public class WWFActivity extends ADForm implements EventListener<Event>
div.appendChild(lNode);
row.appendChild(div);
row.appendChild(fNode);
fNode.setWidth("100%");
fNode.setHflex("true");
ZKUpdateUtil.setWidth(fNode, "100%");
ZKUpdateUtil.setHflex(fNode, "true");
fNode.setReadonly(true);
row = new Row();
@ -175,8 +176,8 @@ public class WWFActivity extends ADForm implements EventListener<Event>
row.appendChild(div);
row.appendChild(fDescription);
fDescription.setMultiline(true);
fDescription.setWidth("100%");
fDescription.setHflex("true");
ZKUpdateUtil.setWidth(fDescription, "100%");
ZKUpdateUtil.setHflex(fDescription, "true");
fDescription.setReadonly(true);
row = new Row();
@ -188,9 +189,9 @@ public class WWFActivity extends ADForm implements EventListener<Event>
row.appendChild(fHelp);
fHelp.setMultiline(true);
fHelp.setRows(3);
fHelp.setWidth("100%");
fHelp.setHeight("100%");
fHelp.setHflex("true");
ZKUpdateUtil.setWidth(fHelp, "100%");
ZKUpdateUtil.setHeight(fHelp, "100%");
ZKUpdateUtil.setHflex(fHelp, "true");
fHelp.setReadonly(true);
row.appendChild(new Label());
@ -201,7 +202,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
div.appendChild(lHistory);
row.appendChild(div);
row.appendChild(fHistory);
fHistory.setHflex("true");
ZKUpdateUtil.setHflex(fHistory, "true");
row.appendChild(new Label());
row = new Row();
@ -212,7 +213,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
row.appendChild(div);
Hbox hbox = new Hbox();
hbox.appendChild(fAnswerText);
fAnswerText.setHflex("true");
ZKUpdateUtil.setHflex(fAnswerText, "true");
hbox.appendChild(fAnswerList);
hbox.appendChild(fAnswerButton);
fAnswerButton.addEventListener(Events.ON_CLICK, this);
@ -227,9 +228,9 @@ public class WWFActivity extends ADForm implements EventListener<Event>
div.appendChild(lTextMsg);
row.appendChild(div);
row.appendChild(fTextMsg);
fTextMsg.setHflex("true");
ZKUpdateUtil.setHflex(fTextMsg, "true");
fTextMsg.setMultiline(true);
fTextMsg.setWidth("100%");
ZKUpdateUtil.setWidth(fTextMsg, "100%");
row.appendChild(new Label());
row = new Row();
@ -246,16 +247,16 @@ public class WWFActivity extends ADForm implements EventListener<Event>
bOK.addEventListener(Events.ON_CLICK, this);
Borderlayout layout = new Borderlayout();
layout.setWidth("100%");
layout.setHeight("100%");
ZKUpdateUtil.setWidth(layout, "100%");
ZKUpdateUtil.setHeight(layout, "100%");
layout.setStyle("background-color: transparent; position: absolute;");
North north = new North();
north.appendChild(listbox);
north.setSplittable(true);
listbox.setVflex("1");
listbox.setHflex("1");
north.setHeight("50%");
ZKUpdateUtil.setVflex(listbox, "1");
ZKUpdateUtil.setHflex(listbox, "1");
ZKUpdateUtil.setHeight(north, "50%");
layout.appendChild(north);
north.setStyle("background-color: transparent");
listbox.addEventListener(Events.ON_SELECT, this);
@ -264,8 +265,8 @@ public class WWFActivity extends ADForm implements EventListener<Event>
center.appendChild(grid);
layout.appendChild(center);
center.setStyle("background-color: transparent");
grid.setVflex("1");
grid.setHflex("1");
ZKUpdateUtil.setVflex(grid, "1");
ZKUpdateUtil.setHflex(grid, "1");
South south = new South();
south.appendChild(statusBar);
@ -417,13 +418,13 @@ public class WWFActivity extends ADForm implements EventListener<Event>
WListItemRenderer renderer = new WListItemRenderer(Arrays.asList(columns));
ListHeader header = new ListHeader();
header.setWidth("60px");
ZKUpdateUtil.setWidth(header, "60px");
renderer.setListHeader(0, header);
header = new ListHeader();
header.setWidth(null);
ZKUpdateUtil.setWidth(header, null);
renderer.setListHeader(1, header);
header = new ListHeader();
header.setWidth(null);
ZKUpdateUtil.setWidth(header, null);
renderer.setListHeader(2, header);
renderer.addTableValueChangeListener(listbox);
model.setNoColumns(columns.length);

View File

@ -16,6 +16,7 @@ package org.adempiere.webui.component;
import java.util.ArrayList;
import java.util.List;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
@ -48,7 +49,7 @@ public class Accordion extends Borderlayout implements EventListener<Event> {
North north = new North();
appendChild(north);
northBox = new Vbox();
northBox.setWidth("100%");
ZKUpdateUtil.setWidth(northBox, "100%");
north.appendChild(northBox);
north.setSplittable(false);
north.setCollapsible(false);
@ -59,7 +60,7 @@ public class Accordion extends Borderlayout implements EventListener<Event> {
South south = new South();
appendChild(south);
southBox = new Vbox();
southBox.setWidth("100%");
ZKUpdateUtil.setWidth(southBox, "100%");
south.appendChild(southBox);
south.setSplittable(false);
south.setCollapsible(false);
@ -74,7 +75,7 @@ public class Accordion extends Borderlayout implements EventListener<Event> {
ToolBarButton button = new ToolBarButton();
button.setLabel(label);
button.addEventListener(Events.ON_CLICK, this);
button.setWidth("100%");
ZKUpdateUtil.setWidth(button, "100%");
Div div = new Div();
div.setClass("z-center-header");

View File

@ -18,6 +18,7 @@ import java.util.List;
import javax.activation.DataSource;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@ -50,7 +51,7 @@ public class AttachmentItem extends Hlayout implements EventListener<Event>{
this.list = list;
x.addEventListener(Events.ON_CLICK, this);
}
setHflex("0");
ZKUpdateUtil.setHflex(this, "0");
}
@Override

View File

@ -24,6 +24,7 @@ import java.util.Map;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@ -245,7 +246,7 @@ public final class ConfirmPanel extends Div
this.appendChild(pnlBtnCenter);
this.appendChild(pnlBtnRight);
this.setSclass("confirm-panel");
this.setVflex("min");
ZKUpdateUtil.setVflex(this, "min");
setId("confirmPanel");
}

View File

@ -16,6 +16,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Timebox;
@ -41,7 +42,7 @@ public class DatetimeBox extends Panel {
//timeBox.setButtonVisible(false);
appendChild(dateBox);
appendChild(timeBox);
this.setHflex("1");
ZKUpdateUtil.setHflex(this, "1");
initComponents();
}

View File

@ -16,6 +16,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@ -55,11 +56,11 @@ public class EditorBox extends Div {
private void initComponents() {
txt = new Textbox();
txt.setSclass("editor-input");
txt.setHflex("0");
ZKUpdateUtil.setHflex(txt, "0");
appendChild(txt);
btn = new Button();
btn.setTabindex(-1);
btn.setHflex("0");
ZKUpdateUtil.setHflex(btn, "0");
btn.setSclass("editor-button");
appendChild(btn);
@ -151,11 +152,11 @@ public class EditorBox extends Div {
public void setTableEditorMode(boolean flag) {
if (flag) {
setHflex("0");
ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", txt);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
setHflex("1");
ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", txt);
LayoutUtils.removeSclass("grid-editor-button", btn);
}

View File

@ -18,6 +18,7 @@ import java.util.Arrays;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MSysConfig;
import org.compiere.util.Ini;
@ -80,8 +81,8 @@ public class FolderBrowser extends Window implements EventListener<Event>
this.browseForFolder = browseForFolder;
setTitle(browseForFolder ? "Directory Browser" : "File Browser");
setWidth("500px");
setHeight("500px");
ZKUpdateUtil.setWidth(this, "500px");
ZKUpdateUtil.setHeight(this, "500px");
setBorder("normal");
Borderlayout contentLayout = new Borderlayout();
@ -94,15 +95,15 @@ public class FolderBrowser extends Window implements EventListener<Event>
Center center = new Center();
contentLayout.appendChild(center);
center.appendChild(listDir);
listDir.setVflex("1");
listDir.setHflex("1");
ZKUpdateUtil.setVflex(listDir, "1");
ZKUpdateUtil.setHflex(listDir, "1");
South south = new South();
south.setStyle("border: none");
contentLayout.appendChild(south);
south.appendChild(confirmPanel);
txtPath.setWidth("475px");
ZKUpdateUtil.setWidth(txtPath, "475px");
txtPath.setReadonly(true);
getFileListing(root.getPath());

View File

@ -12,6 +12,8 @@
*****************************************************************************/
package org.adempiere.webui.component;
import org.adempiere.webui.util.ZKUpdateUtil;
/**
*
* @author Low Heng Sin
@ -35,10 +37,10 @@ public class ListboxFactory {
*/
public static WListbox newDataTable() {
WListbox dataTable = new WListbox();
dataTable.setWidth("100%");
dataTable.setHeight("100%");
ZKUpdateUtil.setWidth(dataTable, "100%");
ZKUpdateUtil.setHeight(dataTable, "100%");
dataTable.setSizedByContent(false);
dataTable.setVflex(true);
ZKUpdateUtil.setVflex(dataTable, true);
return dataTable;
}

View File

@ -24,6 +24,7 @@ import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
@ -175,7 +176,7 @@ public class Messagebox extends Window implements EventListener<Event>
img.setSrc(imgSrc);
pnlImage.setWidth("72px");
ZKUpdateUtil.setWidth(pnlImage, "72px");
pnlImage.setAlign("center");
pnlImage.setPack("center");
pnlImage.appendChild(img);
@ -198,7 +199,7 @@ public class Messagebox extends Window implements EventListener<Event>
pnlButtons.appendChild(btnRetry);
pnlButtons.appendChild(btnIgnore);
pnlButtons.setWidth("100%");
ZKUpdateUtil.setWidth(pnlButtons, "100%");
this.appendChild(pnlButtons);
pnlButtons.setSclass("dialog-footer");

View File

@ -23,6 +23,7 @@ import java.text.ParseException;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -83,7 +84,7 @@ public class NumberBox extends Div
if (integral)
decimalBox.setScale(0);
decimalBox.setStyle("display: inline-block;text-align:right");
decimalBox.setHflex("0");
ZKUpdateUtil.setHflex(decimalBox, "0");
decimalBox.setSclass("editor-input");
decimalBox.setId(decimalBox.getUuid());
@ -123,7 +124,7 @@ public class NumberBox extends Div
btn = new Button();
btn.setImage(ThemeManager.getThemeResource("images/Calculator16.png"));
btn.setTabindex(-1);
btn.setHflex("0");
ZKUpdateUtil.setHflex(btn, "0");
btn.setWidgetListener("onClick", "try{var id=this.getPopup(); zk.Widget.$(id.substring(5, id.length - 1)).focus_(100);" +
"} catch(error) {}");
@ -271,27 +272,27 @@ public class NumberBox extends Div
Hbox row1 = new Hbox();
Button btnAC = new Button();
btnAC.setWidth("40px");
ZKUpdateUtil.setWidth(btnAC, "40px");
btnAC.setLabel("AC");
btnAC.setWidgetListener("onClick", "calc.clearAll('" + txtCalcId + "')");
Button btn7 = new Button();
btn7.setWidth("30px");
ZKUpdateUtil.setWidth(btn7, "30px");
btn7.setLabel("7");
btn7.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '7')");
Button btn8 = new Button();
btn8.setWidth("30px");
ZKUpdateUtil.setWidth(btn8, "30px");
btn8.setLabel("8");
btn8.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '8')");
Button btn9 = new Button();
btn9.setWidth("30px");
ZKUpdateUtil.setWidth(btn9, "30px");
btn9.setLabel("9");
btn9.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '9')");
Button btnMultiply = new Button();
btnMultiply.setWidth("30px");
ZKUpdateUtil.setWidth(btnMultiply, "30px");
btnMultiply.setLabel("*");
btnMultiply.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' * ')");
@ -304,27 +305,27 @@ public class NumberBox extends Div
Hbox row2 = new Hbox();
Button btnC = new Button();
btnC.setWidth("40px");
ZKUpdateUtil.setWidth(btnC, "40px");
btnC.setLabel("C");
btnC.setWidgetListener("onClick", "calc.clear('" + txtCalcId + "')");
Button btn4 = new Button();
btn4.setWidth("30px");
ZKUpdateUtil.setWidth(btn4, "30px");
btn4.setLabel("4");
btn4.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '4')");
Button btn5 = new Button();
btn5.setWidth("30px");
ZKUpdateUtil.setWidth(btn5, "30px");
btn5.setLabel("5");
btn5.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '5')");
Button btn6 = new Button();
btn6.setWidth("30px");
ZKUpdateUtil.setWidth(btn6, "30px");
btn6.setLabel("6");
btn6.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '6')");
Button btnDivide = new Button();
btnDivide.setWidth("30px");
ZKUpdateUtil.setWidth(btnDivide, "30px");
btnDivide.setLabel("/");
btnDivide.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' / ')");
@ -337,27 +338,27 @@ public class NumberBox extends Div
Hbox row3 = new Hbox();
Button btnModulo = new Button();
btnModulo.setWidth("40px");
ZKUpdateUtil.setWidth(btnModulo, "40px");
btnModulo.setLabel("%");
btnModulo.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' % ')");
Button btn1 = new Button();
btn1.setWidth("30px");
ZKUpdateUtil.setWidth(btn1, "30px");
btn1.setLabel("1");
btn1.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '1')");
Button btn2 = new Button();
btn2.setWidth("30px");
ZKUpdateUtil.setWidth(btn2, "30px");
btn2.setLabel("2");
btn2.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '2')");
Button btn3 = new Button();
btn3.setWidth("30px");
ZKUpdateUtil.setWidth(btn3, "30px");
btn3.setLabel("3");
btn3.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '3')");
Button btnSubstract = new Button();
btnSubstract.setWidth("30px");
ZKUpdateUtil.setWidth(btnSubstract, "30px");
btnSubstract.setLabel("-");
btnSubstract.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' - ')");
@ -370,29 +371,29 @@ public class NumberBox extends Div
Hbox row4 = new Hbox();
Button btnCurrency = new Button();
btnCurrency.setWidth("40px");
ZKUpdateUtil.setWidth(btnCurrency, "40px");
btnCurrency.setLabel("$");
btnCurrency.setDisabled(true);
Button btn0 = new Button();
btn0.setWidth("30px");
ZKUpdateUtil.setWidth(btn0, "30px");
btn0.setLabel("0");
btn0.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '0')");
Button btnDot = new Button();
btnDot.setWidth("30px");
ZKUpdateUtil.setWidth(btnDot, "30px");
btnDot.setLabel(separator);
btnDot.setDisabled(integral);
btnDot.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '" + separator + "')");
Button btnEqual = new Button();
btnEqual.setWidth("30px");
ZKUpdateUtil.setWidth(btnEqual, "30px");
btnEqual.setLabel("=");
btnEqual.setWidgetListener("onClick", "calc.evaluate('" + decimalBox.getId() + "','"
+ txtCalcId + "','" + separator + "')");
Button btnAdd = new Button();
btnAdd.setWidth("30px");
ZKUpdateUtil.setWidth(btnAdd, "30px");
btnAdd.setLabel("+");
btnAdd.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' + ')");
@ -504,11 +505,11 @@ public class NumberBox extends Div
public void setTableEditorMode(boolean flag) {
if (flag) {
setHflex("0");
ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", decimalBox);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
setHflex("1");
ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", decimalBox);
LayoutUtils.removeSclass("grid-editor-button", btn);
}

View File

@ -17,6 +17,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.util.Env;
import org.zkoss.zk.ui.event.EventListener;
@ -55,12 +56,12 @@ public class Paymentbox extends Div {
private void initComponents() {
combo = new Combobox();
appendChild(combo);
combo.setHflex("0");
ZKUpdateUtil.setHflex(combo, "0");
btn = new Button();
btn.setTabindex(-1);
btn.setSclass("editor-button");
btn.setHflex("0");
ZKUpdateUtil.setHflex(btn, "0");
appendChild(btn);
LayoutUtils.addSclass("payment-rule-editor", this);

View File

@ -21,6 +21,7 @@ import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoLog;
import org.compiere.process.ProcessInfoUtil;
@ -109,7 +110,7 @@ public class ProcessInfoDialog extends Window implements EventListener<Event> {
Hbox pnlImage = new Hbox();
img.setSrc((pi != null && pi.isError()) ? ERROR:INFORMATION);
pnlImage.setWidth("72px");
ZKUpdateUtil.setWidth(pnlImage, "72px");
pnlImage.setAlign("center");
pnlImage.setPack("center");
pnlImage.appendChild(img);
@ -125,20 +126,20 @@ public class ProcessInfoDialog extends Window implements EventListener<Event> {
north.appendChild(pnlMessage);
Hbox pnlButtons = new Hbox();
pnlButtons.setHeight("52px");
ZKUpdateUtil.setHeight(pnlButtons, "52px");
pnlButtons.setAlign("center");
pnlButtons.setPack("end");
pnlButtons.appendChild(btnOk);
Separator separator = new Separator();
separator.setWidth("100%");
ZKUpdateUtil.setWidth(separator, "100%");
separator.setBar(true);
this.appendChild(separator);
Hbox south = new Hbox();
south.setPack("end");
south.setWidth("100%");
ZKUpdateUtil.setWidth(south, "100%");
this.appendChild(south);
south.appendChild(pnlButtons);
@ -155,7 +156,7 @@ public class ProcessInfoDialog extends Window implements EventListener<Event> {
if (m_logs != null && m_logs.length > 0){
separator = new Separator();
separator.setWidth("100%");
ZKUpdateUtil.setWidth(separator, "100%");
separator.setBar(true);
pnlMessage.appendChild(separator);
for (int loopCtr = 0; loopCtr < m_logs.length; loopCtr++) {

View File

@ -16,6 +16,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.A;
@ -53,7 +54,7 @@ public class Urlbox extends Div
private void initComponents() {
txt = new Textbox();
appendChild(txt);
txt.setHflex("0");
ZKUpdateUtil.setHflex(txt, "0");
txt.setSclass("editor-input");
btn = new A();
@ -61,7 +62,7 @@ public class Urlbox extends Div
btn.setTabindex(-1);
btn.setSclass("editor-button");
btn.setZclass("z-button-os");
btn.setHflex("0");
ZKUpdateUtil.setHflex(btn, "0");
appendChild(btn);
LayoutUtils.addSclass("editor-box", this);
@ -159,11 +160,11 @@ public class Urlbox extends Div
public void setTableEditorMode(boolean flag) {
if (flag) {
setHflex("0");
ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", txt);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
setHflex("1");
ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", txt);
LayoutUtils.removeSclass("grid-editor-button", btn);
}

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.event.TableValueChangeEvent;
import org.adempiere.webui.event.TableValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MImage;
import org.compiere.util.DisplayType;
@ -459,7 +460,7 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
if (classType != null && classType.isAssignableFrom(IDColumn.class))
{
header = new ListHeader("");
header.setWidth("30px");
ZKUpdateUtil.setWidth(header, "30px");
}
else
{
@ -505,7 +506,7 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
header.setStyle("min-width: " + width + "px");
}
header.setHflex("min");
ZKUpdateUtil.setHflex(header, "min");
m_headers.add(header);
}
else

View File

@ -28,11 +28,14 @@ import java.util.Map;
import java.util.Properties;
import java.util.TimeZone;
import javax.swing.text.StyledEditorKit.BoldAction;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.panel.ITabOnCloseHandler;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.model.X_R_RequestType;
import org.compiere.util.DisplayType;
@ -109,8 +112,8 @@ public class CalendarWindow extends Window implements EventListener<Event>, ITab
Borderlayout borderlayout = (Borderlayout) component.getFellow("main");
borderlayout.setStyle("position: absolute");
borderlayout.setWidth("100%");
borderlayout.setHeight("100%");
ZKUpdateUtil.setWidth(borderlayout, "100%");
ZKUpdateUtil.setHeight(borderlayout, "100%");
calendars = (Calendars) component.getFellow("cal");
calendars.setModel(scm);

View File

@ -13,6 +13,7 @@
*****************************************************************************/
package org.adempiere.webui.dashboard;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zul.Iframe;
/**
@ -32,8 +33,8 @@ public class DPGoogleCalendar extends DashboardPanel {
super();
Iframe iframe = new Iframe("http://www.google.com/calendar/embed?showTitle=0&amp;showTabs=0&amp;height=300&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;color=%232952A3");
iframe.setWidth("300px");
iframe.setHeight("310px");
ZKUpdateUtil.setWidth(iframe, "300px");
ZKUpdateUtil.setHeight(iframe, "310px");
this.appendChild(iframe);
}
}

View File

@ -22,6 +22,7 @@ import org.adempiere.base.event.EventManager;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MQuery;
import org.compiere.model.MRecentItem;
import org.compiere.model.MRole;
@ -92,7 +93,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
Panelchildren recentItemsContent = new Panelchildren();
panel.appendChild(recentItemsContent);
bxRecentItems = new Vbox();
bxRecentItems.setHflex("1");
ZKUpdateUtil.setHflex(bxRecentItems, "1");
this.setSclass("recentitems-box");
recentItemsContent.appendChild(bxRecentItems);
createRecentItemsPanel();
@ -242,7 +243,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
btnrecentItem.addEventListener(Events.ON_CLICK, this);
btnrecentItem.addEventListener(Events.ON_DROP, this);
btnrecentItem.setSclass("menu-href");
btnrecentItem.setHflex("1");
ZKUpdateUtil.setHflex(btnrecentItem, "1");
riShown++;
if (riShown >= maxri)

View File

@ -23,6 +23,7 @@ import org.adempiere.base.event.EventManager;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MPInstance;
import org.compiere.model.MProcess;
import org.compiere.model.Query;
@ -83,7 +84,7 @@ public class DPRunningJobs extends DashboardPanel implements EventListener<Event
Panelchildren jobsContent = new Panelchildren();
panel.appendChild(jobsContent);
bxJobs = new Vbox();
bxJobs.setHflex("1");
ZKUpdateUtil.setHflex(bxJobs, "1");
this.setSclass("recentitems-box");
jobsContent.appendChild(bxJobs);
createJobsPanel();
@ -188,7 +189,7 @@ public class DPRunningJobs extends DashboardPanel implements EventListener<Event
btnJob.setImage(ThemeManager.getThemeResource(getIconFile()));
btnJob.addEventListener(Events.ON_CLICK, this);
btnJob.setSclass("menu-href");
btnJob.setHflex("1");
ZKUpdateUtil.setHflex(btnJob, "1");
}
}

View File

@ -28,6 +28,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MRequest;
import org.compiere.model.MRequestType;
import org.compiere.util.Env;
@ -61,8 +62,8 @@ public class EventWindow extends Window implements EventListener<Event> {
Properties ctx = Env.getCtx();
setTitle(Msg.getMsg(ctx,"Event"));
setAttribute(Window.MODE_KEY, Window.MODE_POPUP);
setWidth("400px");
setHeight("310px");
ZKUpdateUtil.setWidth(this, "400px");
ZKUpdateUtil.setHeight(this, "310px");
this.setBorder("normal");
this.setClosable(true);
@ -80,16 +81,16 @@ public class EventWindow extends Window implements EventListener<Event> {
txtContent = new Textbox();
txtContent.setRows(5);
txtContent.setWidth("95%");
txtContent.setHeight("100%");
ZKUpdateUtil.setWidth(txtContent, "95%");
ZKUpdateUtil.setHeight(txtContent, "100%");
txtContent.setReadonly(true);
txtHeaderColor = new Textbox();
txtHeaderColor.setWidth("50px");
ZKUpdateUtil.setWidth(txtHeaderColor, "50px");
txtHeaderColor.setReadonly(true);
txtContentColor = new Textbox();
txtContentColor.setWidth("50px");
ZKUpdateUtil.setWidth(txtContentColor, "50px");
txtContentColor.setReadonly(true);
confirmPanel = new ConfirmPanel(false, false, false, false, false, true);
@ -106,7 +107,7 @@ public class EventWindow extends Window implements EventListener<Event> {
column = new Column();
columns.appendChild(column);
column.setWidth("250px");
ZKUpdateUtil.setWidth(column, "250px");
Rows rows = new Rows();
grid.appendChild(rows);
@ -142,8 +143,8 @@ public class EventWindow extends Window implements EventListener<Event> {
Center center = new Center();
borderlayout.appendChild(center);
center.appendChild(grid);
grid.setVflex("1");
grid.setHflex("1");
ZKUpdateUtil.setVflex(grid, "1");
ZKUpdateUtil.setHflex(grid, "1");
South south = new South();
borderlayout.appendChild(south);

View File

@ -31,6 +31,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@ -86,7 +87,7 @@ public class RequestWindow extends Window implements EventListener<Event> {
Properties ctx = Env.getCtx();
setTitle(Msg.getMsg(Env.getCtx(),"Event"));
setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
setWidth("400px");
ZKUpdateUtil.setWidth(this, "400px");
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setShadow(true);
@ -158,8 +159,8 @@ public class RequestWindow extends Window implements EventListener<Event> {
txtSummary = new Textbox();
txtSummary.setRows(3);
txtSummary.setWidth("95%");
txtSummary.setHeight("100%");
ZKUpdateUtil.setWidth(txtSummary, "95%");
ZKUpdateUtil.setHeight(txtSummary, "100%");
dbxStartPlan = new Datebox();
dbxCompletePlan = new Datebox();
@ -181,7 +182,7 @@ public class RequestWindow extends Window implements EventListener<Event> {
column = new Column();
columns.appendChild(column);
column.setWidth("250px");
ZKUpdateUtil.setWidth(column, "250px");
Rows rows = new Rows();
grid.appendChild(rows);
@ -236,18 +237,18 @@ public class RequestWindow extends Window implements EventListener<Event> {
rows.appendChild(row);
row.appendChild(lblStartTime.rightAlign());
row.appendChild(tbxStartTime);
tbxStartTime.setWidth("40%");
ZKUpdateUtil.setWidth(tbxStartTime, "40%");
row = new Row();
rows.appendChild(row);
row.appendChild(lblEndTime.rightAlign());
row.appendChild(tbxEndTime);
tbxEndTime.setWidth("40%");
ZKUpdateUtil.setWidth(tbxEndTime, "40%");
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("min");
ZKUpdateUtil.setHflex(borderlayout, "1");
ZKUpdateUtil.setVflex(borderlayout, "min");
North northPane = new North();
northPane.setSclass("dialog-content");
@ -255,8 +256,8 @@ public class RequestWindow extends Window implements EventListener<Event> {
borderlayout.appendChild(northPane);
northPane.appendChild(grid);
grid.setVflex("1");
grid.setHflex("1");
ZKUpdateUtil.setVflex(grid, "1");
ZKUpdateUtil.setHflex(grid, "1");
South southPane = new South();
southPane.setSclass("dialog-footer");

View File

@ -40,6 +40,7 @@ import org.adempiere.webui.factory.IDashboardGadgetFactory;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.ZkReportViewerProvider;
import org.compiere.model.I_AD_Menu;
import org.compiere.model.MChart;
@ -106,8 +107,8 @@ public class DashboardController implements EventListener<Event> {
public DashboardController() {
dashboardLayout = new Anchorlayout();
dashboardLayout.setSclass("dashboard-layout");
dashboardLayout.setVflex("1");
dashboardLayout.setHflex("1");
ZKUpdateUtil.setVflex(dashboardLayout, "1");
ZKUpdateUtil.setHflex(dashboardLayout, "1");
maximizedHolder = new Anchorchildren();
maximizedHolder.setAnchor("100% 100%");
@ -176,7 +177,7 @@ public class DashboardController implements EventListener<Event> {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
dashboardColumnLayout.setHflex("1");
ZKUpdateUtil.setHflex(dashboardColumnLayout, "1");
currentColumnNo = columnNo;
}
@ -388,7 +389,7 @@ public class DashboardController implements EventListener<Event> {
//set normal height
if (height == 0) {
height = width * 85 / 100;
chartPanel.setHeight(height+"px");
ZKUpdateUtil.setHeight(chartPanel, height+"px");
}
chartPanel.getChildren().clear();
ChartModel model = new ChartModel();
@ -419,13 +420,13 @@ public class DashboardController implements EventListener<Event> {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
dashboardColumnLayout.setWidth("100%");
ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
}
else if (isShowInDashboard)
{
// additional column
dashboardColumnLayout = new Vlayout();
dashboardColumnLayout.setWidth("100%");
ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
dashboardColumnLayout.setAttribute("ColumnNo", currentColumnNo + 1);
dashboardColumnLayout.setAttribute("IsShowInDashboard", isShowInDashboard);
dashboardColumnLayout.setAttribute("IsAdditionalColumn", true);
@ -436,7 +437,7 @@ public class DashboardController implements EventListener<Event> {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
dashboardColumnLayout.setWidth("100%");
ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
}
}
catch (Exception e)
@ -493,8 +494,8 @@ public class DashboardController implements EventListener<Event> {
}
panel.setSclass("dashboard-widget");
//following 2 line needed for restore to size the panel correctly
panel.setWidth(null);
panel.setHeight(null);
ZKUpdateUtil.setWidth(panel, null);
ZKUpdateUtil.setHeight(panel, null);
}
}
else if(eventName.equals(Events.ON_CLICK))
@ -699,7 +700,7 @@ public class DashboardController implements EventListener<Event> {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
dashboardColumnLayout.setWidth("100%");
ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
dashboardLayout.invalidate();
}

View File

@ -55,6 +55,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.IServerPushCallback;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.UserPreference;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.Adempiere;
import org.compiere.model.GridField;
@ -270,16 +271,16 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int eWidth = Integer.valueOf(eastWidth.replace("px", ""));
if( eWidth + wWidth <= browserWidth ){
w.setWidth(westWidth);
e.setWidth(eastWidth);
ZKUpdateUtil.setWidth(w, westWidth);
ZKUpdateUtil.setWidth(e, eastWidth);
}
}
else if ( westWidth != null )
w.setWidth(westWidth);
ZKUpdateUtil.setWidth(w, westWidth);
else if ( eastWidth != null )
e.setWidth(eastWidth);
ZKUpdateUtil.setWidth(e, eastWidth);
}
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
@ -603,7 +604,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
{
headerPopup = new Window();
headerPopup.setSclass("desktop-header-popup");
headerPopup.setVflex("true");
ZKUpdateUtil.setVflex(headerPopup, "true");
headerPopup.setVisible(false);
headerPopup.addEventListener(Events.ON_OPEN, new EventListener<OpenEvent>() {
@Override

View File

@ -30,6 +30,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.WTask;
import org.compiere.model.MInfoWindow;
@ -221,12 +222,12 @@ public abstract class TabbedDesktop extends AbstractDesktop {
*/
private void addWin(Iframe fr, String title, boolean closeable)
{
fr.setWidth("100%");
fr.setHeight("100%");
ZKUpdateUtil.setWidth(fr, "100%");
ZKUpdateUtil.setHeight(fr, "100%");
fr.setStyle("padding: 0; margin: 0; border: none; position: absolute");
Window window = new Window();
window.setWidth("100%");
window.setHeight("100%");
ZKUpdateUtil.setWidth(window, "100%");
ZKUpdateUtil.setHeight(window, "100%");
window.setStyle("padding: 0; margin: 0; border: none");
window.appendChild(fr);
window.setStyle("position: absolute");

View File

@ -36,6 +36,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
@ -162,7 +163,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
this.setComponent(comp);
this.gridField = gridField;
if (gridField.getGridTab() != null) {
comp.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getGridTab().getTableName()+"0"+gridField.getColumnName());
comp.setClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getGridTab().getTableName()+"0"+gridField.getColumnName());
this.gridTab = gridField.getGridTab();
} else {
comp.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getColumnName());
@ -556,20 +557,20 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
}
} else if (getComponent() instanceof Image) {
Image image = (Image) getComponent();
image.setWidth("24px");
image.setHeight("24px");
ZKUpdateUtil.setWidth(image, "24px");
ZKUpdateUtil.setHeight(image, "24px");
} else {
if (!tableEditor) {
if (getComponent() instanceof InputElement) {
((InputElement)getComponent()).setHflex("1");
ZKUpdateUtil.setHflex((InputElement)getComponent(), "1");
} else {
((HtmlBasedComponent)getComponent()).setWidth(width);
ZKUpdateUtil.setWidth((HtmlBasedComponent)getComponent(), width);
}
} else {
if (getComponent() instanceof Combobox) {
LayoutUtils.addSclass("grid-combobox-editor", (HtmlBasedComponent)getComponent());
} else {
((HtmlBasedComponent)getComponent()).setWidth(width);
ZKUpdateUtil.setWidth((HtmlBasedComponent)getComponent(), width);
}
}

View File

@ -30,6 +30,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.adempiere.webui.window.WTextEditorDialog;
import org.compiere.model.GridField;
@ -138,7 +139,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
getComponent().setMultiline(false);
getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (getComponent().getRows() > 1)
getComponent().setHeight("100%");
ZKUpdateUtil.setHeight(getComponent(), "100%");
if (getComponent() instanceof Textbox)
((Textbox)getComponent()).setObscureType(obscureType);

View File

@ -33,6 +33,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.adempiere.webui.window.WLocationDialog;
import org.compiere.model.GridField;
@ -147,7 +148,7 @@ ContextMenuListener, IZoomableEditor
private void init()
{
getComponent().setWidth("200px");
ZKUpdateUtil.setWidth(getComponent(), "200px");
getComponent().setAutocomplete(true);
getComponent().setAutodrop(true);
getComponent().addEventListener(Events.ON_BLUR, this);

View File

@ -28,6 +28,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WLocationEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MBPartner;
import org.compiere.model.MBPartnerLocation;
@ -140,14 +141,14 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
void jbInit() throws Exception
{
this.setWidth("350px");
ZKUpdateUtil.setWidth(this, "350px");
this.setBorder("normal");
this.setClosable(true);
this.setSizable(true);
this.setTitle("Business Partner");
this.appendChild(centerPanel);
this.appendChild(confirmPanel);
centerPanel.setWidth("100%");
ZKUpdateUtil.setWidth(confirmPanel, "100%");
confirmPanel.addActionListener(Events.ON_CLICK, this);
@ -239,17 +240,17 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
{
Hlayout layout = new Hlayout();
layout.setHflex("10");
ZKUpdateUtil.setHflex(layout, "10");
Label label = new Label(Msg.translate(Env.getCtx(), title));
Span span = new Span();
span.setHflex("3");
ZKUpdateUtil.setHflex(span, "3");
layout.appendChild(span);
span.appendChild(label);
label.setSclass("field-label");
layout.appendChild(field);
((HtmlBasedComponent)field).setHflex("7");
ZKUpdateUtil.setHflex((HtmlBasedComponent)field, "7");
centerPanel.appendChild(layout);
centerPanel.appendChild(new Separator());

View File

@ -28,6 +28,7 @@ import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
@ -135,13 +136,13 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
private void jbInit() throws Exception
{
this.setWidth("350px");
ZKUpdateUtil.setWidth(this, "350px");
this.setBorder("normal");
this.setClosable(true);
this.setSizable(true);
this.appendChild(centerPanel);
this.appendChild(confirmPanel);
centerPanel.setWidth("100%");
ZKUpdateUtil.setWidth(centerPanel, "100%");
confirmPanel.addActionListener(Events.ON_CLICK, this);
}
@ -214,18 +215,18 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
Component field = editor.getComponent();
Hlayout layout = new Hlayout();
layout.setHflex("10");
ZKUpdateUtil.setHflex(layout, "10");
Span span = new Span();
if(parent_WindowNo!= 0)
span.setHflex("3");
ZKUpdateUtil.setHflex(span, "3");
layout.appendChild(span);
Label label = editor.getLabel();
span.appendChild(label);
label.setSclass("field-label");
layout.appendChild(field);
((HtmlBasedComponent)field).setHflex("7");
ZKUpdateUtil.setHflex((HtmlBasedComponent)field, "7");
//editor.setValue("Y");
centerPanel.appendChild(layout);

View File

@ -29,6 +29,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.InfoPAttributeInstancePanel;
import org.adempiere.webui.panel.InvoiceHistory;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.model.MDocType;
import org.compiere.model.MRole;
@ -236,7 +237,7 @@ public class InfoProductWindow extends InfoWindow {
// productpriceTbl.getModel().addTableModelListener(this);
tabbedPane = new Tabbox();
tabbedPane.setHeight("100%");
ZKUpdateUtil.setHeight(tabbedPane, "100%");
Tabpanels tabPanels = new Tabpanels();
tabbedPane.appendChild(tabPanels);
Tabs tabs = new Tabs();
@ -245,41 +246,41 @@ public class InfoProductWindow extends InfoWindow {
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Warehouse")));
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(warehouseTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
fieldDescription = new Textbox();
fieldDescription.setMultiline(true);
fieldDescription.setReadonly(true);
fieldDescription.setHflex("1");
fieldDescription.setWidth("99%");
fieldDescription.setHeight("99%");
ZKUpdateUtil.setHflex(fieldDescription, "1");
ZKUpdateUtil.setWidth(fieldDescription, "99%");
ZKUpdateUtil.setHeight(fieldDescription, "99%");
desktopTabPanel.appendChild(fieldDescription);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(substituteTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(relatedTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(m_tableAtp);
// IDEMPIERE-1692
chbShowDetailAtp = new Checkbox();
@ -302,15 +303,15 @@ public class InfoProductWindow extends InfoWindow {
tab = new Tab(Msg.translate(Env.getCtx(), "Price"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(productpriceTbl);
tabPanels.appendChild(desktopTabPanel);
//
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
contentBorderLayout = new Borderlayout();
contentBorderLayout.setWidth("100%");
contentBorderLayout.setHeight("100%");
ZKUpdateUtil.setWidth(contentBorderLayout, "100%");
ZKUpdateUtil.setHeight(contentBorderLayout, "100%");
if (isLookup())
contentBorderLayout.setStyle("border: none; position: relative; ");
else
@ -320,7 +321,7 @@ public class InfoProductWindow extends InfoWindow {
contentBorderLayout.getCenter().setAutoscroll(false);
South south = new South();
int detailHeight = (height * 25 / 100);
south.setHeight(detailHeight + "px");
ZKUpdateUtil.setHeight(south, detailHeight + "px");
south.setCollapsible(true);
south.setSplittable(true);
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
@ -338,8 +339,8 @@ public class InfoProductWindow extends InfoWindow {
contentBorderLayout.appendChild(south);
tabbedPane.setSclass("info-product-tabbedpane");
south.appendChild(tabbedPane);
tabbedPane.setVflex("1");
tabbedPane.setHflex("1");
ZKUpdateUtil.setVflex(tabbedPane, "1");
ZKUpdateUtil.setHflex(tabbedPane, "1");
center.appendChild(contentBorderLayout);

View File

@ -52,6 +52,7 @@ import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.EmbedWinInfo;
@ -578,7 +579,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
if (relatedInfoList.length > 0) { // setup the panel
//embeddedPane.setTitle(Msg.translate(Env.getCtx(), "Related Information"));
embeddedPane.setHeight("100%");
ZKUpdateUtil.setHeight(embeddedPane, "100%");
//tabPanels = new Tabpanels();
embeddedPane.appendChild(tabPanels);
//tabs = new Tabs();
@ -623,7 +624,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
embeddedTbl.autoSize();
embeddedTbl.getModel().addTableModelListener(this);
embeddedTbl.setVflex("1");
ZKUpdateUtil.setVflex(embeddedTbl, "1");
//Xolali - add embeddedTbl to list, add m_sqlembedded to list
@ -640,7 +641,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
//desktopTabPanel.
desktopTabPanel.setHeight("100%");
ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(embeddedTbl);
tabPanels.appendChild(desktopTabPanel);
}
@ -1088,8 +1089,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{
setTitle(infoWindow.get_Translation("Name"));
layout = new Borderlayout();
layout.setWidth("100%");
layout.setHeight("100%");
ZKUpdateUtil.setWidth(layout, "100%");
ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@ -1097,10 +1098,10 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
this.appendChild(layout);
if (isLookup())
contentPanel.setWidth("99%");
ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
contentPanel.setVflex(true);
ZKUpdateUtil.setVflex(contentPanel, true);
contentPanel.setSizedByContent(true);
contentPanel.setSpan(true);
@ -1141,7 +1142,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected void renderFooter(South south) {
southBody = new Vbox();
southBody.setHflex("1");
ZKUpdateUtil.setHflex(southBody, "1");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
@ -1156,13 +1157,13 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected void renderContentPane(Center center) {
Div div = new Div();
div.setStyle("width :100%; height: 100%");
div.setVflex("1");
div.setHflex("1");
ZKUpdateUtil.setVflex(div, "1");
ZKUpdateUtil.setHflex(div, "1");
div.appendChild(contentPanel);
Borderlayout inner = new Borderlayout();
inner.setWidth("100%");
inner.setHeight("100%");
ZKUpdateUtil.setWidth(inner, "100%");
ZKUpdateUtil.setHeight(inner, "100%");
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
if (isLookup())
inner.setStyle("border: none; position: relative; ");
@ -1175,7 +1176,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
if (embeddedWinList.size() > 0) {
South south = new South();
int detailHeight = (height * 25 / 100);
south.setHeight(detailHeight + "px");
ZKUpdateUtil.setHeight(south, detailHeight + "px");
south.setAutoscroll(true);
south.setCollapsible(true);
south.setSplittable(true);
@ -1196,8 +1197,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
//south.sets
inner.appendChild(south);
embeddedPane.setSclass("info-product-tabbedpane");
embeddedPane.setVflex("1");
embeddedPane.setHflex("1");
ZKUpdateUtil.setVflex(embeddedPane, "1");
ZKUpdateUtil.setHflex(embeddedPane, "1");
south.appendChild(embeddedPane);
@ -1221,7 +1222,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
columns.appendChild(new Column());
Column column = new Column();
column.setWidth("100px");
ZKUpdateUtil.setWidth(column, "100px");
column.setAlign("right");
columns.appendChild(column);

View File

@ -45,6 +45,7 @@ import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ReaderInputStream;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.apache.commons.io.FileUtils;
@ -80,8 +81,8 @@ public class WTranslationDialog extends TranslationController implements IFormCo
zkInit();
dynInit();
Borderlayout contentLayout = new Borderlayout();
contentLayout.setWidth("100%");
contentLayout.setHeight("100%");
ZKUpdateUtil.setWidth(contentLayout, "100%");
ZKUpdateUtil.setHeight(contentLayout, "100%");
form.appendChild(contentLayout);
Center center = new Center();
contentLayout.appendChild(center);
@ -91,7 +92,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo
contentLayout.appendChild(south);
south.appendChild(statusBar);
LayoutUtils.addSclass("status-border", statusBar);
south.setHeight("22px");
ZKUpdateUtil.setHeight(south, "22px");
}
catch(Exception e)
{

View File

@ -24,6 +24,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.exception.ApplicationException;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridTab;
import org.compiere.model.MForm;
import org.compiere.model.X_AD_CtxHelp;
@ -76,8 +77,8 @@ public abstract class ADForm extends Window implements EventListener<Event>, IHe
{
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
this.setWidth("100%");
this.setHeight("95%");
ZKUpdateUtil.setWidth(this, "100%");
ZKUpdateUtil.setHeight(this, "95%");
this.setStyle("position:absolute");
this.setContentSclass("adform-content");
}

Some files were not shown because too many files have changed in this diff Show More