Changeset 571
- Timestamp:
- 12/29/09 14:10:12 (2 years ago)
- Location:
- trunk/LogicMail/src/org/logicprobe/LogicMail
- Files:
-
- 3 edited
-
model/MessageNode.java (modified) (2 diffs)
-
model/MessageNodeReader.java (modified) (1 diff)
-
ui/MailboxMessageField.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LogicMail/src/org/logicprobe/LogicMail/model/MessageNode.java
r562 r571 128 128 /** True if the message is up-to-date in the cache */ 129 129 private boolean cached; 130 /** True if the message has cached content available for loading */ 131 private boolean hasCachedContent; 130 132 /** Bit-field set of message flags. */ 131 133 private int flags; … … 656 658 return (messageStructure != null) && (!messageContent.isEmpty()); 657 659 } 660 } 661 662 /** 663 * Sets whether this message has cached content available. 664 * This method should only be called by code which is creating 665 * a message note instance from local cache data. 666 * 667 * @param hasCachedContent True if cached content is available for loading 668 */ 669 public void setCachedContent(boolean hasCachedContent) { 670 this.hasCachedContent = hasCachedContent; 671 } 672 673 /** 674 * Gets whether this message has cached content available. 675 * This is intended to be used as a quick check to determine whether 676 * message content can be loaded from local cache, without actually 677 * having to load that content first. It checks a variable that should 678 * be set when message headers are loaded from cache. 679 * 680 * @return True if cached content is available for loading 681 */ 682 public boolean hasCachedContent() { 683 return hasCachedContent; 658 684 } 659 685 -
trunk/LogicMail/src/org/logicprobe/LogicMail/model/MessageNodeReader.java
r529 r571 231 231 messageNode.setMessageStructure(messageStructure); 232 232 233 if(contentCount > 0) { 234 messageNode.setCachedContent(true); 235 } 236 233 237 return messageNode; 234 238 } -
trunk/LogicMail/src/org/logicprobe/LogicMail/ui/MailboxMessageField.java
r465 r571 155 155 // Draw the message icon 156 156 Bitmap messageIcon = NodeIcons.getIcon(messageNode); 157 graphics.drawBitmap(1, (lineHeight / 2) - (messageIcon.getHeight() / 2), 20, lineHeight*2, messageIcon, 0, 0); 157 int messageIconY = (lineHeight / 2) - (messageIcon.getHeight() / 2); 158 int messageIconW = messageIcon.getWidth(); 159 int messageIconH = messageIcon.getHeight(); 160 graphics.drawBitmap(1, messageIconY, messageIconW, messageIconH, messageIcon, 0, 0); 161 162 if(!messageNode.hasCachedContent() && !messageNode.hasMessageContent()) { 163 graphics.setColor(graphics.getBackgroundColor()); 164 graphics.drawFilledPath( 165 new int[] { 7, 1 + messageIconW, 1 + messageIconW }, 166 new int[] { messageIconY + messageIconH, messageIconY - 6, messageIconY + messageIconH }, 167 null, 168 null); 169 graphics.setColor(originalColor); 170 } 171 158 172 if(attachmentIcon != null) { 159 173 graphics.drawBitmap(1, lineHeight, 20, lineHeight*2, attachmentIcon, 0, 0);
Note: See TracChangeset
for help on using the changeset viewer.
