use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WScanBarUI method createConfirmPanel.
/**
* Create Confirmation Panel with OK Button.
*/
public void createConfirmPanel() {
Rows rows = new Rows();
Row row = new Row();
confirmPanel.addActionListener(this);
row.appendChild(confirmPanel);
rows.appendChild(row);
gridConfirm.appendChild(rows);
return;
}
use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WBrowserSearch method initComponents.
/**
* Initialize components
*/
@Override
public void initComponents() {
if (mainPanel != null)
return;
//
m_separators = new ArrayList<Label>();
rows = new Rows();
//
mainPanel = new Panel();
centerPanel = GridFactory.newGridLayout();
//setup columns
Columns columns = new Columns();
centerPanel.appendChild(columns);
int colN = getColumns() * 2;
if (colN != 0) {
int percent = 100 / colN;
for (int i = 0; i < colN; i++) {
Column col = new Column();
col.setWidth((i == 0 ? ((int) percent / 2) : percent) + "%");
columns.appendChild(col);
}
}
// Add Rows
centerPanel.appendChild(rows);
mainPanel.appendChild(centerPanel);
mainPanel.setStyle("overflow-y:auto");
}
use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WExpressReceiptScanBarUI method createConfirmPanel.
/**
* Create Confirmation Panel with OK Button.
*/
public void createConfirmPanel() {
Rows rows = new Rows();
Row row = new Row();
m_pnlConfirm.addActionListener(this);
row.appendChild(m_pnlConfirm);
rows.appendChild(row);
m_grdConfirm.appendChild(rows);
return;
}
use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class FindWindow method initSimple.
/**
* initialise lookup record tab
* @throws IOException
*
**/
private void initSimple() throws IOException {
lblDocumentNo = new Label();
lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
lblDescription = new Label();
lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
lblName = new Label();
lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
lblValue = new Label();
lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
fieldDocumentNo = new Textbox();
fieldDocumentNo.setId("fieldDocumentNo");
fieldDocumentNo.setMaxlength(40);
fieldDescription = new Textbox();
fieldDescription.setId("fieldDescription");
fieldDescription.setMaxlength(40);
fieldName = new Textbox();
fieldName.setMaxlength(40);
fieldValue = new Textbox();
fieldValue.setMaxlength(40);
// Get button from Action
WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
Button btnNew = action.getButton();
btnNew.setName("btnNew");
btnNew.addEventListener(Events.ON_CLICK, this);
// Get button from Action
action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
Button btnOk = action.getButton();
btnOk.setName("btnOkSimple");
btnOk.addEventListener(Events.ON_CLICK, this);
// Get from action
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
Button btnCancel = action.getButton();
btnCancel.setName("btnCancel");
btnCancel.addEventListener(Events.ON_CLICK, this);
Panel pnlButtonRight = new Panel();
// Change to Standard button order
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.setAlign("right");
pnlButtonRight.setWidth("100%");
Panel pnlButtonLeft = new Panel();
pnlButtonLeft.appendChild(btnNew);
Hbox hboxButton = new Hbox();
hboxButton.appendChild(pnlButtonLeft);
hboxButton.appendChild(pnlButtonRight);
hboxButton.setWidth("100%");
pnlDocument = new Row();
pnlDocument.setId("pnlDocument");
pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
pnlDocument.appendChild(fieldDocumentNo);
pnlDescription = new Row();
pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
pnlDescription.appendChild(fieldDescription);
pnlValue = new Row();
pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
pnlValue.appendChild(fieldValue);
pnlName = new Row();
pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
pnlName.appendChild(fieldName);
contentSimple = new Grid();
contentSimple.setId("contentSimple");
contentSimple.setWidth("100%");
contentSimple.makeNoStrip();
contentSimpleRows = new Rows();
contentSimple.appendChild(contentSimpleRows);
contentSimpleRows.appendChild(pnlValue);
contentSimpleRows.appendChild(pnlName);
contentSimpleRows.appendChild(pnlDocument);
contentSimpleRows.appendChild(pnlDescription);
contentSimple.setVflex(true);
Borderlayout layout = new Borderlayout();
layout.setStyle("height: 100%; width: 99%; position: relative");
winLookupRecord.appendChild(layout);
Center center = new Center();
layout.appendChild(center);
center.appendChild(contentSimple);
center.setFlex(true);
South south = new South();
layout.appendChild(south);
south.appendChild(hboxButton);
winLookupRecord.setWidth("100%");
winLookupRecord.setHeight("100%");
winLookupRecord.addEventListener(Events.ON_OK, this);
}
use of org.adempiere.webui.component.Rows 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);
}
Aggregations