Examples of MyDateBox


Examples of com.ponysdk.ui.terminal.ui.PTDateBox.MyDateBox

    @Override
    public void create(final PTInstruction create, final UIService uiService) {

        final PTDatePicker datePicker = (PTDatePicker) uiService.getPTObject(create.getLong(PROPERTY.PICKER));

        init(create, uiService, new MyDateBox(datePicker.cast(), null, DEFAULT_FORMAT));
    }
View Full Code Here

Examples of com.ponysdk.ui.terminal.ui.PTDateBox.MyDateBox

        uiService.sendDataToServer(instruction);
    }

    @Override
    public void update(final PTInstruction update, final UIService uiService) {
        final MyDateBox dateBox = cast();

        if (update.containsKey(PROPERTY.VALUE)) {
            dateBox.getTextBox().setText(update.getString(PROPERTY.VALUE));
        } else if (update.containsKey(PROPERTY.DATE_FORMAT)) {
            final DefaultFormat format = new DefaultFormat(DateTimeFormat.getFormat(update.getString(PROPERTY.DATE_FORMAT)));
            dateBox.setFormat(format);
        } else if (update.containsKey(PROPERTY.DATE_FORMAT_PATTERN)) {
            dateBox.setFormat(new DefaultFormat(DateTimeFormat.getFormat(update.getString(PROPERTY.DATE_FORMAT_PATTERN))));
        } else if (update.containsKey(PROPERTY.ENABLED)) {
            dateBox.setEnabled(update.getBoolean(PROPERTY.ENABLED));
        } else if (update.containsKey(PROPERTY.MONTH)) {
            dateBox.setDefaultMonth(update.getString(PROPERTY.MONTH));
        } else {
            super.update(update, uiService);
        }
    }
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.