use of org.zkoss.zul.West in project adempiere by adempiere.
the class Borderlayout method appendWest.
public Borderlayout appendWest(Component c) {
West west = getWest();
if (west == null) {
west = new West();
this.appendChild(west);
}
ThemeUtils.addSclass("ad-borderlayout-west", west);
west.appendChild(c);
return this;
}
use of org.zkoss.zul.West in project adempiere by adempiere.
the class InfoPanel method init.
protected void init() {
ThemeUtils.addSclass("ad-infopanel", this);
if (isModal()) {
setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
setBorder("normal");
setClosable(true);
setWidth(p_width + "px");
setHeight(p_height + "px");
setContentStyle("overflow: auto");
setSizable(true);
setMaximizable(true);
ThemeUtils.addSclass("ad-infopanel-modal", this);
} else {
setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
// setBorder("none");
// setWidth("100%");
// setHeight("100%");
// setStyle("position: absolute");
ThemeUtils.addSclass("ad-infopanel-embedded", this);
}
// Elaine 2008/12/16
confirmPanel = new ConfirmPanel(true, true, false, true, true, true);
confirmPanel.addActionListener(Events.ON_CLICK, this);
// Elaine 2008/12/16
confirmPanel.getButton(ConfirmPanel.A_CUSTOMIZE).setVisible(hasCustomize());
confirmPanel.getButton(ConfirmPanel.A_HISTORY).setVisible(hasHistory());
confirmPanel.getButton(ConfirmPanel.A_ZOOM).setVisible(hasZoom());
confirmPanel.getButton(ConfirmPanel.A_OK).setVisible(p_saveResults);
checkAutoQuery.setText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
checkAutoQuery.setTooltip(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
checkAutoQuery.setName("AutoQuery");
checkAutoQuery.setSelected(MSysConfig.getValue(SYSCONFIG_INFO_AUTO_QUERY, "Y", Env.getAD_Client_ID(Env.getCtx())).equals("Y"));
checkAutoQuery.setAttribute("zk_component_ID", "Lookup_Confirm_checkAutoQuery");
checkAutoQuery.addActionListener(this);
confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(checkAutoQuery, confirmPanel.getButton(ConfirmPanel.A_REFRESH));
confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(new Separator("vertical"), confirmPanel.getButton(ConfirmPanel.A_REFRESH));
//
statusBar.setEastVisibility(false);
statusBar.setAttribute("zk_component_ID", "info_statusBar");
//
p_southLayout.setVflex("min");
Center center = new Center();
center.appendChild(confirmPanel);
p_southLayout.appendChild(center);
South south = new South();
south.appendChild(statusBar);
p_southLayout.appendChild(south);
//
// Reset button
bReset = confirmPanel.createButton(ConfirmPanel.A_RESET);
bReset.addActionListener(this);
lblReset = new Label();
lblReset.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Reset")));
p_table.setOddRowSclass(null);
p_table.setAttribute("zk_component_ID", "Lookup_Data_SearchResults");
p_table.setVflex(true);
// Sizes
p_centerNorth.setVflex("min");
p_centerCenter.setVflex("1");
p_centerSouth.setHeight("25%");
//
ThemeUtils.addSclass("info-panel-center", p_centerLayout);
// May be empty
p_centerLayout.appendChild(p_centerNorth);
// the table
p_centerLayout.appendChild(p_centerCenter);
// detail tabs or other
p_centerLayout.appendChild(p_centerSouth);
//
// Need to use a container for p_table so we can insert paging if required.
Div div = new Div();
div.appendChild(p_table);
div.setVflex("1");
div.setHflex("1");
p_centerCenter.appendChild(div);
p_centerCenter.setAutoscroll(false);
p_centerCenter.setHflex("1");
//
p_centerSouth.setCollapsible(true);
p_centerSouth.setSplittable(true);
p_centerSouth.setHflex("1");
// Setup the north reset button and criteria grid
West spWest = new West();
spWest.setHflex("min");
ThemeUtils.addSclass("criteria", spWest);
Center spCenter = new Center();
//spCenter.setWidth("100%");
spCenter.setHflex("1");
spCenter.setVflex("min");
ThemeUtils.addSclass("criteria", spCenter);
p_northLayout.setHflex("min");
p_northLayout.setVflex("min");
p_northLayout.appendChild(spWest);
p_northLayout.appendChild(spCenter);
// spWest - the reset button
Grid bGrid = GridFactory.newGridLayout();
bGrid.setSizedByContent(true);
Columns bColumns = new Columns();
Column col = new Column();
col.setHflex("min");
bColumns.appendChild(col);
bGrid.appendChild(bColumns);
Rows bRows = new Rows();
Row bRow = new Row();
bGrid.appendChild(bRows);
bRows.appendChild(bRow);
bRow.appendChild(bReset);
bRow = new Row();
bRows.appendChild(bRow);
bRow.appendChild(lblReset);
spWest.appendChild(bGrid);
// The criteria table
//p_criteriaGrid.setSizedByContent(true);
spCenter.appendChild(p_criteriaGrid);
Borderlayout mainPanel = new Borderlayout();
mainPanel.setWidth("100%");
mainPanel.setHeight("100%");
//
North north = new North();
mainPanel.appendChild(north);
north.appendChild(p_northLayout);
//
center = new Center();
mainPanel.appendChild(center);
center.appendChild(p_centerLayout);
//
south = new South();
mainPanel.appendChild(south);
south.appendChild(p_southLayout);
//
if (!isModal()) {
mainPanel.setStyle("position: absolute");
}
this.appendChild(mainPanel);
this.addEventListener(Events.ON_OK, this);
this.setVisible(true);
}
use of org.zkoss.zul.West in project adempiere by adempiere.
the class WFactReconcile method initLayout.
// initComponents
/**
* Initialize the form structure
* - Load Bank Info
* - Load BPartner
* - Load Document Type
* - Init Table
*/
private void initLayout() {
setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
setBorder("none");
setWidth("100%");
setHeight("100%");
setStyle("position: absolute");
miniTable.setAttribute("zk_component_ID", "Lookup_Data_SearchResults");
miniTable.setVflex(true);
// Define the criteria rows and grid
Rows rows = new Rows();
//
Row row = new Row();
rows.appendChild(row);
row.setSpans("1, 1, 1, 1");
row.appendChild(labelAcctSchema.rightAlign());
row.appendChild(fieldAcctSchema.getComponent());
row.appendChild(labelBPartner.rightAlign());
row.appendChild(fieldBPartner.getComponent());
//
row = new Row();
rows.appendChild(row);
row.setSpans("1, 1, 1, 1");
row.appendChild(labelOrg.rightAlign());
row.appendChild(fieldOrg.getComponent());
row.appendChild(labelProduct.rightAlign());
row.appendChild(fieldProduct.getComponent());
//
row = new Row();
rows.appendChild(row);
row.setSpans("1, 1, 1, 1");
row.appendChild(labelAccount.rightAlign());
row.appendChild(fieldAccount.getComponent());
row.appendChild(new Space());
row.appendChild(isReconciled);
//
row = new Row();
rows.appendChild(row);
row.setSpans("1, 1, 1, 1");
row.appendChild(labelDateAcct.rightAlign());
Hbox hbox = new Hbox();
hbox.appendChild(fieldDateAcct);
hbox.appendChild(labelDateAcct2);
hbox.appendChild(fieldDateAcct2);
row.appendChild(hbox);
//
parameterGrid.appendChild(rows);
//
Center center = new Center();
center.setBorder("0");
center.appendChild(parameterGrid);
Hbox btnBox = new Hbox();
btnBox.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
btnBox.appendChild(bRefresh);
btnBox.setHeight("100%");
West west = new West();
west.setBorder("0");
west.appendChild(btnBox);
parameterPanel.appendChild(center);
parameterPanel.appendChild(west);
parameterPanel.setHeight("100px");
//
North north = new North();
north.appendChild(parameterPanel);
mainPanel.appendChild(north);
//
center = new Center();
center.appendChild(miniTable);
mainPanel.appendChild(center);
// Setup the command buttons
pnlBtnLeft = new Panel();
pnlBtnLeft.setAlign("left");
pnlBtnLeft.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
pnlBtnLeft.appendChild(bZoom);
//
pnlBtnRight = new Panel();
pnlBtnRight.setAlign("right");
pnlBtnRight.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
pnlBtnRight.appendChild(bGenerate);
pnlBtnRight.appendChild(bReset);
pnlBtnRight.appendChild(bCancel);
//
pnlTextCenter = new Panel();
pnlTextCenter.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
pnlTextCenter.setAlign("center");
pnlTextCenter.appendChild(differenceLabel);
pnlTextCenter.appendChild(differenceField);
//
hboxBtnRight = new Hbox();
hboxBtnRight.appendChild(pnlBtnRight);
hboxBtnRight.setWidth("100%");
hboxBtnRight.setStyle("text-align:right");
//
hboxBtnLeft = new Hbox();
hboxBtnLeft.appendChild(pnlBtnLeft);
hboxBtnLeft.setWidth("100%");
hboxBtnLeft.setStyle("text-align:left");
//
hboxTextCenter = new Hbox();
hboxTextCenter.appendChild(pnlTextCenter);
hboxTextCenter.setWidth("100%");
hboxTextCenter.setHeight("100%");
hboxTextCenter.setPack("center");
hboxTextCenter.setStyle("text-align:Center");
//
commandPane = new Hbox();
commandPane.appendChild(hboxBtnLeft);
commandPane.appendChild(hboxTextCenter);
commandPane.appendChild(hboxBtnRight);
commandPane.setWidth("100%");
commandPane.setPack("center");
//
commandPanel.setHeight("70px");
commandPanel.setStyle("border-top: 2px; border-bottom: 2px; padding: 4px");
commandPanel.setWidth("100%");
center = new Center();
center.appendChild(commandPane);
center.setBorder("0");
commandPanel.appendChild(center);
South south = new South();
south.appendChild(statusBar);
south.setBorder("0");
commandPanel.appendChild(south);
south = new South();
south.appendChild(commandPanel);
south.setBorder("0");
mainPanel.appendChild(south);
// Add everything to the form
this.appendChild(mainPanel);
}
use of org.zkoss.zul.West in project adempiere by adempiere.
the class WTreeBOM method jbInit.
private void jbInit() {
m_frame.setWidth("99%");
m_frame.setHeight("100%");
m_frame.setStyle("position: absolute; padding: 0; margin: 0");
m_frame.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("position: absolute");
labelProduct.setText(Msg.getElement(getCtx(), "M_Product_ID"));
implosion.setText(Msg.getElement(getCtx(), "Implosion"));
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
north.setHeight("28px");
northPanel.appendChild(labelProduct);
northPanel.appendChild(new Space());
fieldProduct.getComponent().setWidth("20%");
northPanel.appendChild(fieldProduct.getComponent());
northPanel.appendChild(new Space());
northPanel.appendChild(implosion);
northPanel.appendChild(new Space());
northPanel.appendChild(treeInfo);
South south = new South();
mainLayout.appendChild(south);
south.appendChild(confirmPanel);
confirmPanel.addActionListener(this);
West west = new West();
mainLayout.appendChild(west);
west.setSplittable(true);
west.appendChild(treePane);
treePane.appendChild(m_tree);
m_tree.setStyle("border: none");
west.setWidth("25%");
west.setAutoscroll(true);
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(dataPane);
dataPane.appendChild(tableBOM);
tableBOM.setVflex(true);
tableBOM.setFixedLayout(true);
center.setFlex(true);
center.setAutoscroll(true);
}
use of org.zkoss.zul.West in project adempiere by adempiere.
the class WLogin method doCreatePart.
protected Component doCreatePart(Component parent) {
layout = new Borderlayout();
if (parent != null)
layout.setParent(parent);
else
layout.setPage(page);
ThemeUtils.addSclass("ad-wlogin-layout", layout);
Center center = new Center();
center.setParent(layout);
center.setHflex("true");
center.setVflex("true");
center.setAutoscroll(true);
ThemeUtils.addSclass("ad-wlogin-layout-center", center);
Vbox vb = new Vbox();
vb.setParent(center);
vb.setPack("center");
vb.setAlign("center");
vb.setWidth("100%");
vb.setHeight("100%");
LoginWindow loginWindow = new LoginWindow(app);
loginWindow.setParent(vb);
if (!AEnv.isBrowserSupported()) {
//TODO: localization
String msg = "You might experience slow performance and user interface anomalies using your current browser to access the application. We recommend the use of Firefox, Google Chrome or Apple Safari.";
browserWarningWindow = new Window();
ThemeUtils.addSclass("ad-wlogin-browser-not-supported", browserWarningWindow);
Div div = new Div();
div.appendChild(new Text(msg));
browserWarningWindow.setPosition("top,right");
browserWarningWindow.appendChild(div);
browserWarningWindow.setPage(page);
browserWarningWindow.doOverlapped();
}
try {
String right = ThemeUtils.getLoginRightPanel();
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(right);
East east = new East();
ThemeUtils.addSclass("ad-wlogin-east-panel", east);
addContent(east, pageDefintion);
} catch (Exception e) {
//ignore page not found exception
if (e instanceof UiException) {
if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
e.printStackTrace();
}
} else {
e.printStackTrace();
}
}
try {
String left = ThemeUtils.getLoginLeftPanel();
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(left);
West west = new West();
ThemeUtils.addSclass("ad-wlogin-west-panel", west);
addContent(west, pageDefintion);
} catch (Exception e) {
//ignore page not found exception
if (e instanceof UiException) {
if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
e.printStackTrace();
}
} else {
e.printStackTrace();
}
}
try {
String top = ThemeUtils.getLoginTopPanel();
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(top);
North north = new North();
ThemeUtils.addSclass("ad-wlogin-north-panel", north);
addContent(north, pageDefintion);
} catch (Exception e) {
//ignore page not found exception
if (e instanceof UiException) {
if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
e.printStackTrace();
}
} else {
e.printStackTrace();
}
}
try {
String bottom = ThemeUtils.getLoginBottomPanel();
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(bottom);
South south = new South();
ThemeUtils.addSclass("ad-wlogin-south-panel", south);
addContent(south, pageDefintion);
} catch (Exception e) {
//ignore page not found exception
if (e instanceof UiException) {
if (!(e.getMessage() != null && e.getMessage().startsWith("Page not found"))) {
e.printStackTrace();
}
} else {
e.printStackTrace();
}
}
return layout;
}
Aggregations