Changeset 238 for trunk/hiptop/pester
- Timestamp:
- 07/08/06 18:37:31 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester
-
Property svn:ignore
set to
work
-
Property svn:ignore
set to
-
trunk/hiptop/pester/locale/en_US/Pester.rsrc
r237 r238 64 64 65 65 endScreen 66 67 menu ID_PERIOD_UNITS_MENU 68 menuItem 69 title = "second(s)" 70 id = 1 71 menuItem 72 title = "minute(s)" 73 id = 60 74 menuItem 75 title = "hour(s)" 76 id = 3600 77 endMenu 78 66 79 dialog ID_ALARM_SET_DIALOG 67 68 80 title = "Set Alarm" 69 81 showCancel … … 88 100 initialFocus 89 101 102 radioButton 103 title = "In" 104 id = ID_IN_BUTTON 105 positionBelow = ID_MESSAGE_FIELD : 5 106 alignRight = ID_MESSAGE_LABEL 107 108 numberEditor 109 # width = 50 110 id = ID_PERIOD_FIELD 111 dontWrap 112 minValue = 1 113 maxValue = 99 114 alignBaseline = ID_IN_BUTTON 115 positionToRight = ID_IN_BUTTON : 3 116 117 popupMenu 118 menu = ID_PERIOD_UNITS_MENU 119 positionToRight = ID_PERIOD_FIELD : 3 120 121 radioButton 122 title = "At" 123 id = ID_AT_BUTTON 124 positionBelow = ID_PERIOD_FIELD : 5 125 alignRight = ID_MESSAGE_LABEL 126 127 dateEditor 128 id = ID_TIME_EDITOR 129 longTimeFormat 130 positionToRight = ID_AT_BUTTON : 3 131 alignBaseline = ID_AT_BUTTON 132 133 dateEditor 134 id = ID_DATE_EDITOR 135 positionToRight = ID_TIME_EDITOR : 1 136 alignBaseline = ID_AT_BUTTON 137 138 datePicker 139 id = ID_DATE_PICKER 140 positionToRight = ID_DATE_EDITOR : 1 141 alignTop = ID_DATE_EDITOR 142 143 button 144 id = ID_DISCARD_ALARM_BUTTON 145 position = buttonTop2 146 title = "Discard" 147 event = EVENT_DISCARD_ALARM 148 90 149 button 91 150 position = buttonBottom1 -
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.