Search in sources :

Example 1 with WPOSKeyboard

use of org.adempiere.pos.WPOSKeyboard in project adempiere by adempiere.

the class WQueryOrderHistory method onEvent.

//	close
@Override
public void onEvent(Event e) throws Exception {
    if (e.getTarget().equals(fieldDocumentNo.getComponent(WPOSTextField.SECONDARY)) && !isKeyboard) {
        isKeyboard = true;
        //	Get Keyboard Panel
        WPOSKeyboard keyboard = fieldDocumentNo.getKeyboard();
        if (keyboard != null) {
            //	Set Title
            keyboard.setTitle(Msg.translate(Env.getCtx(), DOCUMENTNO).substring(1));
            keyboard.setPosTextField(fieldDocumentNo);
            AEnv.showWindow(keyboard);
        }
        fieldDocumentNo.setFocus(true);
        refresh();
    } else if (e.getTarget().equals(fieldDocumentNo.getComponent(WPOSTextField.PRIMARY))) {
        isKeyboard = false;
    } else if (e.getTarget().equals(fieldBPartner.getComponent(WPOSTextField.SECONDARY)) && !isKeyboard) {
        isKeyboard = true;
        //	Get Keyboard Panel
        WPOSKeyboard keyboard = fieldBPartner.getKeyboard();
        if (keyboard != null) {
            //	Set Title
            keyboard.setTitle(Msg.translate(Env.getCtx(), BPARTNERID));
            keyboard.setPosTextField(fieldBPartner);
            AEnv.showWindow(keyboard);
        }
        fieldBPartner.setFocus(true);
        refresh();
    } else if (e.getTarget().equals(fieldBPartner.getComponent(WPOSTextField.PRIMARY))) {
        isKeyboard = false;
    } else if (e.getTarget().getId().equals("Refresh")) {
        refresh();
    }
    if (e.getTarget().equals(fieldProcessed) || e.getTarget().equals(fieldAllowDate) || e.getTarget().equals(fieldDateTo) || e.getTarget().equals(fieldDateFrom)) {
        refresh();
        return;
    } else if (Events.ON_OK.equals(e.getName()) || e.getTarget().equals(posTable) && e.getName().equals(Events.ON_DOUBLE_CLICK)) {
        close();
    } else if (e.getTarget().getId().equals("Ok")) {
        close();
    } else if (e.getTarget().getId().equals("Cancel")) {
        close();
    } else if (e.getTarget().getId().equals("Reset")) {
        reset();
    }
    enableButtons();
}
Also used : WPOSKeyboard(org.adempiere.pos.WPOSKeyboard)

Example 2 with WPOSKeyboard

use of org.adempiere.pos.WPOSKeyboard 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 3 with WPOSKeyboard

use of org.adempiere.pos.WPOSKeyboard 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)

Aggregations

WPOSKeyboard (org.adempiere.pos.WPOSKeyboard)3 Textbox (org.adempiere.webui.component.Textbox)2