Examples of PTInstruction


Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

    protected void addCloseHandler(final PTInstruction create, final UIService uiService) {
        cast().addCloseHandler(new CloseHandler<PopupPanel>() {

            @Override
            public void onClose(final CloseEvent<PopupPanel> event) {
                final PTInstruction instruction = new PTInstruction();
                instruction.setObjectID(create.getObjectID());
                instruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
                instruction.put(HANDLER.KEY, Dictionnary.HANDLER.KEY_.CLOSE_HANDLER);
                uiService.sendDataToServer(instruction);
            }
        });
    }
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

            popup.show();
            Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                @Override
                public void execute() {
                    final PTInstruction eventInstruction = new PTInstruction();
                    eventInstruction.setObjectID(addHandler.getObjectID());
                    eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
                    eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.POPUP_POSITION_CALLBACK);
                    eventInstruction.put(PROPERTY.OFFSETWIDTH, popup.getOffsetWidth());
                    eventInstruction.put(PROPERTY.OFFSETHEIGHT, popup.getOffsetHeight());
                    eventInstruction.put(PROPERTY.CLIENT_WIDTH, Window.getClientWidth());
                    eventInstruction.put(PROPERTY.CLIENT_HEIGHT, Window.getClientHeight());
                    uiService.sendDataToServer(eventInstruction);
                }
            });

            return;
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

        if (HANDLER.KEY_.STRING_VALUE_CHANGE_HANDLER.equals(handler)) {
            uiObject.addValueChangeHandler(new ValueChangeHandler<String>() {

                @Override
                public void onValueChange(final ValueChangeEvent<String> event) {
                    final PTInstruction eventInstruction = new PTInstruction();
                    eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
                    eventInstruction.setObjectID(addHandler.getObjectID());
                    eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.STRING_VALUE_CHANGE_HANDLER);
                    eventInstruction.put(PROPERTY.TEXT, event.getValue());
                    uiService.sendDataToServer(eventInstruction);
                }
            });
        } else if (HANDLER.KEY_.STRING_SELECTION_HANDLER.equals(handler)) {
            uiObject.addSelectionHandler(new SelectionHandler<SuggestOracle.Suggestion>() {

                @Override
                public void onSelection(final SelectionEvent<Suggestion> event) {
                    final PTInstruction eventInstruction = new PTInstruction();
                    eventInstruction.setObjectID(addHandler.getObjectID());
                    eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
                    eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.STRING_SELECTION_HANDLER);
                    eventInstruction.put(PROPERTY.DISPLAY_STRING, event.getSelectedItem().getDisplayString());
                    eventInstruction.put(PROPERTY.REPLACEMENT_STRING, event.getSelectedItem().getReplacementString());
                    uiService.sendDataToServer(eventInstruction);
                }
            });
        } else {
            super.addHandler(addHandler, uiService);
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

        if (HANDLER.KEY_.COMMAND.equals(handler)) {
            uiObject.setScheduledCommand(new ScheduledCommand() {

                @Override
                public void execute() {
                    final PTInstruction eventInstruction = new PTInstruction();
                    eventInstruction.setObjectID(addHandler.getObjectID());
                    eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
                    eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.COMMAND);
                    uiService.sendDataToServer(eventInstruction);
                }
            });
        } else {
            super.addHandler(addHandler, uiService);
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

    private UIService uiService;

    @Override
    public void onBlur(final BlurEvent event) {
        final PTInstruction eventInstruction = new PTInstruction();

        eventInstruction.setObjectID(getObjectID());
        eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
        eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.STRING_VALUE_CHANGE_HANDLER);
        eventInstruction.put(PROPERTY.HTML, uiObject.getHTML());

        uiService.sendDataToServer(eventInstruction);
    }
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

            super.addHandler(addHandler, uiService);
        }
    }

    protected void triggerEvent(final PTInstruction addHandler, final UIService uiService, final DateBox dateBox) {
        final PTInstruction instruction = new PTInstruction();
        instruction.setObjectID(addHandler.getObjectID());
        instruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
        instruction.put(HANDLER.KEY, HANDLER.KEY_.DATE_VALUE_CHANGE_HANDLER);
        instruction.put(PROPERTY.VALUE, dateBox.getTextBox().getText());

        uiService.sendDataToServer(instruction);
    }
View Full Code Here

Examples of com.ponysdk.ui.terminal.instruction.PTInstruction

            }
        });
    }

    protected void fireInstruction(final long objectID, final UIService uiService, final boolean value) {
        final PTInstruction eventInstruction = new PTInstruction();
        eventInstruction.setObjectID(objectID);
        eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT);
        eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.BOOLEAN_VALUE_CHANGE_HANDLER);
        eventInstruction.put(PROPERTY.VALUE, value);
        uiService.sendDataToServer(eventInstruction);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.