Changeset 286
- Timestamp:
- 07/25/06 08:17:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r278 r286 133 133 p.drawText(x, y, emptyMessage); 134 134 } 135 136 protected void paintItemLine(Pen p, int left, int top, int right, int bottom, 137 boolean focused, Object item) { 138 if (focused) { 139 paintSelection(p, left, top, right, bottom); 140 p.setColor(getStyle().getColor(Style.BACKGROUND_COLOR)); 141 } else { 142 p.setColor(getStyle().getColor(Style.FOREGROUND_COLOR)); 143 } 144 Font font = p.getFont(); 145 int descent = font.getDescent(); 146 int height = descent + font.getAscent(); 147 top = ((top + bottom) / 2 + height / 2) - descent; 148 Alarm alarm = (Alarm)item; 149 left += 2; 150 left += p.drawText(left, top, alarm.getDateTimeString(true)); 151 p.setFont(font.findVariant(null, -1, Font.F_BOLD)); 152 // XXX ellipsize 153 p.drawText(left, top, " " + alarm.getMessage()); 154 p.setFont(font); 155 } 135 156 136 157 public int alarmsSet() {
Note:
See TracChangeset
for help on using the changeset viewer.