Changeset 1102 for trunk/src/org/expeditee/io/ExpClipReader.java
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/io/ExpClipReader.java
r919 r1102 25 25 import java.util.List; 26 26 27 import org.expeditee.gui.DisplayIO; 27 import org.expeditee.core.Point; 28 import org.expeditee.gui.DisplayController; 28 29 import org.expeditee.gui.Frame; 29 30 import org.expeditee.gui.FrameGraphics; … … 37 38 import org.expeditee.items.Line; 38 39 import org.expeditee.items.Text; 39 import org.expeditee.items.widgets. InteractiveWidget;40 import org.expeditee.items.widgets.Widget; 40 41 41 42 /** … … 52 53 private int dX, dY; 53 54 55 public ExpClipReader(Point p) 56 { 57 this(p.x, p.y); 58 } 59 54 60 public ExpClipReader(int dX, int dY) { 55 61 super(""); … … 63 69 */ 64 70 public static void updateItems(List<Item> items) { 65 if( FrameGraphics.isXRayMode()) {71 if(DisplayController.isXRayMode()) { 66 72 return; 67 73 } … … 72 78 continue; 73 79 } 74 if (ItemUtils.startsWithTag(item, 75 ItemUtils.TAG_IMAGE, true)) { 80 if (ItemUtils.startsWithTag(item, ItemUtils.TAG_IMAGE, true)) { 76 81 if (!item.hasEnclosures()) { 77 items.add(ItemUtils.CreatePicture((Text) item , DisplayIO.getCurrentFrame()));82 items.add(ItemUtils.CreatePicture((Text) item)); 78 83 } 79 84 // check for frame images … … 83 88 && !item.getAbsoluteLink() 84 89 .equalsIgnoreCase( 85 Display IO.getCurrentFrame().getName())) {90 DisplayController.getCurrentFrame().getName())) { 86 91 if (item.hasEnclosures()) { 87 92 // item.setHidden(true); … … 90 95 // image.refresh(); 91 96 } else { 92 items.add(new FrameImage((Text) item, DisplayIO.getCurrentFrame(),null));97 items.add(new FrameImage((Text) item, null)); 93 98 } 94 99 } else if (ItemUtils.startsWithTag(item, … … 97 102 && !item.getAbsoluteLink() 98 103 .equalsIgnoreCase( 99 Display IO.getCurrentFrame().getName())) {104 DisplayController.getCurrentFrame().getName())) { 100 105 if (item.hasEnclosures()) { 101 106 // image = … … 107 112 // frame which already has a bitmap dont 108 113 // recreate the bitmap 109 items.add(new FrameBitmap((Text) item, DisplayIO.getCurrentFrame(),null));114 items.add(new FrameBitmap((Text) item, null)); 110 115 } 111 116 } else if (ItemUtils.startsWithTag(item, "@c")) { … … 116 121 } 117 122 // Check for interactive widgets 118 } else if (ItemUtils.startsWithTag(item, 119 ItemUtils.TAG_IWIDGET)) { 123 } else if (ItemUtils.startsWithTag(item, ItemUtils.TAG_IWIDGET)) { 120 124 items.remove(item); 121 item.setParent(Display IO.getCurrentFrame());125 item.setParent(DisplayController.getCurrentFrame()); 122 126 try { 123 items.addAll( InteractiveWidget.createWidget((Text) item).getItems());127 items.addAll(Widget.createWidget((Text) item).getItems()); 124 128 } catch (Exception e) { 125 129 System.err.println("Failed to create widget"); … … 176 180 while(index < lines.length && !(lines[++index].equals("Z"))) { 177 181 if (isValidLine(lines[index])) { 178 java.awt.Point idtype = separateValues(lines[index].substring(2));182 Point idtype = separateValues(lines[index].substring(2)); 179 183 // The next line must be the endpoints 180 184 if (index >= lines.length) 181 185 throw new Exception("Unexpected end of file"); 182 186 ++index; 183 java.awt.Point startend = separateValues(lines[index].substring(2));187 Point startend = separateValues(lines[index].substring(2)); 184 188 int start = startend.x; 185 189 int end = startend.y; … … 199 203 while(index < lines.length && !(lines[++index].equals("Z"))) { 200 204 if (isValidLine(lines[index])) { 201 java.awt.Point idtype = separateValues(lines[index].substring(2));205 Point idtype = separateValues(lines[index].substring(2)); 202 206 // The next line must be the endpoints 203 207 if (index >= lines.length) 204 208 throw new Exception("Unexpected end of file"); 205 209 ++index; 206 java.awt.Point startend = separateValues(lines[index].substring(2));210 Point startend = separateValues(lines[index].substring(2)); 207 211 208 212 Item a = _linePoints.get(startend.x);
Note:
See TracChangeset
for help on using the changeset viewer.