Changeset 409
- Timestamp:
- 11/19/08 10:07:46 (16 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Simple.java
r408 r409 329 329 try { 330 330 if (current != null) { 331 DisplayIO.addToBack(current.getParent()); 331 /* 332 * Changed the code from the line below because it caused 333 * problems when the "RunFrame" item was on the zero frame 334 */ 335 // DisplayIO.addToBack(current.getParent()); 336 DisplayIO.addToBack(DisplayIO.getCurrentFrame()); 332 337 } else { 333 /* TODO we should not have to pass an item just to run a frame!*/338 /* TODO we should not have to pass an item just to run a frame! */ 334 339 current = new Text("Dummy"); 335 340 current.setLink(frame.getName()); … … 2456 2461 pause(context.getPrimitives().getDoubleValue(lengthVar)); 2457 2462 } else if (tokens[0].equals("waitforagent")) { 2458 while (DefaultAgent.isAgentRunning()){2463 while (DefaultAgent.isAgentRunning()) { 2459 2464 Thread.sleep(100); 2460 2465 } 2461 } else if (tokens[0].equals("glidecursorto")) {2466 } else if (tokens[0].equals("glidecursorto")) { 2462 2467 assertMinParametreCount(tokens, 2); 2463 2468 int finalX = (int) context.getPrimitives().getIntegerValue( -
trunk/src/org/expeditee/agents/mail/MailSession.java
r406 r409 156 156 try { 157 157 if (!_transport.isConnected()) { 158 Text message = MessageBay 159 .displayMessage("Connecting to SMTP server..."); 158 // MessageBay.displayMessage("Connecting to SMTP server..."); 160 159 _bConnecting = true; 161 160 _transport.connect(); 162 message.setAttributeValue("SMTP server connected");163 message.setColor(Color.green);161 // MessageBay.displayMessage("SMTP server connected", 162 // Color.green); 164 163 } else { 165 164 MessageBay.warningMessage("SMTP server already connected"); … … 171 170 if (_mailServer != null && !_store.isConnected()) { 172 171 try { 173 Text message = MessageBay.displayMessage("Connecting to "174 172 // Text message = MessageBay.displayMessage("Connecting to " 173 // + _mailServer + "..."); 175 174 _store.connect(_mailServer, _username, _password); 176 175 … … 228 227 }.start(); 229 228 230 message.setAttributeValue("Connection complete");231 message.setColor(Color.GREEN);229 MessageBay.displayMessage("Mail connection complete", 230 Color.GREEN); 232 231 233 232 displayUnreadMailCount(); … … 601 600 if (nextText.charAt(nextText.length() - 1) == '\n') 602 601 nextText = nextText.substring(0, nextText.length() - 1); 603 // TODO: Make the space a setting in frame creator602 // TODO: Make the space a setting in frame creator 604 603 frames.addSpace(10); 605 604 frames.addText(nextText, null, null, null, false); -
trunk/src/org/expeditee/gui/FrameUtils.java
r408 r409 364 364 * False otherwise 365 365 */ 366 public static void DisplayFrame(Frame toDisplay, boolean addToBack, boolean incrementStats) { 366 public static void DisplayFrame(Frame toDisplay, boolean addToBack, 367 boolean incrementStats) { 367 368 if (toDisplay == null) 368 369 return; … … 451 452 * false otherwise 452 453 */ 453 public static void DisplayFrame(String frameName, boolean addToBack, boolean incrementStats) { 454 public static void DisplayFrame(String frameName, boolean addToBack, 455 boolean incrementStats) { 454 456 Frame newFrame = getFrame(frameName); 455 457 … … 693 695 } 694 696 } catch (Exception e) { 695 e.printStackTrace(); 696 errors.add("Error parsing [" + item.getText() + "] on " 697 + profile.getName()); 697 if (e.getMessage() != null) { 698 errors.add(e.getMessage()); 699 } else { 700 e.printStackTrace(); 701 errors.add("Error parsing [" + item.getText() + "] on " 702 + profile.getName()); 703 } 698 704 } 699 705 } … … 786 792 return name + File.separator; 787 793 } else { 788 MessageBay.errorMessage("Directory not found: " + name); 789 } 790 } else { 791 MessageBay.warningMessage("Missing value for profile attribute" 792 + name); 793 } 794 return null; 794 throw new RuntimeException("Directory not found: " + name); 795 } 796 } 797 throw new RuntimeException("Missing value for profile attribute" + name); 795 798 } 796 799 -
trunk/src/org/expeditee/gui/MessageBay.java
r376 r409 24 24 public final class MessageBay { 25 25 26 26 27 public static final int MESSAGE_BUFFER_HEIGHT = 100; 27 28 … … 102 103 } 103 104 104 public s tatic void addDirtyArea(Rectangle r) {105 public synchronized static void addDirtyArea(Rectangle r) { 105 106 _dirtyAreas.add(r); 106 107 } 107 108 108 static int getMessageBufferHeight() {109 static synchronized int getMessageBufferHeight() { 109 110 if (_messageBuffer != null) 110 111 return _messageBuffer.getHeight(); … … 112 113 } 113 114 114 public s tatic Item getMessageLink() {115 public synchronized static Item getMessageLink() { 115 116 return _messageLink; 116 117 } 117 118 118 public s tatic Text[] getMessages() {119 public synchronized static Text[] getMessages() { 119 120 return _messages; 120 121 } 121 122 122 public s tatic boolean isDirty() {123 public synchronized static boolean isDirty() { 123 124 return !_dirtyAreas.isEmpty(); 124 125 } 125 126 126 public s tatic void invalidateFullBay() {127 public synchronized static void invalidateFullBay() { 127 128 if (_messageBuffer != null) { 128 129 _dirtyAreas.clear(); … … 133 134 } 134 135 135 private s tatic boolean initBuffer() {136 private synchronized static boolean initBuffer() { 136 137 if (_messageBuffer == null) { 137 138 if (FrameGraphics.isAudienceMode() … … 259 260 } 260 261 261 public s tatic Text displayMessage(String message, String link, Color color,262 public synchronized static Text displayMessage(String message, String link, Color color, 262 263 boolean displayAlways, String action) { 263 264 List<String> actions = new LinkedList<String>(); … … 267 268 } 268 269 269 public s tatic Text displayMessage(String message, String link,270 public synchronized static Text displayMessage(String message, String link, 270 271 List<String> actions, Color color, boolean displayAlways) { 271 272 … … 345 346 } 346 347 347 public s tatic void overwriteMessage(String message) {348 public synchronized static void overwriteMessage(String message) { 348 349 overwriteMessage(message, null); 349 350 } 350 351 351 public s tatic void overwriteMessage(String message, Color color) {352 public synchronized static void overwriteMessage(String message, Color color) { 352 353 for (int ind = _messages.length - 1; ind >= 0; ind--) { 353 354 if (_messages[ind] != null) { … … 377 378 * the message to be displayed 378 379 */ 379 public s tatic Text linkedErrorMessage(String message) {380 public synchronized static Text linkedErrorMessage(String message) { 380 381 if (_supressMessages) 381 382 return null; … … 388 389 } 389 390 390 public s tatic Text errorMessage(String message) {391 public synchronized static Text errorMessage(String message) { 391 392 if (_supressMessages) 392 393 return null; … … 402 403 * The message to display to the user in the message area 403 404 */ 404 public s tatic Text displayMessage(String message) {405 public synchronized static Text displayMessage(String message) { 405 406 return displayMessageAlways(message); 406 407 } 407 408 408 public s tatic Text displayMessageOnce(String message) {409 public synchronized static Text displayMessageOnce(String message) { 409 410 return displayMessage(message, null, null, Color.BLACK, false); 410 411 } 411 412 412 public s tatic Text displayMessage(String message, Color textColor) {413 public synchronized static Text displayMessage(String message, Color textColor) { 413 414 return displayMessage(message, null, null, textColor); 414 415 // Misc.Beep(); 415 416 } 416 417 417 public s tatic Text displayMessage(Text message) {418 public synchronized static Text displayMessage(Text message) { 418 419 Text t = null; 419 420 String link = message.getLink(); … … 427 428 } 428 429 429 public s tatic Text displayMessageAlways(String message) {430 public synchronized static Text displayMessageAlways(String message) { 430 431 return displayMessage(message, null, null, Color.BLACK); 431 432 // Misc.Beep(); 432 433 } 433 434 434 public s tatic Text warningMessage(String message) {435 public synchronized static Text warningMessage(String message) { 435 436 return displayMessage(message, null, null, Color.MAGENTA); 436 437 // Misc.Beep(); 437 438 } 438 439 439 public s tatic void supressMessages(boolean val) {440 public synchronized static void supressMessages(boolean val) { 440 441 _supressMessages = val; 441 442 }
Note:
See TracChangeset
for help on using the changeset viewer.