Changeset 25
- Timestamp:
- 05/13/08 15:32:17 (16 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/DisplayTree.java
r21 r25 3 3 import org.expeditee.gui.DisplayIO; 4 4 import org.expeditee.gui.Frame; 5 import org.expeditee.gui.FrameGraphics; 5 6 import org.expeditee.gui.FrameUtils; 6 7 import org.expeditee.gui.TimeKeeper; … … 27 28 private static final long TIMER_RESOLUTION = 10; 28 29 30 private Runtime _runtime = Runtime.getRuntime(); 31 29 32 private long _timeRemaining = 0; 30 33 … … 61 64 @Override 62 65 protected void processFrame(Frame toProcess) { 66 long freeMemory = _runtime.freeMemory(); 67 if(freeMemory < 100000){ 68 _runtime.gc(); 69 FrameGraphics.DisplayMessage("GARBAGE COLLECT!"); 70 } else if (freeMemory % 10 == 0) 71 System.out.println(_runtime.freeMemory()); 72 63 73 FrameUtils.ResponseTimer.restart(); 64 74 -
trunk/src/org/expeditee/gui/Browser.java
r23 r25 76 76 77 77 UserSettings.Init(); 78 UserSettings.Username = System.getProperty("user.name");79 String userName = FrameIO.ConvertToValidFramesetName(UserSettings.Username);78 UserSettings.Username = FrameIO.ConvertToValidFramesetName(System.getProperty("user.name")); 79 String userName = UserSettings.Username; 80 80 Frame profile = FrameIO.LoadProfile(userName); 81 81 if (profile == null) { -
trunk/src/org/expeditee/gui/DisplayIO.java
r23 r25 59 59 * The title to display in the Title bar. 60 60 */ 61 public static final String TITLE = "Exp 09May2008A";61 public static final String TITLE = "Exp13May2008A"; 62 62 63 63 private DisplayIO() { -
trunk/src/org/expeditee/gui/FrameIO.java
r24 r25 75 75 public static final int MAX_NAME_LENGTH = 64; 76 76 77 public static final int MAX_CACHE = 20 ;77 public static final int MAX_CACHE = 2000; 78 78 79 79 private static HashMap<String, Frame> _Cache = new HashMap<String, Frame>(); … … 285 285 .getFrameName()); 286 286 _UseCache = cache; 287 288 287 if (_Cache.containsKey(fresh.getFrameName().toLowerCase())) 289 288 _Cache.put(fresh.getFrameName().toLowerCase(), fresh); 290 291 289 DisplayIO.setCurrentFrame(fresh); 292 290 } … … 548 546 549 547 /** 550 * If the userName ends in a letter a period is appended before adding the551 * numeric extension552 *553 * @param framesetName554 * the current userName555 * @return the exension for the current user556 */557 public static String getFramesetExtension(String framesetName) {558 if (framesetName.charAt(framesetName.length() - 1) >= '0'559 && framesetName.charAt(framesetName.length() - 1) <= '9') {560 return ".1";561 }562 return "1";563 }564 565 /**566 548 * Creates a new frameset using the given name. This includes creating a new 567 549 * subdirectory in the <code>FRAME_PATH</code> directory, Copying over the … … 714 696 715 697 public static Frame LoadProfile(String userName) { 716 return LoadFrame(userName + FrameIO.getFramesetExtension(userName));698 return LoadFrame(userName + "1"); 717 699 } 718 700 … … 935 917 // create the new INF file 936 918 try { 937 WriteINF(path, frameset, frameset + getFramesetExtension(frameset));919 WriteINF(path, frameset, frameset + '1'); 938 920 } catch (IOException ioe) { 939 921 ioe.printStackTrace(); -
trunk/src/org/expeditee/gui/FrameUtils.java
r24 r25 392 392 393 393 public static void DisplayProfileFrame() { 394 DisplayFrame(UserSettings.Username 395 + FrameIO.getFramesetExtension(UserSettings.Username)); 394 DisplayFrame(UserSettings.Username + '1'); 396 395 } 397 396 … … 1240 1239 for (File helpFrameset : helpFramesets) { 1241 1240 String framesetName = helpFrameset.getName(); 1242 Frame indexFrame = FrameIO.LoadFrame(framesetName 1243 + FrameIO.getFramesetExtension(framesetName)); 1241 Frame indexFrame = FrameIO.LoadFrame(framesetName+ '1'); 1244 1242 // Look through the folder for help index pages 1245 1243 if (indexFrame != null
Note:
See TracChangeset
for help on using the changeset viewer.