Changeset 244 for trunk/hiptop/pester/net/sabi/pester
- Timestamp:
- 07/09/06 03:57:15 (18 years ago)
- Location:
- trunk/hiptop/pester/net/sabi/pester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r243 r244 6 6 import java.io.DataOutputStream; 7 7 import danger.app.Application; 8 import danger.audio.RingToneObject; 8 9 import danger.internal.Date; 9 10 import danger.util.LocaleUtils; … … 22 23 private int mPeriod; // XXX rename to 'interval' 23 24 private Date mDate; 25 private RingToneObject mAlert; 24 26 25 27 // transient … … 47 49 return mDate; 48 50 } 51 public RingToneObject getAlert() { 52 return mAlert; 53 } 49 54 50 55 public void setMessage(String message) { … … 58 63 mType = TYPE_DATE; 59 64 mDate = date; 65 } 66 public void setAlert(RingToneObject alert) { 67 mAlert = alert.isValid() ? alert : null; 60 68 } 61 69 -
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r243 r244 3 3 import danger.app.Application; 4 4 import danger.app.Event; 5 import danger.audio.ToneClass; 6 import danger.audio.ToneRights; 7 5 8 import danger.internal.Date; 6 9 import danger.ui.ActiveListView; … … 16 19 import danger.ui.RadioButton; 17 20 import danger.ui.Rect; 21 import danger.ui.RingTonePicker; 18 22 import danger.ui.TypeAheadTextField; 19 23 import danger.util.ActiveList; … … 39 43 private DateTimeEditor sTimeEditor, sDateEditor; 40 44 private DatePicker sDatePicker; 45 private RingTonePicker sAlertPicker; 41 46 private Button sDiscardAlarmButton, sSetAlarmButton; 42 47 … … 64 69 sDateEditor = (DateTimeEditor)sEditWindow.getDescendantWithID(ID_DATE_EDITOR); 65 70 sDatePicker = (DatePicker)sEditWindow.getDescendantWithID(ID_DATE_PICKER); 71 sAlertPicker = (RingTonePicker)sEditWindow.getDescendantWithID(ID_ALERT_PICKER); 66 72 sSetAlarmButton = (Button)sEditWindow.getDescendantWithID(ID_SET_ALARM_BUTTON); 67 73 sDiscardAlarmButton = (Button)sEditWindow.getDescendantWithID(ID_DISCARD_ALARM_BUTTON); 68 74 sInButton.setValue(1); 69 75 sDateEditor.limitToDangerEpoch(); 76 sAlertPicker.setGroupFilter(ToneClass.FOREGROUND | ToneClass.BACKGROUND | 77 ToneClass.CUSTOM); 78 sAlertPicker.setRights(ToneRights.FULL); 79 sAlertPicker.setCanRecord(true); 70 80 71 81 super.onDecoded(); … … 118 128 } 119 129 constrainDate(); 130 sAlertPicker.setRingTone(sEditingAlarm.getAlert()); 120 131 sEditWindow.show(); 121 132 } … … 154 165 sEditingAlarm.setDate(editingDate()); 155 166 } 167 sEditingAlarm.setAlert(sAlertPicker.getRingTone()); 156 168 // schedule before adding so the tooltip is correct 157 169 sEditingAlarm.schedule(); -
trunk/hiptop/pester/net/sabi/pester/Pester.java
r243 r244 25 25 alert.setTitle(alert.getTitle() + ": " + alarm.getDateTimeString()); 26 26 alert.setMessage(alarm.getMessage()); 27 // alert.setMessageFormatDate(alarm.getDate());27 alert.setShowTone(alarm.getAlert()); 28 28 alert.show(AlertWindow.SYSTEM_ALERT_TYPE_ALARM); 29 29 sAlarmStack.push(alarm);
Note:
See TracChangeset
for help on using the changeset viewer.