Last change
on this file since 255 was 253, checked in by Nicholas Riley, 18 years ago |
Add timer in alarm set dialog to update alarm time display. Send events on number picker accept (work around probable bug). Fixed cancel not cancelling if you're using a fixed-time alarm.
|
File size:
619 bytes
|
Rev | Line | |
---|
[253] | 1 | package net.sabi.pester;
|
---|
| 2 |
|
---|
| 3 | import danger.app.Event;
|
---|
| 4 | import danger.ui.NumberEditor;
|
---|
| 5 | import danger.util.DEBUG;
|
---|
| 6 |
|
---|
| 7 | public class EventfulNumberEditor extends NumberEditor {
|
---|
| 8 |
|
---|
| 9 | // Note: because NumberEditor temporarily holds invalid values to
|
---|
| 10 | // ease editing, it doesn't send its event immediately, but after
|
---|
| 11 | // a delay or exit. The one exception is when you exit the
|
---|
| 12 | // picker; it should send an event but doesn't.
|
---|
| 13 |
|
---|
| 14 | public boolean receiveEvent(Event e) {
|
---|
| 15 | boolean retval = super.receiveEvent(e);
|
---|
| 16 | if (e.type == -33268) { // value returned by picker
|
---|
| 17 | getEvent().sendToTarget();
|
---|
| 18 | }
|
---|
| 19 | return retval;
|
---|
| 20 | }
|
---|
| 21 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.