source: trunk/hiptop/pester/net/sabi/pester/EventfulNumberEditor.java@ 253

Last change on this file since 253 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
Line 
1package net.sabi.pester;
2
3import danger.app.Event;
4import danger.ui.NumberEditor;
5import danger.util.DEBUG;
6
7public 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.