use of org.adempiere.webui.component.Textbox in project adempiere by adempiere.
the class WQueryBPartner method showKeyboard.
public String showKeyboard(Event e) {
isKeyboard = true;
Textbox field = (Textbox) e.getTarget();
WPOSKeyboard keyboard = posPanel.getKeyboard();
if (keyboard != null) {
if (e.getName().equals(Events.ON_FOCUS)) {
keyboard.setPosTextField(field);
AEnv.showWindow(keyboard);
}
}
return field.getText();
}
use of org.adempiere.webui.component.Textbox in project adempiere by adempiere.
the class WPOSBPartner method showKeyboard.
// getBPartner_ID
public String showKeyboard(Event e) {
isKeyboard = true;
Textbox field = (Textbox) e.getTarget();
WPOSKeyboard keyboard = pos.getKeyboard();
if (keyboard != null) {
if (e.getName().equals(Events.ON_FOCUS)) {
keyboard.setPosTextField(field);
AEnv.showWindow(keyboard);
}
}
return field.getText();
}
use of org.adempiere.webui.component.Textbox in project adempiere by adempiere.
the class WFileImport method cmd_loadFormat.
// cmd_loadFile
/**
* Load Format
*/
private void cmd_loadFormat() {
// clear panel
previewPanel.getChildren().clear();
ListItem listitem = pickFormat.getSelectedItem();
String formatName = (String) listitem.getValue();
if (formatName.equals(s_none))
return;
m_format = ImpFormat.load(formatName);
if (m_format == null) {
FDialog.error(m_WindowNo, this, formatName);
return;
}
// pointers
int size = m_format.getRowCount();
m_labels = new Label[size];
m_fields = new Textbox[size];
for (int i = 0; i < size; i++) {
ImpFormatRow row = m_format.getRow(i);
m_labels[i] = new Label(row.getColumnName());
Hbox hbox = new Hbox();
hbox.setWidth("100%");
hbox.setWidths("30%, 70%");
hbox.setStyle("padding-bottom: 3px");
hbox.appendChild(m_labels[i].rightAlign());
int length = row.getEndNo() - row.getStartNo();
if (length <= 5)
length = 5;
else if (length > 20)
length = 20;
m_fields[i] = new Textbox();
m_fields[i].setStyle("margin-left: 2px");
hbox.appendChild(m_fields[i]);
previewPanel.appendChild(hbox);
}
m_record = -1;
record.setValue("------");
previewPanel.invalidate();
}
use of org.adempiere.webui.component.Textbox 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.Textbox in project adempiere by adempiere.
the class WTextEditorDialog method init.
private void init() {
setBorder("normal");
VerticalBox vbox = new VerticalBox();
appendChild(vbox);
tabbox = new Tabbox();
vbox.appendChild(tabbox);
Tabs tabs = new Tabs();
tabbox.appendChild(tabs);
Tabpanels tabPanels = new Tabpanels();
tabbox.appendChild(tabPanels);
Tab tab = new Tab("Text");
tabs.appendChild(tab);
Tabpanel tabPanel = new Tabpanel();
tabPanels.appendChild(tabPanel);
textBox = new Textbox(text);
textBox.setCols(80);
textBox.setRows(30);
textBox.setEnabled(editable);
textBox.setWidth("700px");
textBox.setHeight("500px");
tabPanel.appendChild(textBox);
tab = new Tab("HTML");
tabs.appendChild(tab);
tabPanel = new Tabpanel();
tabPanels.appendChild(tabPanel);
if (editable) {
editor = new FCKeditor();
tabPanel.appendChild(editor);
editor.setWidth("700px");
editor.setHeight("500px");
editor.setValue(text);
} else {
Div div = new Div();
div.setHeight("500px");
div.setWidth("700px");
div.setStyle("overflow: auto; border: 1px solid");
tabPanel.appendChild(div);
Html html = new Html();
div.appendChild(html);
html.setContent(text);
}
vbox.appendChild(new Separator());
ConfirmPanel confirmPanel = new ConfirmPanel(true);
vbox.appendChild(confirmPanel);
confirmPanel.addButton(confirmPanel.createButton(ConfirmPanel.A_RESET));
confirmPanel.addActionListener(this);
if (maxSize > 0) {
status = new Label();
appendChild(status);
updateStatus(text.length());
status.setStyle("margin-top:10px;");
textBox.addEventListener(Events.ON_CHANGE, this);
editor.addEventListener(Events.ON_CHANGE, this);
}
tabbox.addEventListener(Events.ON_SELECT, this);
}
Aggregations