Changeset 1102 for trunk/src/org/expeditee/agents
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- Location:
- trunk/src/org/expeditee/agents
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/DefaultAgent.java
r919 r1102 19 19 package org.expeditee.agents; 20 20 21 import org.expeditee.gui.DisplayController; 21 22 import org.expeditee.gui.Frame; 22 import org.expeditee.gui.FrameGraphics;23 23 import org.expeditee.gui.MessageBay; 24 24 import org.expeditee.gui.TimeKeeper; … … 128 128 AGENTS_RUNNING--; 129 129 130 FrameGraphics.requestRefresh(true);130 DisplayController.requestRefresh(true); 131 131 SessionStats.setEnabled(true); 132 132 } -
trunk/src/org/expeditee/agents/DisplayComet.java
r919 r1102 23 23 import java.util.Stack; 24 24 25 import org.expeditee.gui.Display IO;25 import org.expeditee.gui.DisplayController; 26 26 import org.expeditee.gui.Frame; 27 27 import org.expeditee.gui.FrameIO; … … 45 45 Collection<String> seen = new HashSet<String>(); 46 46 47 Display IO.addToBack(frame);47 DisplayController.addToBack(frame); 48 48 49 49 // Goto the end of the comet … … 74 74 if (_stop) 75 75 return null; 76 Display IO.setCurrentFrame(_frameList.pop(), true);76 DisplayController.setCurrentFrame(_frameList.pop(), true); 77 77 _frameCount++; 78 78 pause(_delay); -
trunk/src/org/expeditee/agents/DisplayTree.java
r919 r1102 19 19 package org.expeditee.agents; 20 20 21 import org.expeditee.gui.Display IO;21 import org.expeditee.gui.DisplayController; 22 22 import org.expeditee.gui.Frame; 23 23 import org.expeditee.gui.MessageBay; … … 54 54 55 55 // push current frame on to back-stack 56 Display IO.addToBack(start);56 DisplayController.addToBack(start); 57 57 58 58 return super.initialise(start, launcher); … … 63 63 // return the user to the Frame they started on 64 64 if (!_stop) { 65 Display IO.Back();65 DisplayController.Back(); 66 66 } 67 67 super.finalise(start); … … 79 79 80 80 // ignore loops 81 if (toProcess != Display IO.getCurrentFrame())82 Display IO.setCurrentFrame(toProcess, false);81 if (toProcess != DisplayController.getCurrentFrame()) 82 DisplayController.setCurrentFrame(toProcess, false); 83 83 // parse the frame for any pause settings 84 84 delay(toProcess); -
trunk/src/org/expeditee/agents/Format.java
r919 r1102 26 26 import java.util.List; 27 27 28 import org.expeditee.gui.DisplayController; 28 29 import org.expeditee.gui.Frame; 29 import org.expeditee.gui.FrameGraphics;30 30 import org.expeditee.gui.FrameUtils; 31 31 import org.expeditee.items.Item; … … 148 148 + /* item.getX() + */it.getBoundsWidth()); 149 149 150 if (xCheck < FrameGraphics.getMaxSize().width) {150 if (xCheck < DisplayController.getFramePaintArea().getWidth()) { 151 151 Item columnHead = columnHeads.get(i + 1); 152 152 if (columnHead.getX() < maxX && columnHead.getY() < maxY) { … … 182 182 start.setChanged(true); 183 183 start.addToUndoMove(changedItems); 184 FrameGraphics.requestRefresh(true);184 DisplayController.requestRefresh(true); 185 185 return null; 186 186 } -
trunk/src/org/expeditee/agents/GraphFramesetLinks.java
r919 r1102 19 19 package org.expeditee.agents; 20 20 21 import java.awt.Color;22 21 import java.util.List; 23 22 24 23 import org.expeditee.actions.Misc; 24 import org.expeditee.core.Colour; 25 import org.expeditee.core.Font; 26 import org.expeditee.gio.gesture.StandardGestureActions; 27 import org.expeditee.gui.DisplayController; 25 28 import org.expeditee.gui.Frame; 26 29 import org.expeditee.gui.FrameIO; 27 import org.expeditee.gui.FrameMouseActions;28 30 import org.expeditee.gui.FrameUtils; 29 31 import org.expeditee.items.Item; … … 41 43 import com.mxgraph.model.mxGraphModel; 42 44 import com.mxgraph.view.mxGraph; 43 import java.awt.Font;44 45 45 46 /** … … 74 75 String resultsFramesetName = "LinksGraphResults"; 75 76 76 Colo r vertColor = new Color(51,145,148);77 Colo r unlinkedVertColor = new Color(251,107,65);78 Colo r outgoingVertColor = new Color(246,216,107);79 Colo r lineColor = new Color(0,0,0, 20);77 Colour vertColor = Colour.FromRGB255(51,145,148); 78 Colour unlinkedVertColor = Colour.FromRGB255(251,107,65); 79 Colour outgoingVertColor = Colour.FromRGB255(246,216,107); 80 Colour lineColor = Colour.FromRGBA255(0,0,0, 20); 80 81 81 82 try { … … 220 221 } 221 222 222 Font keyFont = Font.decode(Font.SANS_SERIF + " 14"); 223 Font keyFont = new Font("SansSerif"); 224 keyFont.setSize(14); 223 225 224 226 Text keyLink = resultsFrame.addText(0, 0, "\u2192 = Link", null); … … 228 230 229 231 keyLink.setFont(keyFont); 230 keyLink.setColor(Colo r.DARK_GRAY);232 keyLink.setColor(Colour.DARK_GREY); 231 233 232 234 keyFrame.setFont(keyFont);; … … 239 241 keyFrameOutgoing.setColor(outgoingVertColor); 240 242 241 keyFrameOutgoing.setAnchorBottom(10 f);242 keyFrameUnlinked.setAnchorBottom(30 f);243 keyFrame.setAnchorBottom(50 f);244 keyLink.setAnchorBottom(70 f);245 246 keyFrameOutgoing.setAnchorLeft(10 f);247 keyFrameUnlinked.setAnchorLeft(10 f);248 keyFrame.setAnchorLeft(10 f);249 keyLink.setAnchorLeft(10 f);243 keyFrameOutgoing.setAnchorBottom(10); 244 keyFrameUnlinked.setAnchorBottom(30); 245 keyFrame.setAnchorBottom(50); 246 keyLink.setAnchorBottom(70); 247 248 keyFrameOutgoing.setAnchorLeft(10); 249 keyFrameUnlinked.setAnchorLeft(10); 250 keyFrame.setAnchorLeft(10); 251 keyLink.setAnchorLeft(10); 250 252 251 253 // Moving to the area of the frame that contains the graph … … 256 258 Text link = new Text(toProcessFramesetName + " graph"); 257 259 link.setLink(resultsFrame.getName()); 258 link.setPosition( FrameMouseActions.getPosition());259 FrameMouseActions.pickup(link);260 link.setPosition(DisplayController.getMousePosition()); 261 StandardGestureActions.pickup(link); 260 262 return null; 261 263 } -
trunk/src/org/expeditee/agents/ScaleFrameset.java
r919 r1102 21 21 import java.util.Collection; 22 22 23 import org.expeditee.gio.gesture.StandardGestureActions; 23 24 import org.expeditee.gui.Frame; 24 25 import org.expeditee.gui.FrameIO; 25 import org.expeditee.gui.FrameKeyboardActions;26 26 import org.expeditee.gui.Vector; 27 27 import org.expeditee.items.Item; … … 62 62 63 63 // TODO make this thread safe! 64 FrameKeyboardActions.Refresh();64 StandardGestureActions.Refresh(); 65 65 66 66 return null; … … 102 102 continue; 103 103 // if (!(item instanceof Line)) 104 item. updatePolygon();104 item.invalidateBounds(); 105 105 106 106 if (item instanceof Line) { -
trunk/src/org/expeditee/agents/SearchAgent.java
r1069 r1102 21 21 import java.util.Collection; 22 22 23 import org.expeditee.gui.DisplayController; 23 24 import org.expeditee.gui.Frame; 24 25 import org.expeditee.gui.FrameCreator; 25 import org.expeditee.gui.FrameGraphics;26 26 import org.expeditee.gui.FrameIO; 27 27 import org.expeditee.io.Conversion; … … 126 126 } 127 127 128 public static boolean searchFrame(FrameCreator results, String frameName, 129 String pattern, String replacementString){130 int oldMode = FrameGraphics.getMode();131 FrameGraphics.forceXRayMode(false);128 public static boolean searchFrame(FrameCreator results, String frameName, String pattern, String replacementString) 129 { 130 boolean wasXrayMode = DisplayController.isXRayMode(); 131 if (!wasXrayMode) DisplayController.ToggleXRayMode(); 132 132 Frame frameToSearch = FrameIO.LoadFrame(frameName); 133 FrameGraphics.setMode(oldMode, false);133 if (!wasXrayMode) DisplayController.ToggleXRayMode(); 134 134 if (frameToSearch == null) 135 135 return false; … … 142 142 } 143 143 } 144 FrameGraphics.requestRefresh(true);144 DisplayController.requestRefresh(true); 145 145 FrameIO.SaveFrame(frameToSearch, false); 146 146 return true; … … 177 177 _results.addText(surrogate.toString(), null, 178 178 frameName, null, false); 179 FrameGraphics.requestRefresh(true);179 DisplayController.requestRefresh(true); 180 180 } 181 181 } -
trunk/src/org/expeditee/agents/SearchGreenstone.java
r919 r1102 23 23 import java.util.Vector; 24 24 25 import org.expeditee.gio.gesture.StandardGestureActions; 25 26 import org.expeditee.greenstone.Greenstone3Connection; 26 27 import org.expeditee.greenstone.Query; … … 29 30 import org.expeditee.greenstone.ResultDocument; 30 31 import org.expeditee.gui.AttributeValuePair; 31 import org.expeditee.gui.Display IO;32 import org.expeditee.gui.DisplayController; 32 33 import org.expeditee.gui.Frame; 33 34 import org.expeditee.gui.FrameCreator; 34 35 import org.expeditee.gui.FrameGraphics; 35 import org.expeditee.gui.FrameMouseActions;36 36 import org.expeditee.gui.MessageBay; 37 37 import org.expeditee.items.Text; … … 175 175 doQuery(_pattern); 176 176 } else if (_currentResultSet != null) { 177 Text newText = DisplayIO.getCurrentFrame().createNewText( 178 getCursorText()); 177 Text newText = DisplayController.getCurrentFrame().createNewText(getCursorText()); 179 178 _clicked = newText; 180 FrameMouseActions.pickup(newText);179 StandardGestureActions.pickup(newText); 181 180 } 182 181 … … 389 388 false); 390 389 391 FrameGraphics.requestRefresh(true);390 DisplayController.requestRefresh(true); 392 391 } 393 392 -
trunk/src/org/expeditee/agents/SearchTreeAndReplace.java
r919 r1102 22 22 import java.util.HashSet; 23 23 24 import org.expeditee.gui.DisplayController; 24 25 import org.expeditee.gui.Frame; 25 import org.expeditee.gui.FrameGraphics;26 26 import org.expeditee.gui.FrameIO; 27 27 import org.expeditee.items.Text; … … 79 79 } 80 80 } 81 FrameGraphics.requestRefresh(true);81 DisplayController.requestRefresh(true); 82 82 FrameIO.SaveFrame(frameToSearch, false); 83 83 return true; -
trunk/src/org/expeditee/agents/Sort.java
r919 r1102 19 19 package org.expeditee.agents; 20 20 21 import java.awt.Point;22 21 import java.util.ArrayList; 23 22 import java.util.Collection; … … 25 24 import java.util.Comparator; 26 25 26 import org.expeditee.core.Point; 27 import org.expeditee.gui.DisplayController; 27 28 import org.expeditee.gui.Frame; 28 import org.expeditee.gui.FrameGraphics;29 29 import org.expeditee.gui.FrameUtils; 30 30 import org.expeditee.items.Text; … … 68 68 // items will need to be resorted after this 69 69 start.setResort(true); 70 FrameGraphics.Repaint();70 DisplayController.requestRefresh(true); 71 71 72 72 return null; -
trunk/src/org/expeditee/agents/SwitchyardTree.java
r919 r1102 19 19 package org.expeditee.agents; 20 20 21 import java.awt.Color; 22 import java.awt.geom.Point2D; 23 21 import org.expeditee.core.Colour; 22 import org.expeditee.core.Point; 24 23 import org.expeditee.gui.Frame; 25 24 import org.expeditee.gui.FrameIO; … … 44 43 Frame childFrame = FrameIO.LoadFrame(link); 45 44 if (childFrame != null) { 46 Point 2D.FloatlastItemEnd = textItem.getParagraphEndPosition();45 Point lastItemEnd = textItem.getParagraphEndPosition(); 47 46 for (Text childItem : childFrame.getBodyTextItems(false)) { 48 47 // look for red items (remember get color may be null 49 if (Colo r.RED.equals(childItem.getPaintColor())) {48 if (Colour.RED.equals(childItem.getPaintColor())) { 50 49 // make a copy and add to parent frame 51 50 Text itemCopy = childItem.copy(); 52 51 // add to the right of parent item 53 lastItemEnd.set Location(lastItemEnd.x + 20, lastItemEnd.y);52 lastItemEnd.set(lastItemEnd.x + 20, lastItemEnd.y); 54 53 itemCopy.setPosition(lastItemEnd.x, lastItemEnd.y); 55 54 lastItemEnd = itemCopy -
trunk/src/org/expeditee/agents/mail/MailSession.java
r919 r1102 19 19 package org.expeditee.agents.mail; 20 20 21 import java.awt.Color;22 import java.awt.Point;23 21 import java.io.BufferedReader; 24 22 import java.io.InputStream; … … 48 46 import javax.mail.internet.MimeMessage; 49 47 48 import org.expeditee.core.Colour; 49 import org.expeditee.core.Point; 50 import org.expeditee.gio.DragAndDropManager; 50 51 import org.expeditee.gui.AttributeValuePair; 52 import org.expeditee.gui.DisplayController; 51 53 import org.expeditee.gui.Frame; 52 54 import org.expeditee.gui.FrameCreator; 53 import org.expeditee.gui.FrameGraphics;54 55 import org.expeditee.gui.MessageBay; 55 import org.expeditee.importer.FrameDNDTransferHandler;56 56 import org.expeditee.items.Text; 57 57 … … 208 208 try { 209 209 MessageBay.displayMessage("New mail message!", 210 null, Colo r.green, true, "getMailByID "210 null, Colour.GREEN, true, "getMailByID " 211 211 + _folder.getMessageCount()); 212 212 /* … … 247 247 248 248 MessageBay.displayMessage("Mail connection complete", 249 Colo r.GREEN);249 Colour.GREEN); 250 250 251 251 displayUnreadMailCount(); … … 262 262 int unreadCount = getUnreadCount(); 263 263 Text text = new Text(-1, unreadCount + UNREAD_MESSAGE 264 + (unreadCount == 1 ? "" : "s"), Colo r.BLUE, null);264 + (unreadCount == 1 ? "" : "s"), Colour.BLUE, null); 265 265 if (unreadCount > 0) 266 266 text.addAction("getUnreadMail " + unreadCount); … … 517 517 final Frame frame, final Point point) { 518 518 519 final Text source = FrameDNDTransferHandler.importString( 520 "Reading message " + messageNo + "...", point); 519 final Text source = DragAndDropManager.importString("Reading message " + messageNo + "...", point); 521 520 522 521 new Thread() { … … 598 597 frames.save(); 599 598 source.setLink(frames.getName()); 600 FrameGraphics.requestRefresh(true);599 DisplayController.requestRefresh(true); 601 600 } catch (MessageRemovedException mre) { 602 601 source.setText("Message removed from inbox");
Note:
See TracChangeset
for help on using the changeset viewer.