Changeset 839 for trunk/src/org/expeditee/io
- Timestamp:
- 02/05/14 14:16:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/io/WebParser.java
r832 r839 39 39 import org.expeditee.gui.DisplayIO; 40 40 import org.expeditee.gui.Frame; 41 import org.expeditee.gui.FrameGraphics; 41 42 import org.expeditee.gui.FrameIO; 42 43 import org.expeditee.gui.FrameMouseActions; … … 282 283 * The Expeditee frame to output the converted page to 283 284 */ 284 public static void parsePageSimple( JfxBrowser browserWidget, final WebEngine webEngine, final WebView webView, final Frame frame) {285 public static void parsePageSimple(final JfxBrowser browserWidget, final WebEngine webEngine, final WebView webView, final Frame frame) { 285 286 try { 286 browserWidget.setOverlayVisible(true); 287 Platform.runLater(new Runnable() { 288 289 @Override 290 public void run() { 291 browserWidget.setOverlayVisible(true); 292 browserWidget.setWebViewSize(FrameGraphics.getMaxFrameSize().getWidth() * 0.9, FrameGraphics.getMaxFrameSize().getHeight() * 0.9); 293 } 294 }); 287 295 288 296 final Object notifier = new Object(); … … 291 299 final MutableBool rightReached = new MutableBool(false); 292 300 293 final MutableInt pageCount = new MutableInt(0); 301 final MutableInt verticalCount = new MutableInt(0); 302 final MutableInt horizontalCount = new MutableInt(0); 294 303 295 304 final String pageTitle = webEngine.getTitle(); … … 323 332 this.stop(); 324 333 325 pageCount.setValue(pageCount.getValue() + 1);326 327 frameToAddTo = FrameIO.CreateFrame(frameToAddTo.getFramesetName(), pageTitle + " " + pageCount.getValue(), null);334 verticalCount.setValue(verticalCount.getValue() + 1); 335 336 frameToAddTo = FrameIO.CreateFrame(frameToAddTo.getFramesetName(), pageTitle, null); 328 337 329 338 try { … … 369 378 370 379 // Adding thumbnail to the overview page 371 Text thumb = frameset.addText(100, (int) (((((float) thumbWidth / image.getWidth()) * image.getHeight()) + 10) * pageCount.getValue()), "@i: " + out.getName() + " " + thumbWidth, null); 380 Text thumb = frameset.addText((int) (thumbWidth * 1.1 * horizontalCount.getValue()) + 10, 381 (int) ((((float) thumbWidth / image.getWidth()) * image.getHeight()) * 1.1 * verticalCount.getValue()), 382 "@i: " + out.getName() + " " + thumbWidth, 383 null); 384 372 385 thumb.setLink(frameToAddTo.getName()); 373 386 thumb.setBorderColor(Color.lightGray); … … 392 405 393 406 // Button to go to the previous frame/page 394 if ( pageCount.getValue() > 1) {407 if (verticalCount.getValue() > 1) { 395 408 Text previousButton = nextButton.copy(); 396 409 previousButton.setText("Previous"); … … 642 655 643 656 } 657 658 horizontalCount.setValue(horizontalCount.getValue() + 1); 659 verticalCount.setValue(0); 644 660 } 645 661 … … 659 675 } 660 676 661 browserWidget.setOverlayVisible(false); 662 677 Platform.runLater(new Runnable() { 678 679 @Override 680 public void run() { 681 browserWidget.setOverlayVisible(false); 682 browserWidget.rebindWebViewSize(); 683 } 684 }); 663 685 } 664 686
Note:
See TracChangeset
for help on using the changeset viewer.