Changeset 845
- Timestamp:
- 02/05/14 15:57:58 (10 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/JfxBrowserActions.java
r813 r845 4 4 import org.expeditee.gui.DisplayIO; 5 5 import org.expeditee.gui.Frame; 6 import org.expeditee.gui.FrameGraphics; 6 7 import org.expeditee.gui.FrameIO; 7 8 import org.expeditee.gui.FrameMouseActions; 9 import org.expeditee.gui.FrameUtils; 8 10 import org.expeditee.gui.FreeItems; 9 11 import org.expeditee.gui.MessageBay; … … 12 14 import org.expeditee.items.Text; 13 15 import org.expeditee.items.widgets.InteractiveWidget; 16 import org.expeditee.items.widgets.InteractiveWidgetInitialisationFailedException; 17 import org.expeditee.items.widgets.InteractiveWidgetNotAvailableException; 14 18 import org.expeditee.items.widgets.JfxBrowser; 15 19 import org.expeditee.settings.network.NetworkSettings; … … 125 129 FrameIO.SaveFrame(frame); 126 130 } 131 132 /** 133 * Creates a frame containing a JFXBrowser pointed to the specified URL, then navigates to that frame 134 * 135 * @param link 136 * Item that will link to the new frame 137 * @param url 138 * URL to load in the Web Browser of the new frame 139 * @throws Exception 140 */ 141 public static void createFrameWithBrowser(Text link, String url) throws Exception { 142 Frame frame = FrameIO.CreateNewFrame(link); 143 frame.removeAllItems(frame.getItems()); 144 link.setLink("" + frame.getNumber()); 145 link.setAction(null); 146 147 // Create widget via text annotation 148 Text wt = frame.addText(10, 10, "@iw: org.expeditee.items.widgets.JfxBrowser " + (int) (FrameGraphics.getMaxFrameSize().getWidth() * 0.9) + " " 149 + (int) (FrameGraphics.getMaxFrameSize().getHeight() * 0.9) + " : " + url, null); 150 151 InteractiveWidget.createWidget(wt); 152 153 FrameIO.SaveFrame(frame); 154 155 FrameUtils.DisplayFrame(link.getAbsoluteLink()); 156 } 127 157 } -
trunk/src/org/expeditee/io/WebParser.java
r842 r845 1359 1359 1360 1360 if (!linkUrl.equals("undefined")) { 1361 t.setAction(" gotourl" + linkUrl);1361 t.setAction("createFrameWithBrowser " + linkUrl); 1362 1362 t.setActionMark(false); 1363 1363 }
Note:
See TracChangeset
for help on using the changeset viewer.