use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.
the class ADTreePanel method init.
// End Yamel Senih
private void init() {
this.setWidth("100%");
this.setHeight("100%");
tree = new Tree();
tree.setMultiple(false);
tree.setWidth("100%");
tree.setVflex(true);
// Due to bug in the new paging functionality
tree.setPageSize(-1);
tree.setStyle("border: none");
pnlSearch = new TreeSearchPanel(tree, Events.ON_SELECT);
Toolbar toolbar = new Toolbar();
toolbar.appendChild(pnlSearch);
this.appendChild(toolbar);
Panelchildren pc = new Panelchildren();
this.appendChild(pc);
pc.appendChild(tree);
// Elaine 2009/02/27 - expand tree
toolbar = new Toolbar();
chkExpand = new Checkbox();
chkExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
chkExpand.addEventListener(Events.ON_CHECK, this);
toolbar.appendChild(chkExpand);
this.appendChild(toolbar);
}
use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.
the class WPaySelect method onEvent.
// dispose
/**************************************************************************
* ActionListener
* @param e event
*/
public void onEvent(Event e) {
boolean triggerRefresh = false;
if (!m_loadedOK)
return;
if (e != null) {
Component component = e.getTarget();
if (component != null) {
// Generic components in the criteria fields
if (component instanceof Textbox) {
Textbox tb = ((Textbox) component);
if (tb.hasChanged()) {
triggerRefresh = true;
} else {
//else
return;
}
} else if (component instanceof Checkbox) {
// Check box changes generally always cause a refresh
// Capture changes that don't in a specific event handler
triggerRefresh = true;
Checkbox cb = (Checkbox) component;
if (cb.getName() != null && cb.getName().equals("AutoQuery")) {
// Only trigger a refresh if the check box is selected
if (!cb.isSelected()) {
return;
}
}
} else {
// Assume another type of component
if (e.getName().equals("onChange") || e.getName().equals("onSelect")) {
triggerRefresh = true;
}
}
String fieldName = "";
if (component.getAttribute("fieldName") != null) {
fieldName = (String) component.getAttribute("fieldName");
}
if (triggerRefresh && fieldName.equals("fieldBankAccount")) {
loadBankInfo();
}
// Generate PaySelection
if (component.equals(bGenerate)) {
generatePaySelect();
dispose();
} else if (component.equals(bCancel))
dispose();
// Refresh if the autoquery feature is selected or the refresh button is clicked.
if (component.equals(bRefresh) || (checkAutoQuery.isSelected() && triggerRefresh)) {
setFieldOldValues();
loadTableInfo();
}
}
}
}
use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.
the class AboutWindow method createTrace.
private Tabpanel createTrace() {
Tabpanel tabPanel = new Tabpanel();
Vbox vbox = new Vbox();
vbox.setParent(tabPanel);
vbox.setWidth("100%");
vbox.setHeight("100%");
Hbox hbox = new Hbox();
bErrorsOnly = new Checkbox();
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
//default only show error
bErrorsOnly.setChecked(true);
bErrorsOnly.addEventListener(Events.ON_CHECK, this);
hbox.appendChild(bErrorsOnly);
btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
btnDownload.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnDownload);
btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnErrorEmail);
vbox.appendChild(hbox);
Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
logTable = new Listbox();
ListHead listHead = new ListHead();
listHead.setParent(logTable);
listHead.setSizable(true);
for (Object obj : columnNames) {
ListHeader header = new ListHeader(obj.toString());
header.setWidth("100px");
listHead.appendChild(header);
}
vbox.appendChild(logTable);
logTable.setWidth("480px");
logTable.setHeight("310px");
logTable.setVflex(false);
updateLogTable();
return tabPanel;
}
use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.
the class InfoBPartnerPanel method initComponents.
/**
* Initialize the zk components.
*/
private void initComponents() {
labelValue = new Label();
labelValue.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Value")));
labelName = new Label();
labelName.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Name")));
labelContact = new Label();
labelContact.setValue(Msg.translate(Env.getCtx(), "Contact"));
labelEMail = new Label();
labelEMail.setValue(Msg.getMsg(Env.getCtx(), "EMail"));
labelPostal = new Label();
labelPostal.setValue(Msg.getMsg(Env.getCtx(), "Postal"));
labelPhone = new Label();
labelPhone.setValue(Msg.translate(Env.getCtx(), "Phone"));
//Record_ID
fieldID = 0;
//
fieldValue = new Textbox();
fieldValue.setMaxlength(40);
fieldValue.setAttribute("zk_component_ID", "Lookup_Criteria_fieldValue");
fieldValue.addEventListener(Events.ON_CHANGE, this);
//
fieldName = new Textbox();
fieldName.setMaxlength(40);
fieldName.setAttribute("zk_component_ID", "Lookup_Criteria_fieldName");
fieldName.addEventListener(Events.ON_CHANGE, this);
//
fieldContact = new Textbox();
fieldContact.setMaxlength(40);
fieldContact.setAttribute("zk_component_ID", "Lookup_Criteria_fieldContact");
fieldContact.addEventListener(Events.ON_CHANGE, this);
//
fieldEMail = new Textbox();
fieldEMail.setMaxlength(40);
fieldEMail.setAttribute("zk_component_ID", "Lookup_Criteria_fieldEMail");
fieldEMail.addEventListener(Events.ON_CHANGE, this);
//
fieldPostal = new Textbox();
fieldPostal.setMaxlength(40);
fieldPostal.setAttribute("zk_component_ID", "Lookup_Criteria_fieldPostal");
fieldPostal.addEventListener(Events.ON_CHANGE, this);
//
fieldPhone = new Textbox();
fieldPhone.setMaxlength(40);
fieldPhone.setAttribute("zk_component_ID", "Lookup_Criteria_fieldPhone");
fieldPhone.addEventListener(Events.ON_CHANGE, this);
//
checkAND = new Checkbox();
checkAND.setText(Msg.getMsg(Env.getCtx(), "SearchAND"));
checkAND.setName("SearchAND");
checkAND.setTooltiptext(Msg.getMsg(Env.getCtx(), "SearchANDInfo"));
checkAND.setSelected(true);
checkAND.addActionListener(this);
checkAND.setAttribute("zk_component_ID", "Lookup_Criteria_checkAND");
//
checkCustomer = new Checkbox();
checkCustomer.addActionListener(this);
checkCustomer.setAttribute("zk_component_ID", "Lookup_Criteria_checkCustomer");
checkCustomer.setName("checkCustomer");
if (m_isSOTrx)
checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCustomers"));
else
checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyVendors"));
checkCustomer.setSelected(m_isSOMatch);
}
use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.
the class InfoOrderPanel method onEvent.
public void onEvent(Event e) {
if (!p_loadedOK)
return;
Component component = e.getTarget();
if (component != null) {
if (component instanceof Checkbox) {
Checkbox cb = (Checkbox) component;
// ShowDetail check box
if (cb.getName() != null && cb.getName().equals("IsSOTrx")) {
if (cb.isChecked()) {
fIsDelivered.setLabel(Msg.translate(Env.getCtx(), "IsDelivered"));
} else {
fIsDelivered.setLabel(Msg.translate(Env.getCtx(), "Received"));
}
}
}
}
//
super.onEvent(e);
}
Aggregations