Last change
on this file since 250 was 250, checked in by Nicholas Riley, 18 years ago |
Refactor editing, coalese Alarms and alarm list. Try (and fail) to recognize exit from alarm time editor.
|
File size:
967 bytes
|
Rev | Line | |
---|
[250] | 1 | package net.sabi.pester;
|
---|
| 2 |
|
---|
| 3 | import danger.app.Event;
|
---|
| 4 | import danger.ui.DateTimeEditor;
|
---|
| 5 | import danger.util.DEBUG;
|
---|
| 6 |
|
---|
| 7 | public class AlarmTimeEditor extends DateTimeEditor
|
---|
| 8 | implements Resources, Commands {
|
---|
| 9 |
|
---|
| 10 | public void takeFocus(boolean inFromAbove) {
|
---|
| 11 | DEBUG.p("taking focus" + (inFromAbove ? " in from above" : ""));
|
---|
| 12 | super.takeFocus(inFromAbove);
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | // XXX this is not working because we gain/lose focus moving through fields
|
---|
| 16 | public void loseFocus() {
|
---|
| 17 | DEBUG.p("losing focus");
|
---|
| 18 | if (isFocused()) DEBUG.p("had focus");
|
---|
| 19 | DEBUG.p("parent leaf was " + getParentContainer().getFocusedLeaf());
|
---|
| 20 | DEBUG.p("my leaf was " + getFocusedLeaf());
|
---|
| 21 | super.loseFocus();
|
---|
| 22 | if (isFocused()) DEBUG.p("still have focus");
|
---|
| 23 | DEBUG.p("parent leaf is " + getParentContainer().getFocusedLeaf());
|
---|
| 24 | DEBUG.p("my leaf is " + getFocusedLeaf());
|
---|
| 25 | DEBUG.p("sibling is " + getSibling());
|
---|
| 26 | Event event = getEvent();
|
---|
| 27 | event.type = EVENT_TIME_EDITOR_LOST_FOCUS;
|
---|
| 28 | event.sendToTarget();
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.