use of org.zkoss.zul.Hbox in project adempiere by adempiere.
the class StatusBarPanel method init.
private void init() {
statusDB = new Label(" ");
statusLine = new Label();
Hbox hbox = new Hbox();
hbox.setWidth("100%");
hbox.setHeight("100%");
//hbox.setHflex("1");
/* TODO-evenos: zk6 */
// if (embedded)
// hbox.setWidths("90%,10%");
// hbox.setWi
// else
// hbox.setWidths("50%,50%");
Cell leftCell = new Cell();
hbox.appendChild(leftCell);
Cell rightCell = new Cell();
hbox.appendChild(rightCell);
if (embedded) {
leftCell.setWidth("90%");
rightCell.setWidth("10%");
} else {
leftCell.setWidth("50%");
rightCell.setWidth("50%");
}
west = new Div();
west.setStyle("text-align: left; ");
west.appendChild(statusLine);
Vbox vbox = new Vbox();
vbox.setPack("center");
ThemeUtils.addSclass("ad-statusbarpanel", vbox);
vbox.appendChild(west);
leftCell.appendChild(vbox);
east = new Div();
east.setWidth("100%");
east.setStyle("text-align: right; ");
if (!embedded) {
infoLine = new Label();
east.appendChild(infoLine);
infoLine.setVisible(false);
}
east.appendChild(statusDB);
ThemeUtils.addSclass("ad-statusbarpanel-db", statusDB);
if (!embedded)
ThemeUtils.addSclass("ad-statusbarpanel-info", infoLine);
vbox = new Vbox();
vbox.setAlign("stretch");
vbox.setPack("center");
ThemeUtils.addSclass("ad-statusbarpanel", vbox);
vbox.appendChild(east);
rightCell.appendChild(vbox);
this.appendChild(hbox);
statusDB.addEventListener(Events.ON_CLICK, this);
createPopup();
}
use of org.zkoss.zul.Hbox in project adempiere by adempiere.
the class WWFActivity method init.
private void init() {
Grid grid = new Grid();
grid.setWidth("100%");
grid.setHeight("100%");
grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;");
grid.makeNoStrip();
grid.setOddRowSclass("even");
Rows rows = new Rows();
grid.appendChild(rows);
Row row = new Row();
rows.appendChild(row);
Div div = new Div();
div.setAlign("right");
div.appendChild(lNode);
row.appendChild(div);
row.appendChild(fNode);
fNode.setWidth("100%");
fNode.setReadonly(true);
row = new Row();
rows.appendChild(row);
row.setValign("top");
div = new Div();
div.setAlign("right");
div.appendChild(lDesctiption);
row.appendChild(div);
row.appendChild(fDescription);
fDescription.setMultiline(true);
fDescription.setWidth("100%");
fDescription.setReadonly(true);
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lHelp);
row.appendChild(div);
row.appendChild(fHelp);
fHelp.setMultiline(true);
fHelp.setWidth("100%");
fHelp.setReadonly(true);
fHelp.setRows(3);
row.appendChild(new Label());
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lHistory);
row.appendChild(div);
row.appendChild(fHistory);
row.appendChild(new Label());
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lAnswer);
row.appendChild(div);
Hbox hbox = new Hbox();
hbox.appendChild(fAnswerText);
hbox.appendChild(fAnswerList);
hbox.appendChild(fAnswerButton);
fAnswerButton.addEventListener(Events.ON_CLICK, this);
row.appendChild(hbox);
row.appendChild(bZoom);
bZoom.addEventListener(Events.ON_CLICK, this);
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lTextMsg);
row.appendChild(div);
row.appendChild(fTextMsg);
fTextMsg.setMultiline(true);
fTextMsg.setWidth("100%");
row.appendChild(new Label());
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lForward);
row.appendChild(div);
hbox = new Hbox();
hbox.appendChild(fForward.getComponent());
hbox.appendChild(lOptional);
row.appendChild(hbox);
row.appendChild(bOK);
bOK.addEventListener(Events.ON_CLICK, this);
Borderlayout layout = new Borderlayout();
layout.setWidth("100%");
layout.setHeight("100%");
layout.setStyle("background-color: transparent; position: absolute;");
North north = new North();
north.appendChild(listbox);
north.setSplittable(true);
north.setHflex("true");
//north.setVflex("true");
north.setHeight("50%");
layout.appendChild(north);
north.setStyle("background-color: transparent");
listbox.addEventListener(Events.ON_SELECT, this);
Center center = new Center();
center.appendChild(grid);
layout.appendChild(center);
center.setStyle("background-color: transparent");
center.setHflex("true");
center.setVflex("true");
South south = new South();
south.appendChild(statusBar);
layout.appendChild(south);
south.setStyle("background-color: transparent");
this.appendChild(layout);
this.setStyle("height: 100%; width: 100%; position: absolute;");
}
use of org.zkoss.zul.Hbox in project adempiere by adempiere.
the class WPAttributeInstance method init.
/**
* Static Init
* @throws Exception
*/
private void init() throws Exception {
showAll.setLabel(Msg.getMsg(Env.getCtx(), "ShowAll"));
this.appendChild(mainLayout);
// North
Hbox box = new Hbox();
box.setParent(northPanel);
box.setPack("end");
box.appendChild(showAll);
showAll.addEventListener(Events.ON_CHECK, this);
North north = new North();
north.setParent(mainLayout);
north.appendChild(northPanel);
// Center
Center center = new Center();
center.setParent(mainLayout);
center.setHflex("true");
center.setVflex("true");
center.appendChild(m_table);
// South
South south = new South();
south.setParent(mainLayout);
south.appendChild(confirmPanel);
confirmPanel.addActionListener(this);
}
use of org.zkoss.zul.Hbox in project adempiere by adempiere.
the class WLocationDialog method init.
private void init() {
Row pnlAddress1 = new Row();
pnlAddress1.appendChild(lblAddress1.rightAlign());
pnlAddress1.appendChild(txtAddress1);
Row pnlAddress2 = new Row();
pnlAddress2.appendChild(lblAddress2.rightAlign());
pnlAddress2.appendChild(txtAddress2);
Row pnlAddress3 = new Row();
pnlAddress3.appendChild(lblAddress3.rightAlign());
pnlAddress3.appendChild(txtAddress3);
Row pnlAddress4 = new Row();
pnlAddress4.appendChild(lblAddress4.rightAlign());
pnlAddress4.appendChild(txtAddress4);
Row pnlCity = new Row();
pnlCity.appendChild(lblCity.rightAlign());
pnlCity.appendChild(txtCity);
Row pnlPostal = new Row();
pnlPostal.appendChild(lblPostal.rightAlign());
pnlPostal.appendChild(txtPostal);
Row pnlPostalAdd = new Row();
pnlPostalAdd.appendChild(lblPostalAdd.rightAlign());
pnlPostalAdd.appendChild(txtPostalAdd);
Row pnlRegion = new Row();
pnlRegion.appendChild(lblRegion.rightAlign());
pnlRegion.appendChild(lstRegion);
Row pnlCountry = new Row();
pnlCountry.appendChild(lblCountry.rightAlign());
pnlCountry.appendChild(lstCountry);
Panel pnlButtonLeft = new Panel();
pnlButtonLeft.appendChild(btnUrl);
pnlButtonLeft.setAlign("left");
Panel pnlButtonRight = new Panel();
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.setWidth("100%");
pnlButtonRight.setStyle("text-align:right");
Hbox hboxButton = new Hbox();
hboxButton.appendChild(pnlButtonLeft);
hboxButton.appendChild(pnlButtonRight);
hboxButton.setWidth("100%");
this.appendChild(mainPanel);
this.appendChild(hboxButton);
}
use of org.zkoss.zul.Hbox in project adempiere by adempiere.
the class WCRPDetail method renderChart.
private void renderChart(JFreeChart jchart) {
BufferedImage bi = jchart.createBufferedImage(700, 500, Transparency.TRANSLUCENT, null);
try {
byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);
AImage image = new AImage("", bytes);
mainLayout.removeChild(west);
chartPanel = new Hbox();
chart = new Image();
chart.setContent(image);
chartPanel.appendChild(chart);
west = new West();
west.appendChild(chartPanel);
west.setSplittable(true);
west.setSize("70%");
west.setAutoscroll(true);
west.setOpen(true);
mainLayout.appendChild(west);
} catch (Exception e) {
log.log(Level.SEVERE, "WCRP.init", e.getMessage());
}
}
Aggregations