Changeset 239 for trunk/hiptop/pester
- Timestamp:
- 07/08/06 19:28:37 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/locale/en_US/Pester.rsrc
r238 r239 100 100 initialFocus 101 101 102 radioButton 103 title = "In" 104 id = ID_IN_BUTTON 105 positionBelow = ID_MESSAGE_FIELD : 5 106 alignRight = ID_MESSAGE_LABEL 102 groupBox 103 id = ID_IN_GROUP 104 onOffControl = ID_IN_BUTTON 105 onOffControlLeftPosition 106 positionBelow = ID_MESSAGE_LABEL : 7 107 fillToRight = 0 108 height = 22 107 109 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 110 radioButton 111 id = ID_IN_BUTTON 112 title = "In" 113 event = EVENT_IN 114 115 numberEditor 116 id = ID_PERIOD_FIELD 117 dontWrap 118 minValue = 1 119 maxValue = 99 120 alignBaseline = ID_IN_BUTTON 121 positionToRight = ID_IN_BUTTON : 1 122 123 popupMenu 124 id = ID_PERIOD_UNITS_POPUP 125 menu = ID_PERIOD_UNITS_MENU 126 alignBaseline = ID_PERIOD_FIELD 127 positionToRight = ID_PERIOD_FIELD : 1 128 129 checkBox 130 id = ID_PERIOD_REPEAT_BUTTON 131 title = "Repeat" 132 alignBaseline = ID_PERIOD_UNITS_POPUP 133 positionToRight = ID_PERIOD_UNITS_POPUP : 3 134 endGroupBox 116 135 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 136 groupBox 137 id = ID_AT_GROUP 138 onOffControl = ID_AT_BUTTON 139 onOffControlLeftPosition 140 positionBelow = ID_IN_GROUP : 3 141 fillToRight = 0 142 height = 22 137 143 138 datePicker 139 id = ID_DATE_PICKER 140 positionToRight = ID_DATE_EDITOR : 1 141 alignTop = ID_DATE_EDITOR 142 144 radioButton 145 title = "At" 146 id = ID_AT_BUTTON 147 event = EVENT_AT 148 149 dateEditor 150 id = ID_TIME_EDITOR 151 longTimeFormat 152 alignBaseline = ID_AT_BUTTON 153 positionToRight = ID_AT_BUTTON : 1 154 155 dateEditor 156 id = ID_DATE_EDITOR 157 positionToRight = ID_TIME_EDITOR : 1 158 alignBaseline = ID_TIME_EDITOR 159 160 datePicker 161 id = ID_DATE_PICKER 162 positionToRight = ID_DATE_EDITOR : 1 163 alignTop = ID_DATE_EDITOR 164 endGroupBox 165 143 166 button 144 167 id = ID_DISCARD_ALARM_BUTTON -
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r237 r239 13 13 // persisted 14 14 private String mMessage; 15 private boolean mUsesPeriod;15 private int mType; 16 16 private long mPeriod; 17 17 private Date mDate; … … 31 31 } 32 32 public boolean getUsesPeriod() { 33 return m UsesPeriod;33 return mType != TYPE_DATE; 34 34 } 35 35 public Date getDate() { … … 40 40 mMessage = message; 41 41 } 42 public void setPeriod(long period ) {43 m UsesPeriod = true;42 public void setPeriod(long period, boolean repeating) { 43 mType = repeating ? TYPE_PERIODIC_REPEATING : TYPE_PERIODIC; 44 44 mPeriod = period; 45 45 } 46 46 public void setDate(Date date) { 47 m UsesPeriod = false;47 mType = TYPE_DATE; 48 48 mDate = date; 49 49 } … … 58 58 dataStream.writeLong(mPeriod); 59 59 dataStream.writeInt(mDate.getUnixTimeGMT()); 60 dataStream.write Boolean(mUsesPeriod);60 dataStream.writeInt(mType); 61 61 dataStream.flush(); 62 62 return byteStream.toByteArray(); … … 78 78 mMessage = dataStream.readUTF(); 79 79 mPeriod = dataStream.readLong(); 80 m UsesPeriod = dataStream.readBoolean();80 mType = dataStream.readInt(); 81 81 } catch (Exception e) { 82 82 // XXX do something … … 96 96 } 97 97 98 public static final int TYPE_PERIODIC = 0; 99 public static final int TYPE_PERIODIC_REPEATING = 1; 100 public static final int TYPE_DATE = 2; 101 98 102 public static final int STATUS_INVALID = 0; 99 103 public static final int STATUS_EDITING = 1; -
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r238 r239 6 6 import danger.ui.Button; 7 7 import danger.ui.DialogWindow; 8 import danger.ui.RadioButton; 8 9 import danger.ui.Rect; 9 10 import danger.ui.TypeAheadTextField; … … 23 24 private TypeAheadTextField sMessageField; 24 25 private Button sDiscardAlarmButton; 26 private RadioButton sInButton, sAtButton; 25 27 26 28 private static Alarm sFocusedAlarm, sEditingAlarm; … … 38 40 sMessageField = (TypeAheadTextField)sEditWindow.getDescendantWithID(ID_MESSAGE_FIELD); 39 41 sEditWindow.disableBottomRightButtonOnEmptyField(sMessageField); 42 sInButton = (RadioButton)sEditWindow.getDescendantWithID(ID_IN_BUTTON); 43 sAtButton = (RadioButton)sEditWindow.getDescendantWithID(ID_AT_BUTTON); 40 44 sDiscardAlarmButton = (Button)sEditWindow.getDescendantWithID(ID_DISCARD_ALARM_BUTTON); 41 45 … … 87 91 sAlarmList.removeItem(sFocusedAlarm); 88 92 return true; 93 case EVENT_IN: 94 sAtButton.setValue(0); 95 return true; 96 case EVENT_AT: 97 sInButton.setValue(0); 98 return true; 89 99 } 90 100 return super.receiveEvent(e);
Note:
See TracChangeset
for help on using the changeset viewer.