Changeset 284
- Timestamp:
- 08/27/08 15:10:31 (16 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Actions.java
r282 r284 410 410 Object[] params = null; 411 411 412 parameters = parameters.trim(); 412 413 // determine correct parameters for constructor 413 414 for (Constructor c : constructors) { 414 415 Class[] paramTypes = c.getParameterTypes(); 415 416 int paramCount = paramTypes.length; 416 if (paramCount > 0 ) {417 if (paramCount > 0 && parameters.length() > 0) { 417 418 params = new Object[paramCount]; 418 419 String[] paramStrings = parameters.split("\\s+"); -
trunk/src/org/expeditee/actions/MailActions.java
r282 r284 1 1 package org.expeditee.actions; 2 3 import java.util.Collection; 2 4 3 5 import javax.mail.Flags.Flag; … … 46 48 return mail; 47 49 } 48 49 public static void getUnreadMail() { 50 MailSession.getInstance().getMail(Flag.SEEN, false, 51 DisplayIO.getCurrentFrame(), FrameMouseActions.getPosition()); 50 51 public static Collection<Text> getRecentMail(int number) { 52 return getMail(null, null, number); 53 } 54 55 public static Collection<Text> getUnreadMail() { 56 return getMail(Flag.SEEN, false, Integer.MAX_VALUE); 52 57 } 53 58 54 public static void getAllMail() { 55 MailSession.getInstance().getMail(null, null, 56 DisplayIO.getCurrentFrame(), FrameMouseActions.getPosition()); 59 public static Collection<Text> getAllMail() { 60 return getMail(null, null, Integer.MAX_VALUE); 61 } 62 63 public static Collection<Text> getMail() { 64 return getAllMail(); 57 65 } 58 66 59 public static void getNewMail() { 60 MailSession.getInstance().getMail(Flag.RECENT, true, 61 DisplayIO.getCurrentFrame(), FrameMouseActions.getPosition()); 67 public static Collection<Text> getNewMail() { 68 return getMail(Flag.RECENT, true, Integer.MAX_VALUE); 69 } 70 71 private static Collection<Text> getMail(Flag flag, Boolean isPresent, int noOfMessages){ 72 Collection<Text> mailItems = MailSession.getInstance().getMail(flag, isPresent, 73 DisplayIO.getCurrentFrame(), FrameMouseActions.getPosition(), noOfMessages); 74 //MessageBay.displayMessage(mailItems.size() + " messages read", Color.green); 75 76 return mailItems; 62 77 } 63 78 … … 80 95 } 81 96 } 97 98 public static String getMailCount() { 99 return getAllMailCount(); 100 } 82 101 83 102 public static String getNewMailCount() { … … 96 115 return; 97 116 } 98 String fromName = frame.getAnnotationValue("fromName"); 99 117 100 118 reply.setActions(null); 101 119 FrameMouseActions.tdfc(reply); 120 121 Frame replyFrame = DisplayIO.getCurrentFrame(); 122 String titleText = frame.getTitle(); 123 //Add Re on the end if it is not already there 124 if (titleText.length() >= 3 125 && !"re:".equals(titleText.substring(0, 3).toLowerCase())) { 126 titleText = "Re: " + titleText; 127 } 128 replyFrame.setTitle(titleText); 129 FrameKeyboardActions.Drop(null, false); 102 130 103 Frame replyFrame = DisplayIO.getCurrentFrame(); 104 replyFrame.setTitle("RE: " + frame.getTitle()); 105 FrameKeyboardActions.Drop(null, false); 131 //Add a link to the original message 106 132 Text original = replyFrame.createNewText("@original"); 107 133 original.setPosition(FrameMouseActions.getPosition()); 108 134 original.setLink(frame.getName()); 109 135 FrameKeyboardActions.Drop(original, false); 110 136 111 137 Text to = replyFrame.createNewText("@to: " + fromAddress); 112 138 to.setPosition(FrameMouseActions.getPosition()); 113 to.addAction("Mail Frame");139 to.addAction("MailTree"); 114 140 FrameKeyboardActions.Drop(to, false); 115 if (fromName != null) { 116 Text toName = replyFrame.createNewText("@toName: " + fromName); 117 toName.setPosition(FrameMouseActions.getPosition()); 118 FrameKeyboardActions.Drop(toName, false); 119 } 141 DisplayIO.setCursorPosition(FrameMouseActions.MouseX, FrameMouseActions.MouseY + 15); 120 142 } 121 143 -
trunk/src/org/expeditee/actions/Misc.java
r282 r284 22 22 import org.expeditee.gui.FrameMouseActions; 23 23 import org.expeditee.gui.MessageBay; 24 import org.expeditee.gui.Reminders; 24 25 import org.expeditee.gui.TimeKeeper; 25 26 import org.expeditee.importer.FrameDNDTransferHandler; 26 import org.expeditee.items.Dot;27 27 import org.expeditee.items.Item; 28 28 import org.expeditee.items.ItemUtils; … … 860 860 return d[0]; 861 861 } 862 863 public static void StopReminder() { 864 Reminders.stop(); 865 } 862 866 } -
trunk/src/org/expeditee/agents/MailTree.java
r282 r284 30 30 31 31 String frameTitle = linkedFrame.getTitle(); 32 sb.append( prefix).append(frameTitle).append('\n')32 sb.append('\n').append(prefix).append(frameTitle).append('\n') 33 33 .append(prefix); 34 for (int i = 0; i < frameTitle.length(); i++) { 35 sb.append('-'); 36 } 37 sb.append("\n\n"); 34 // for (int i = 0; i < frameTitle.length(); i++) { 35 // sb.append('-'); 36 // } 37 sb.append("----------------"); 38 39 sb.append("\n"); 38 40 sb.append(getFrameText(linkedFrame, prefix)); 39 41 } else { … … 46 48 Frame linkedFrame = FrameIO.LoadFrame(original.getAbsoluteLink()); 47 49 if (linkedFrame != null) { 48 sb.append("\n\n").append("Original Message").append( 49 "----------------").append("\n\n"); 50 sb.append("\n\n"); 51 String date = linkedFrame.getAnnotationValue("date"); 52 if (date != null) { 53 sb.append("On ").append(date); 54 } 55 String from = linkedFrame.getAnnotationValue("from"); 56 if (from != null) { 57 if (sb.length() > 0) 58 sb.append(", "); 59 //else 60 // sb.append("> "); 61 sb.append(from); 62 sb.append(" wrote:"); 63 } 64 sb.append("\n\n"); 50 65 sb.append(getFrameText(linkedFrame, ">")); 51 66 } -
trunk/src/org/expeditee/agents/mail/MailSession.java
r282 r284 11 11 import java.util.Properties; 12 12 13 import javax.mail.Address; 13 14 import javax.mail.Authenticator; 14 15 import javax.mail.Folder; … … 22 23 import javax.mail.Transport; 23 24 import javax.mail.Flags.Flag; 25 import javax.mail.Message.RecipientType; 24 26 import javax.mail.event.MessageCountAdapter; 25 27 import javax.mail.event.MessageCountEvent; … … 27 29 import javax.mail.internet.MimeMessage; 28 30 29 import org.expeditee.importer.FrameDNDTransferHandler;30 31 import org.expeditee.gui.AttributeValuePair; 31 32 import org.expeditee.gui.Frame; 32 33 import org.expeditee.gui.FrameCreator; 33 34 import org.expeditee.gui.MessageBay; 35 import org.expeditee.importer.FrameDNDTransferHandler; 34 36 import org.expeditee.items.Item; 35 37 import org.expeditee.items.Text; … … 151 153 try { 152 154 if (!_transport.isConnected()) { 153 MessageBay.displayMessage("Connecting to SMTP server...");155 Text message = MessageBay.displayMessage("Connecting to SMTP server..."); 154 156 _bConnecting = true; 155 157 _transport.connect(); 156 MessageBay.overwriteMessage("SMTP server connected",157 158 message.setText("SMTP server connected"); 159 message.setColor(Color.green); 158 160 } else { 159 161 MessageBay.warningMessage("SMTP server already connected"); … … 165 167 if (_mailServer != null && !_store.isConnected()) { 166 168 try { 167 MessageBay.displayMessage("Connecting to " + _mailServer169 Text message = MessageBay.displayMessage("Connecting to " + _mailServer 168 170 + "..."); 169 171 _store.connect(_mailServer, _username, _password); … … 192 194 for (;;) { 193 195 try { 194 Thread.sleep(1000); // sleep for freq 195 // milliseconds 196 // This is to force the IMAP server to send us 197 // EXISTS notifications 196 Thread.sleep(1000); 197 /* 198 * sleep for freq milliseconds. This is to force 199 * the IMAP server to send us EXISTS 200 * notifications 201 */ 198 202 // TODO: Is synchronisation needed? 199 203 _folder.getMessageCount(); 204 _folder.exists(); 205 //_folder.getUnreadMessageCount(); 200 206 } catch (Exception e) { 207 e.printStackTrace(); 201 208 } 202 209 } … … 204 211 }.start(); 205 212 206 MessageBay.overwriteMessage("Connection complete", Color.GREEN); 213 message.setText("Connection complete"); 214 message.setColor(Color.GREEN); 207 215 208 216 displayUnreadMailCount(); … … 217 225 218 226 private void displayUnreadMailCount() { 219 Text text = new Text(-1, getUnreadCount() + " unread message" 220 + (getUnreadCount() == 1 ? "" : "s"), Color.BLUE, null); 221 text.addAction("getUnreadMail"); 227 int unreadCount = getUnreadCount(); 228 Text text = new Text(-1, unreadCount + " unread message" 229 + (unreadCount == 1 ? "" : "s"), Color.BLUE, null); 230 text.addAction("getRecentMail " + unreadCount); 222 231 MessageBay.displayMessage(text); 223 232 } … … 236 245 } 237 246 238 return _theMailSession.sendText(to, cc, bcc, subject, body, attachments); 247 return _theMailSession 248 .sendText(to, cc, bcc, subject, body, attachments); 239 249 } 240 250 … … 263 273 // -- Create a new message -- 264 274 Message msg = new MimeMessage(_session); 265 275 266 276 // -- Set the FROM and TO fields -- 267 277 msg.setFrom(new InternetAddress(_address)); … … 399 409 * @return 400 410 */ 401 public Collection<Item> getMail(Flag flag, Boolean isPresent, Frame frame, 402 Point point) { 403 Collection<Item> mailItems = new LinkedList<Item>(); 411 public Collection<Text> getMail(Flag flag, Boolean isPresent, Frame frame, 412 Point point, int numberOfMessages) { 413 if (_folder == null) 414 return null; 415 416 Collection<Text> mailItems = new LinkedList<Text>(); 404 417 // -- Get the message wrappers and process them -- 405 418 Message[] msgs; 406 419 try { 407 420 msgs = _folder.getMessages(); 408 for (int msgNum = 0; msgNum < msgs.length; msgNum++) { 421 422 int start = Math.max(msgs.length - numberOfMessages, 0); 423 424 for (int msgNum = start; msgNum < msgs.length; msgNum++) { 409 425 if (flag == null 410 426 || msgs[msgNum].getFlags().contains(flag) == isPresent) { 411 Item newItem = readMessage(msgs[msgNum], msgNum, frame,427 Text newItem = readMessage(msgs[msgNum], msgNum + 1, frame, 412 428 point); 413 429 if (newItem != null) { … … 421 437 e.printStackTrace(); 422 438 } 439 423 440 return mailItems; 424 441 } 425 442 426 private ItemreadMessage(final Message message, final int messageNo,443 private Text readMessage(final Message message, final int messageNo, 427 444 final Frame frame, final Point point) { 428 445 429 446 final Text source = FrameDNDTransferHandler.importString( 430 " Loading message " + messageNo, point);447 "Reading message " + messageNo + "...", point); 431 448 432 449 new Thread() { … … 439 456 .getFramesetName(), frame.path, subject, false); 440 457 458 frames.addText("@date: " + message.getSentDate(), null, 459 null, null, false); 460 441 461 // Get the header information 442 462 String from = ((InternetAddress) message.getFrom()[0]) 443 .getPersonal(); 444 if (from != null) { 445 frames.addText("@fromName: " + from, null, null, null, 446 false); 447 } 448 from = ((InternetAddress) message.getFrom()[0]) 449 .getAddress(); 463 .toString(); 450 464 Text fromAddressItem = frames.addText("@from: " + from, 451 465 null, null, null, false); 452 466 453 Text reply = frames.addText("@reply" + from, null, null, 454 null, false); 455 reply.setPosition(10 + fromAddressItem.getX() 456 + fromAddressItem.getBoundsWidth(), fromAddressItem 457 .getY()); 467 addRecipients(message, frames, _address, RecipientType.TO, 468 "@to: "); 469 addRecipients(message, frames, null, RecipientType.CC, 470 "@cc: "); 471 472 // Read reply to addresses 473 Text reply = addAddresses(message, frames, from, message 474 .getReplyTo(), "@replyTo: "); 475 /* 476 * If the only person to reply to is the person who sent the 477 * mail add a tag that just says reply 478 */ 479 if (reply == null) { 480 reply = frames.addText("@reply", null, null, null, 481 false); 482 reply.setPosition(10 + fromAddressItem.getX() 483 + fromAddressItem.getBoundsWidth(), 484 fromAddressItem.getY()); 485 } 486 reply.addAction("reply"); 487 // frames.addSpace(15); 458 488 459 489 // -- Get the message part (i.e. the message itself) -- … … 491 521 MessageBay.errorMessage("Error reading mail: " 492 522 + e.getMessage()); 523 e.printStackTrace(); 493 524 } 494 525 } … … 546 577 return _folder; 547 578 } 579 580 /** 581 * @param message 582 * @param frames 583 * @param type 584 * @throws MessagingException 585 */ 586 private Text addAddresses(final Message message, final FrameCreator frames, 587 final String excludeAddress, final Address[] addresses, 588 String typeTag) throws MessagingException { 589 if (addresses == null) 590 return null; 591 592 StringBuffer sb = new StringBuffer(); 593 boolean foundOtherRecipients = false; 594 for (Address addy : addresses) { 595 // Only show the to flag if this message was sent to 596 // other people 597 if (excludeAddress == null 598 || !addy.toString().toLowerCase().contains( 599 excludeAddress.toLowerCase())) { 600 foundOtherRecipients = true; 601 } 602 if (sb.length() > 0) { 603 sb.append(", "); 604 } 605 sb.append(addy.toString()); 606 } 607 Text reply = null; 608 if (foundOtherRecipients) { 609 reply = frames.addText(typeTag + sb.toString(), null, null, null, 610 false); 611 } 612 return reply; 613 } 614 615 private Text addRecipients(final Message message, 616 final FrameCreator frames, String excludeAddress, 617 RecipientType type, String typeTag) throws MessagingException { 618 // Read and display all the recipients of the message 619 Address[] toRecipients = message.getRecipients(type); 620 return addAddresses(message, frames, excludeAddress, toRecipients, 621 typeTag); 622 } 548 623 } -
trunk/src/org/expeditee/gui/FrameCreator.java
r282 r284 7 7 8 8 public class FrameCreator { 9 private int START_Y = 40; 10 11 private final static int START_X = 20; 9 public static final int INDENT_FROM_TITLE = 20; 10 11 private int START_Y; 12 13 private int START_X; 12 14 13 15 private Frame _current = null; 14 16 15 private int _lastX = START_X;17 private int _lastX; 16 18 17 19 private int _maxX = 0; 18 20 19 private int _lastY = START_Y;21 private int _lastY; 20 22 21 23 // Master copy of next & previous links … … 23 25 24 26 private Item _Mprev; 25 27 26 28 private Item _Mfirst; 27 29 … … 60 62 Float bottom) { 61 63 Text button = new Text(text); 64 62 65 button.setBackgroundColor(Color.LIGHT_GRAY); 63 66 button.setBorderColor(Color.DARK_GRAY); … … 73 76 74 77 button.updatePolygon(); 75 78 76 79 return button; 77 80 } … … 82 85 _Mnext = createButton("@Next", null, null, 10F, 15F); 83 86 84 _Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth() + _Mnext.getAnchorRight() + 20F, 15F); 85 86 _Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth() + _Mprev.getAnchorRight() + 20F, 15F); 87 87 _Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth() 88 + _Mnext.getAnchorRight() + 20F, 15F); 89 90 _Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth() 91 + _Mprev.getAnchorRight() + 20F, 15F); 92 88 93 Frame toUse = null; 89 94 try { … … 97 102 resetGlobals(toUse); 98 103 _firstFrame = toUse; 104 99 105 // set positions of next\prev frame links 100 106 // _Mnext.setPosition(FrameGraphics.getMaxSize().width - 100, … … 118 124 119 125 // add link to previous frame 120 _prev = addPreviousButton(newFrame, _current.getName()); 126 _prev = addPreviousButton(newFrame, _current.getName()); 121 127 122 128 // add link to new frame 123 _next = addNextButton(_current, newFrame.getName());124 125 //add link to new frame126 addFirstButton(newFrame, _firstFrame.getName());127 129 _next = addNextButton(_current, newFrame.getName()); 130 131 // add link to new frame 132 addFirstButton(newFrame, _firstFrame.getName()); 133 128 134 FrameIO.SaveFrame(_current, false); 129 135 … … 138 144 private void resetGlobals(Frame toUse) { 139 145 Text title = toUse.getTitleItem(); 140 START_Y = title.getY() + title.getBoundsHeight(); 146 START_X = INDENT_FROM_TITLE + title.getX(); 147 START_Y = getYStart(title); 141 148 _lastY = START_Y; 142 149 _lastX = START_X; … … 201 208 public Text addText(String toAdd, Color c, String link, String action, 202 209 boolean bSave) { 203 Text text = _current.createNewText( );204 text.setText(toAdd);205 text.setColor(c);210 Text text = _current.createNewText(toAdd); 211 if (c != null) 212 text.setColor(c); 206 213 text.setLink(link); 207 214 text.setAction(action); 208 215 209 216 addItem(text, bSave); 210 217 211 218 return text; 212 219 } … … 235 242 return addButton(_Mnext, current, link); 236 243 } 237 244 238 245 public Item addPreviousButton(Frame current, String link) { 239 246 return addButton(_Mprev, current, link); 240 247 } 241 248 242 249 public Item addFirstButton(Frame current, String link) { 243 250 return addButton(_Mfirst, current, link); 244 251 } 245 252 246 253 public Item addButton(Item template, Frame current, String link) { 247 254 // add link to new frame … … 250 257 previousButton.setLink(link); 251 258 current.addItem(previousButton); 252 259 253 260 return previousButton; 254 261 } 262 263 public void addSpace(int space) { 264 _lastY += space; 265 } 266 267 public static int getYStart(Item title) { 268 return title.getY() + title.getBoundsHeight(); 269 } 255 270 } -
trunk/src/org/expeditee/gui/FrameKeyboardActions.java
r282 r284 1127 1127 * indicate the cursor is in free space. 1128 1128 */ 1129 public static voidDrop(Item toDropFrom, boolean bPasting) {1129 public static boolean Drop(Item toDropFrom, boolean bPasting) { 1130 1130 try { 1131 1131 FrameUtils.setLastEdited(null); … … 1135 1135 // if a line is being rubber-banded, this is a no-op 1136 1136 if (Frame.rubberbandingLine()) 1137 return ; // No-op1137 return false; // No-op 1138 1138 1139 1139 // if the cursor is in free space then the drop will happen from the … … 1147 1147 if (toDropFrom == null) { 1148 1148 MessageBay.errorMessage("No item could be found to drop from"); 1149 return ;1149 return false; 1150 1150 } 1151 1151 … … 1153 1153 MessageBay 1154 1154 .displayMessage("Only text items can be dropped from"); 1155 return ;1155 return false; 1156 1156 } 1157 1157 … … 1162 1162 if (column == null) { 1163 1163 MessageBay.errorMessage("No column found to align items to"); 1164 return ;1164 return false; 1165 1165 } 1166 1166 … … 1173 1173 1174 1174 Text dummyItem = null; 1175 1176 1175 if (!bPasting && FreeItems.textOnlyAttachedToCursor()) { 1177 1176 dummyItem = (Text) FreeItems.getItemAttachedToCursor(); … … 1182 1181 dummyItem.setText(newItemText + dummyItem.getText()); 1183 1182 } 1183 1184 1184 dummyItem = createText(); 1185 1185 if (FreeItems.textOnlyAttachedToCursor()) { … … 1199 1199 if (column.size() == 0) { 1200 1200 Frame current = DisplayIO.getCurrentFrame(); 1201 Item itemTemplate = current.getItemTemplate(); 1202 int xPos = title.getX() + 25; 1203 int yPos = title.getY() + title.getBoundsHeight() 1204 + itemTemplate.getBoundsHeight(); 1201 //Item itemTemplate = current.getItemTemplate(); 1202 int xPos = title.getX() + FrameCreator.INDENT_FROM_TITLE; 1203 int yPos = FrameCreator.getYStart(title); 1205 1204 // Check for @start on the zero frame 1206 1205 Frame zero = FrameIO.LoadFrame(current.getFramesetName() + '0'); … … 1281 1280 DisplayIO.setCursorPosition(DisplayIO.getMouseX(), 1282 1281 FrameMouseActions.getY()); 1283 return ;1282 return false; 1284 1283 } 1285 1284 } … … 1317 1316 // MessageBay.errorMessage(e.getMessage()); 1318 1317 e.printStackTrace(); 1319 } 1318 return false; 1319 } 1320 return true; 1320 1321 } 1321 1322 -
trunk/src/org/expeditee/gui/FrameMouseActions.java
r282 r284 2559 2559 2560 2560 public static void pickup(Collection<Item> toGrab) { 2561 if(toGrab == null || toGrab.size() == 0) 2562 return; 2563 2561 2564 boolean bReparse = false; 2562 2565 Frame frame = DisplayIO.getCurrentFrame(); -
trunk/src/org/expeditee/gui/FrameUtils.java
r282 r284 580 580 else if (attribute.equals("mailsettings")) 581 581 MailSession.init(item.getChild()); 582 else if (attribute.equals("reminders")) 583 Reminders.init(item.getChild()); 582 584 else if (attribute.equals("antialias")) 583 585 UserSettings.AntiAlias = avp.getBooleanValue(); -
trunk/src/org/expeditee/gui/MessageBay.java
r247 r284 250 250 } 251 251 252 private static voiddisplayMessage(String message, String link,252 private static Text displayMessage(String message, String link, 253 253 List<String> actions, Color color) { 254 displayMessage(message, link, actions, color, true); 255 } 256 257 private static void displayMessage(String message, String link, 254 return displayMessage(message, link, actions, color, true); 255 } 256 257 public static Text displayMessage(String message, String link, 258 Color color, boolean displayAlways, String action) { 259 List<String> actions = new LinkedList<String>(); 260 actions.add(action); 261 return displayMessage(message, link, actions, color, displayAlways); 262 } 263 264 public static Text displayMessage(String message, String link, 258 265 List<String> actions, Color color, boolean displayAlways) { 259 266 … … 265 272 266 273 if (_supressMessages) 267 return ;274 return null; 268 275 269 276 if (!displayAlways && message.equals(_lastMessage)) { 270 277 Misc.beep(); 271 return ;278 return null; 272 279 } 273 280 _lastMessage = message; … … 301 308 if (g != null) 302 309 refresh(false, g, Item.DEFAULT_BACKGROUND); 303 return ;310 return _messages[i]; 304 311 } 305 312 … … 329 336 330 337 refresh(false, FrameGraphics.createGraphics(), Item.DEFAULT_BACKGROUND); 338 339 return last; 331 340 } 332 341 … … 363 372 * the message to be displayed 364 373 */ 365 public static voidlinkedErrorMessage(String message) {374 public static Text linkedErrorMessage(String message) { 366 375 if (_supressMessages) 367 return ;376 return null; 368 377 Misc.beep(); 369 378 String[] tokens = message.split(Text.FRAME_NAME_SEPARATOR); … … 371 380 if (tokens.length > 1) 372 381 link = tokens[tokens.length - 1]; 373 displayMessage(message, link, null, ERROR_COLOR);374 } 375 376 public static voiderrorMessage(String message) {382 return displayMessage(message, link, null, ERROR_COLOR); 383 } 384 385 public static Text errorMessage(String message) { 377 386 if (_supressMessages) 378 return ;387 return null; 379 388 Misc.beep(); 380 displayMessage(message, null, null, ERROR_COLOR, false);389 return displayMessage(message, null, null, ERROR_COLOR, false); 381 390 } 382 391 … … 388 397 * The message to display to the user in the message area 389 398 */ 390 public static voiddisplayMessage(String message) {391 displayMessageAlways(message);392 } 393 394 public static voiddisplayMessageOnce(String message) {395 displayMessage(message, null, null, Color.BLACK, false);396 } 397 398 public static voiddisplayMessage(String message, Color textColor) {399 displayMessage(message, null, null, textColor);399 public static Text displayMessage(String message) { 400 return displayMessageAlways(message); 401 } 402 403 public static Text displayMessageOnce(String message) { 404 return displayMessage(message, null, null, Color.BLACK, false); 405 } 406 407 public static Text displayMessage(String message, Color textColor) { 408 return displayMessage(message, null, null, textColor); 400 409 // Misc.Beep(); 401 410 } 402 411 403 public static voiddisplayMessage(Text message) {404 displayMessage(message.getFirstLine(), message.getLink(), message412 public static Text displayMessage(Text message) { 413 return displayMessage(message.getFirstLine(), message.getLink(), message 405 414 .getAction(), message.getColor()); 406 415 // Misc.Beep(); 407 416 } 408 417 409 public static voiddisplayMessageAlways(String message) {410 displayMessage(message, null, null, Color.BLACK);418 public static Text displayMessageAlways(String message) { 419 return displayMessage(message, null, null, Color.BLACK); 411 420 // Misc.Beep(); 412 421 } 413 422 414 public static voidwarningMessage(String message) {415 displayMessage(message, null, null, Color.MAGENTA);423 public static Text warningMessage(String message) { 424 return displayMessage(message, null, null, Color.MAGENTA); 416 425 // Misc.Beep(); 417 426 } -
trunk/src/org/expeditee/io/DefaultFrameWriter.java
r226 r284 213 213 214 214 for (Item i : getItemsToWrite(toWrite)) { 215 if (_stop) 215 if (_stop){ 216 216 return; 217 } 217 218 writeItem(i); 218 219 } -
trunk/src/org/expeditee/io/DefaultFramesetWriter.java
r282 r284 33 33 } 34 34 } 35 36 @Override 37 protected String finaliseFrame() throws IOException { 38 return "Frameset" + finalise(); 39 } 35 40 } -
trunk/src/org/expeditee/items/Item.java
r282 r284 1100 1100 if (returnValue instanceof Item) { 1101 1101 Misc.attachToCursor(((Item) returnValue).getAllConnected()); 1102 } else if (returnValue instanceof Collection) { 1103 try { 1104 Misc.attachToCursor((Collection) returnValue); 1105 } catch (Exception e) { 1106 e.printStackTrace(); 1107 } 1102 1108 } else { 1103 1109 Misc.attachStatsToCursor(returnValue.toString()); … … 1546 1552 for (Item i : getAllConnected()) { 1547 1553 if (i instanceof Line) { 1548 ((Line) i).invalidateCommonTrait(trait);1554 ((Line) i).invalidateCommonTrait(trait); 1549 1555 } 1550 1556 } … … 1670 1676 line.updatePolygon(); 1671 1677 } 1672 1673 //for (Item item : getAllConnected()) {1674 //item.updatePolygon();1675 //}1678 1679 // for (Item item : getAllConnected()) { 1680 // item.updatePolygon(); 1681 // } 1676 1682 1677 1683 invalidateCommonTraitForAll(ItemAppearence.PostMoved); -
trunk/src/org/expeditee/items/widgets/charts/TimeSeries.java
r247 r284 205 205 * @throws ParseException 206 206 */ 207 p rivateDate parseDate(String dateString) throws ParseException {207 public static Date parseDate(String dateString) throws ParseException { 208 208 // Convert the attribute into a date 209 209 DateFormat df = null;
Note:
See TracChangeset
for help on using the changeset viewer.