Changeset 631
- Timestamp:
- 12/17/13 15:32:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/widgets/JfxBrowser.java
r627 r631 354 354 String selection = (String) JavaFX.WebEngineExecuteScript.invoke(JavaFX.WebViewGetEngine.invoke(webview), "window.getSelection().toString()"); 355 355 356 // Copy text and attach to cursor 357 Text t = new Text(selection); 358 t.setParent(DisplayIO.getCurrentFrame()); 359 t.setXY(FrameMouseActions.getX(), FrameMouseActions.getY()); 360 FrameMouseActions.pickup(t); 356 // Do nothing if no text is selected 357 if(!selection.equals("")) { 358 // Copy text and attach to cursor 359 Text t = new Text(selection); 360 t.setParent(DisplayIO.getCurrentFrame()); 361 t.setXY(FrameMouseActions.getX(), FrameMouseActions.getY()); 362 FrameMouseActions.pickup(t); 363 } else { System.out.println("no text selected"); } 361 364 } 362 365 }
Note:
See TracChangeset
for help on using the changeset viewer.