Changeset 292


Ignore:
Timestamp:
07/26/06 03:57:59 (18 years ago)
Author:
Nicholas Riley
Message:

Ellipsize alarm text.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hiptop/pester/net/sabi/pester/AlarmListView.java

    r289 r292  
    1212import danger.util.ActiveList;
    1313import danger.util.DEBUG;
     14import danger.util.StringUtils;
    1415
    1516public class AlarmListView extends ActiveListView
     
    151152        left += 2;
    152153        left += p.drawText(left, top, alarm.getDateTimeString(true));
    153         p.setFont(font.findVariant(null, -1, Font.F_BOLD | Font.F_OUTLINE));
    154         // XXX ellipsize
    155         p.drawText(left, top, " " + alarm.getMessage());
     154        Font msgFont = font.findVariant(null, -1, Font.F_BOLD | Font.F_OUTLINE);
     155        p.setFont(msgFont);
     156        StringUtils.drawDisplayString(p, left, top, " " + alarm.getMessage(),
     157                                      (right - left - 2), msgFont);
    156158        // restore
    157159        p.setTextOutlineColor(oldOutlineColor);
Note: See TracChangeset for help on using the changeset viewer.