Package net.rim.device.api.ui.picker

Examples of net.rim.device.api.ui.picker.DateTimePicker.doModal()


    void showSpinnerDialog(final int type) {
        switch (type) {
        case DEFAULT:
            final DateTimePicker datePicker =
                    DateTimePicker.createInstance(_defaultCal);
            if (datePicker.doModal()) {
                final StringBuffer dateStr = new StringBuffer();
                _defaultCal = datePicker.getDateTime();
                _defaultDateFormat.format(_defaultCal, dateStr, null);
                _editFieldDefault.setText(dateStr.toString());
            }
View Full Code Here


            }
            break;
        case DATE:
            final DateTimePicker datePickerDate =
                    DateTimePicker.createInstance(_dateCal, "yyyy-MM-dd", null);
            if (datePickerDate.doModal()) {
                final StringBuffer dateStrDate = new StringBuffer();
                _dateCal = datePickerDate.getDateTime();
                _dateFormat.format(_dateCal, dateStrDate, null);
                _editFieldDate.setText(dateStrDate.toString());
            }
View Full Code Here

            break;
        case TIME:
            final DateTimePicker datePickerTime =
                    DateTimePicker
                            .createInstance(_timeCal, null, "hh:mm:ss aa");
            if (datePickerTime.doModal()) {
                final StringBuffer dateStrTime = new StringBuffer();
                _timeCal = datePickerTime.getDateTime();
                _timeFormat.format(_timeCal, dateStrTime, null);
                _editFieldTime.setText(dateStrTime.toString());
            }
View Full Code Here

            break;
        case LONG:
            final DateTimePicker datePickerLong =
                    DateTimePicker.createInstance(_longDateCal,
                            DateFormat.DATE_LONG, DateFormat.TIME_DEFAULT);
            if (datePickerLong.doModal()) {
                final StringBuffer dateStrLong = new StringBuffer();
                _longDateCal = datePickerLong.getDateTime();
                _longDateFormat.format(_longDateCal, dateStrLong, null);
                _editFieldLong.setText(dateStrLong.toString());
            }
View Full Code Here

            break;
        case EXPIRY:
            final DateTimePicker datePickerExpiry =
                    DateTimePicker.createInstance(_expiryDateCal,
                            _expiryDateFormat.toPattern(), null);
            if (datePickerExpiry.doModal()) {
                final StringBuffer dateStrExpiry = new StringBuffer();
                _expiryDateCal = datePickerExpiry.getDateTime();
                _expiryDateFormat.format(_expiryDateCal, dateStrExpiry, null);
                _editFieldExpiry.setText(dateStrExpiry.toString());
            }
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.