use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class InfoBPartnerPanel method statInit.
private void statInit() {
initComponents();
fieldValue.setWidth("100%");
fieldContact.setWidth("100%");
fieldPhone.setWidth("100%");
fieldName.setWidth("100%");
fieldEMail.setWidth("100%");
fieldPostal.setWidth("100%");
Rows rows = new Rows();
Row row = new Row();
rows.appendChild(row);
row.appendChild(labelValue.rightAlign());
row.appendChild(fieldValue);
row.appendChild(labelContact.rightAlign());
row.appendChild(fieldContact);
row.appendChild(labelPhone.rightAlign());
row.appendChild(fieldPhone);
row.appendChild(checkCustomer);
row = new Row();
rows.appendChild(row);
row.appendChild(labelName.rightAlign());
row.appendChild(fieldName);
row.appendChild(labelEMail.rightAlign());
row.appendChild(fieldEMail);
row.appendChild(labelPostal.rightAlign());
row.appendChild(fieldPostal);
row.appendChild(checkAND);
statusBar.setEastVisibility(false);
// Contact Tab
ColumnInfo[] s_layoutContact = new ColumnInfo[] { new ColumnInfo(" ", "AD_User_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Greeting_ID"), "(SELECT g.Greeting from C_Greeting g WHERE g.C_Greeting_ID = AD_User.C_Greeting_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Title"), "Title", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Location_ID"), "(SELECT a.Name from C_BPartner_Location a WHERE AD_User.C_BPartner_Location_ID=a.C_BPartner_Location_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "Fax", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "EMail"), "EMail", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastContact"), "LastContact", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastResult"), "LastResult", String.class) };
// From Clause
String s_sqlFrom = "AD_User";
// Where Clause
String s_sqlWhere = "C_BPartner_ID = ? and IsActive = 'Y'";
m_sqlContact = contactTbl.prepareTable(s_layoutContact, s_sqlFrom, s_sqlWhere, false, "AD_User");
contactTbl.setMultiSelection(false);
contactTbl.autoSize();
contactTbl.getModel().addTableModelListener(this);
contactTbl.setAttribute("zk_component_ID", "Lookup_Data_Contact");
// Location Tab
ColumnInfo[] s_layoutAddress = new ColumnInfo[] { new ColumnInfo(" ", "l.C_BPartner_Location_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "l.Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "l.Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "l.Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "l.Fax", String.class), // Replaced with parsed value
new ColumnInfo(Msg.translate(Env.getCtx(), "Address"), "a.Address1", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsShipTo"), "l.IsShipTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsBillTo"), "l.IsBillTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsRemitTo"), "l.IsRemitTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsPayFrom"), "l.IsPayFrom", Boolean.class) };
ADDRESS_INDEX = 5;
/** From Clause */
String s_locationFrom = "C_BPartner_Location l" + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
/** Where Clause */
String s_locationWhere = "l.C_BPartner_ID = ? and l.IsActive = 'Y'";
m_sqlAddress = addressTbl.prepareTable(s_layoutAddress, s_locationFrom, s_locationWhere, false, "l");
addressTbl.setMultiSelection(false);
addressTbl.autoSize();
addressTbl.getModel().addTableModelListener(this);
addressTbl.setAttribute("zk_component_ID", "Lookup_Data_Address");
//
detailTabBox.setHeight("100%");
Tabpanels tabPanels = new Tabpanels();
detailTabBox.appendChild(tabPanels);
Tabs tabs = new Tabs();
detailTabBox.appendChild(tabs);
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Contact")));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(contactTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Location"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(addressTbl);
tabPanels.appendChild(desktopTabPanel);
tabs.setAttribute("zk_component_ID", "Subordinate_Tabs");
Borderlayout southSP = new Borderlayout();
Center center = new Center();
North north = new North();
center.appendChild(detailTabBox);
southSP.appendChild(north);
southSP.appendChild(center);
p_centerSouth.setTitle(Msg.translate(Env.getCtx(), "ContactAndAddress"));
p_centerSouth.setTooltiptext(Msg.translate(Env.getCtx(), "ContactAndAddress"));
p_centerSouth.appendChild(southSP);
p_criteriaGrid.appendChild(rows);
super.setSizes();
contactTbl.addActionListener(new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
int leadRowKey = 0;
if (contactTbl != null || contactTbl.getRowCount() > 0)
leadRowKey = contactTbl.getLeadRowKey();
if (m_AD_User_ID != leadRowKey) {
// From the contact table
m_AD_User_ID = leadRowKey;
}
}
});
addressTbl.addActionListener(new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
int leadRowKey = 0;
if (addressTbl != null || addressTbl.getRowCount() > 0)
leadRowKey = addressTbl.getLeadRowKey();
if (m_C_BPartner_Location_ID != leadRowKey) {
// From the main table
m_C_BPartner_Location_ID = leadRowKey;
}
}
});
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromStatementUI method zkInit.
// dynInit
protected void zkInit() throws Exception {
bankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
authorizationLabel.setText(Msg.translate(Env.getCtx(), "R_AuthCode"));
documentTypeLabel.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
tenderTypeLabel.setText(Msg.translate(Env.getCtx(), "TenderType"));
dateFromField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "DateFrom"));
dateToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "DateTo"));
amtFromField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtFrom"));
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("120px");
parameterLayout.setWidth("100%");
Panel parameterPanel = v_CreateFromPanel.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
Grid parameterBankLayout = GridFactory.newGridLayout();
Panel parameterBankPanel = new Panel();
parameterBankPanel.appendChild(parameterBankLayout);
Center center = new Center();
parameterLayout.appendChild(center);
center.appendChild(parameterBankPanel);
Rows rows = (Rows) parameterBankLayout.newRows();
Row row = rows.newRow();
row.appendChild(bankAccountLabel.rightAlign());
row.appendChild(bankAccountField.getComponent());
row.appendChild(documentNoLabel.rightAlign());
row.appendChild(documentNoField.getComponent());
row = rows.newRow();
row.appendChild(documentTypeLabel.rightAlign());
row.appendChild(documentTypeField.getComponent());
row.appendChild(authorizationLabel.rightAlign());
row.appendChild(authorizationField.getComponent());
row = rows.newRow();
row.appendChild(tenderTypeLabel.rightAlign());
row.appendChild(tenderTypeField.getComponent());
row.appendChild(amtFromLabel.rightAlign());
Hbox hbox = new Hbox();
hbox.appendChild(amtFromField.getComponent());
hbox.appendChild(amtToLabel.rightAlign());
hbox.appendChild(amtToField.getComponent());
row.appendChild(hbox);
row = rows.newRow();
row.appendChild(BPartner_idLabel.rightAlign());
row.appendChild(bPartnerLookup.getComponent());
row.appendChild(dateFromLabel.rightAlign());
hbox = new Hbox();
hbox.appendChild(dateFromField.getComponent());
hbox.appendChild(dateToLabel.rightAlign());
hbox.appendChild(dateToField.getComponent());
row.appendChild(hbox);
// Add to Main
v_CreateFromPanel.setWidth("100%");
v_CreateFromPanel.setHeight("100%");
v_Container.appendChild(v_CreateFromPanel);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCharge method zkInit.
private void zkInit() {
Borderlayout contentPane = new Borderlayout();
form.appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(m_grdNew);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(m_pnlAccount);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(m_grdConfirm);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WGenForm method initForm.
@Override
protected void initForm() {
try {
zkInit();
dynInit();
Borderlayout contentPane = new Borderlayout();
this.appendChild(contentPane);
contentPane.setWidth("99%");
contentPane.setHeight("100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
center.appendChild(tabbedPane);
center.setHflex("true");
center.setVflex("true");
South south = new South();
south.setStyle("border: none");
contentPane.appendChild(south);
south.appendChild(statusBar);
south.setHeight("22px");
} catch (Exception ex) {
log.log(Level.SEVERE, "init", ex);
}
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromWindow method zkInit.
protected void zkInit() throws Exception {
Borderlayout contentPane = new Borderlayout();
appendChild(contentPane);
North north = new North();
contentPane.appendChild(north);
north.appendChild(parameterPanel);
Center center = new Center();
contentPane.appendChild(center);
center.appendChild(dataTable);
WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
Button selectAllButton = selectAllAction.getButton();
confirmPanel.addComponentsLeft(selectAllButton);
selectAllButton.addActionListener(this);
South south = new South();
contentPane.appendChild(south);
Panel southPanel = new Panel();
south.appendChild(southPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(confirmPanel);
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
setWidth("750px");
setHeight("550px");
setSizable(true);
setBorder("normal");
contentPane.setWidth("100%");
contentPane.setHeight("100%");
}
Aggregations