Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java @ 453:d0ca1be5c47c
show debag message for 13inch retina
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Jun 2016 20:39:23 +0900 |
parents | e94489c9a0bb |
children | 432e2967eaab |
comparison
equal
deleted
inserted
replaced
452:e94489c9a0bb | 453:d0ca1be5c47c |
---|---|
996 final int thatScreenX = presenter.getX(); | 996 final int thatScreenX = presenter.getX(); |
997 final int thatScreenY = presenter.getY(); | 997 final int thatScreenY = presenter.getY(); |
998 int thatRetinaScale = presenter.getRetinaScale(); | 998 int thatRetinaScale = presenter.getRetinaScale(); |
999 final int thatScreenWidth = viewer.getRfb().getSingleWidth(); | 999 final int thatScreenWidth = viewer.getRfb().getSingleWidth(); |
1000 final int thatScreenHeight = viewer.getRfb().getSingleHeight(); | 1000 final int thatScreenHeight = viewer.getRfb().getSingleHeight(); |
1001 // showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); | 1001 showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); |
1002 // System.out.println("that FB x:" + viewer.getRfb().getContext().getFbWidth() + " y:" + viewer.getRfb().getContext().getFbHeight()); | 1002 System.out.println("that FB x:" + viewer.getRfb().getContext().getFbWidth() + " y:" + viewer.getRfb().getContext().getFbHeight()); |
1003 | 1003 |
1004 frame.setSize(thisScreenWidth, thisScreenHeight); | 1004 frame.setSize(thisScreenWidth, thisScreenHeight); |
1005 double scale = uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, thatScreenWidth, thatScreenHeight); | 1005 double scale = uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, thatScreenWidth, thatScreenHeight); |
1006 // final Rectangle visible = new Rectangle((int)(thatScreenX*scale),(int)(thatScreenY*scale),(int)(thatScreenWidth*scale)-1,(int)(thatScreenHeight*scale)-1); | 1006 // final Rectangle visible = new Rectangle((int)(thatScreenX*scale),(int)(thatScreenY*scale),(int)(thatScreenWidth*scale)-1,(int)(thatScreenHeight*scale)-1); |
1007 // showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); | 1007 showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); |
1008 final int scrollx = (int)(thatScreenX * scale); | 1008 final int scrollx = (int)(thatScreenX * scale); |
1009 final int scrolly = (int)(thatScreenY * scale); | 1009 final int scrolly = (int)(thatScreenY * scale); |
1010 // System.out.println("thisScrollScale: " + scale + " xmax:"+scroller.getHorizontalScrollBar().getMaximum() + " scrollx:"+scrollx); | 1010 System.out.println("thisScrollScale: " + scale + " xmax:"+scroller.getHorizontalScrollBar().getMaximum() + " scrollx:"+scrollx); |
1011 // System.out.println("thisScrollScale: " + scale + " ymax:"+scroller.getVerticalScrollBar().getMaximum() + " scrolly:"+scrolly); | 1011 System.out.println("thisScrollScale: " + scale + " ymax:"+scroller.getVerticalScrollBar().getMaximum() + " scrolly:"+scrolly); |
1012 SwingUtilities.invokeLater(new Runnable() { | 1012 SwingUtilities.invokeLater(new Runnable() { |
1013 public void run() { | 1013 public void run() { |
1014 scroller.getHorizontalScrollBar().setValue(scrollx); | 1014 scroller.getHorizontalScrollBar().setValue(scrollx); |
1015 scroller.getVerticalScrollBar().setValue(scrolly); | 1015 scroller.getVerticalScrollBar().setValue(scrolly); |
1016 // scroller.scrollRectToVisible(visible); // this does not work | 1016 // scroller.scrollRectToVisible(visible); // this does not work |