Search in sources :

Example 16 with Textbox

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();
}
Also used : WPOSKeyboard(org.adempiere.pos.WPOSKeyboard) Textbox(org.adempiere.webui.component.Textbox)

Example 17 with Textbox

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();
}
Also used : WPOSKeyboard(org.adempiere.pos.WPOSKeyboard) Textbox(org.adempiere.webui.component.Textbox)

Example 18 with Textbox

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();
}
Also used : ImpFormatRow(org.compiere.impexp.ImpFormatRow) Hbox(org.zkoss.zul.Hbox) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox) ListItem(org.adempiere.webui.component.ListItem)

Example 19 with Textbox

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);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox)

Example 20 with Textbox

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);
}
Also used : VerticalBox(org.adempiere.webui.component.VerticalBox) Textbox(org.adempiere.webui.component.Textbox) Label(org.adempiere.webui.component.Label) Html(org.zkoss.zul.Html) Tabbox(org.adempiere.webui.component.Tabbox) Div(org.zkoss.zul.Div) Tab(org.adempiere.webui.component.Tab) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabpanel(org.adempiere.webui.component.Tabpanel) Separator(org.zkoss.zul.Separator) FCKeditor(org.zkforge.fckez.FCKeditor)

Aggregations

Textbox (org.adempiere.webui.component.Textbox)21 Label (org.adempiere.webui.component.Label)11 Checkbox (org.adempiere.webui.component.Checkbox)8 NumberBox (org.adempiere.webui.component.NumberBox)6 Datebox (org.adempiere.webui.component.Datebox)5 DecimalFormat (java.text.DecimalFormat)4 SimpleDateFormat (java.text.SimpleDateFormat)4 Button (org.adempiere.webui.component.Button)4 Component (org.zkoss.zk.ui.Component)4 Hbox (org.zkoss.zul.Hbox)4 Combobox (org.adempiere.webui.component.Combobox)3 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)3 ListItem (org.adempiere.webui.component.ListItem)3 Listbox (org.adempiere.webui.component.Listbox)3 Row (org.adempiere.webui.component.Row)3 WSearchEditor (org.adempiere.webui.editor.WSearchEditor)3 BigDecimal (java.math.BigDecimal)2 WPOSKeyboard (org.adempiere.pos.WPOSKeyboard)2 Rows (org.adempiere.webui.component.Rows)2 IDColumn (org.compiere.minigrid.IDColumn)2