Changeset 238 for trunk/hiptop/pester/net/sabi
- Timestamp:
- 07/08/06 18:37:31 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester
-
Property svn:ignore
set to
work
-
Property svn:ignore
set to
-
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r237 r238 4 4 import danger.app.Event; 5 5 import danger.ui.ActiveListView; 6 import danger.ui.Button; 6 7 import danger.ui.DialogWindow; 7 8 import danger.ui.Rect; … … 21 22 private static DialogWindow sEditWindow; 22 23 private TypeAheadTextField sMessageField; 24 private Button sDiscardAlarmButton; 23 25 24 26 private static Alarm sFocusedAlarm, sEditingAlarm; … … 36 38 sMessageField = (TypeAheadTextField)sEditWindow.getDescendantWithID(ID_MESSAGE_FIELD); 37 39 sEditWindow.disableBottomRightButtonOnEmptyField(sMessageField); 40 sDiscardAlarmButton = (Button)sEditWindow.getDescendantWithID(ID_DISCARD_ALARM_BUTTON); 38 41 39 42 super.onDecoded(); … … 50 53 } 51 54 52 void editAlarm(Alarm alarm ) {55 void editAlarm(Alarm alarm, boolean asNew) { 53 56 sEditingAlarm = alarm; 54 57 alarm.beginEditing(); 55 58 sMessageField.setText(sEditingAlarm.getMessage()); 59 if (asNew) { 60 sDiscardAlarmButton.hide(); 61 } else { 62 sDiscardAlarmButton.show(); 63 } 64 boolean usesPeriod = sEditingAlarm.getUsesPeriod(); 65 56 66 sEditWindow.show(); 57 67 } … … 60 70 switch (e.type) { 61 71 case EVENT_NEW_ALARM: 62 editAlarm(new Alarm() );72 editAlarm(new Alarm(), true); 63 73 return true; 64 74 case EVENT_SET_ALARM: … … 83 93 protected void itemActivated(Object item) { 84 94 // XXX deschedule alarm 85 editAlarm(sFocusedAlarm );95 editAlarm(sFocusedAlarm, false); 86 96 } 87 97 protected void itemFocused(Object item) {
Note:
See TracChangeset
for help on using the changeset viewer.