Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java @ 466:8d636adb292c
fix getFbRectangles
author | kono |
---|---|
date | Wed, 13 Jul 2016 15:48:17 +0900 |
parents | 2107b954e285 |
children | 126b84644ca7 |
comparison
equal
deleted
inserted
replaced
465:2107b954e285 | 466:8d636adb292c |
---|---|
917 int singleWidth = (int) (rectangle1.getWidth()); | 917 int singleWidth = (int) (rectangle1.getWidth()); |
918 int singleHeight = (int) (rectangle1.getHeight()); | 918 int singleHeight = (int) (rectangle1.getHeight()); |
919 int x = rectangle1.getXfb(); | 919 int x = rectangle1.getXfb(); |
920 int y = rectangle1.getYfb(); | 920 int y = rectangle1.getYfb(); |
921 int scale = rectangle1.getRetinaScale(); | 921 int scale = rectangle1.getRetinaScale(); |
922 showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale); | 922 // System.out.println("request scrren change rectangles = "+rectangle1); |
923 // showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale); | |
923 if (viewer.getRfb().isTreeManager()) { | 924 if (viewer.getRfb().isTreeManager()) { |
924 changeVncServer(viewer, x, y, singleWidth * scale, singleHeight * scale, scale, viewer.getRfb().getId()); | 925 changeVncServer(viewer, x, y, singleWidth * scale, singleHeight * scale, scale, viewer.getRfb().getId()); |
925 } | 926 } |
926 if (viewer.getRfb().hasParent()) { | 927 if (viewer.getRfb().hasParent()) { |
927 String adr = viewer.getRfb().getMyAddress(); | 928 String adr = viewer.getRfb().getMyAddress(); |
965 final int thatScreenX = presenter.getX(); | 966 final int thatScreenX = presenter.getX(); |
966 final int thatScreenY = presenter.getY(); | 967 final int thatScreenY = presenter.getY(); |
967 int thatRetinaScale = presenter.getRetinaScale(); | 968 int thatRetinaScale = presenter.getRetinaScale(); |
968 final int thatScreenWidth = presenter.getSingleWidth(); | 969 final int thatScreenWidth = presenter.getSingleWidth(); |
969 final int thatScreenHeight = presenter.getSingleHeight(); | 970 final int thatScreenHeight = presenter.getSingleHeight(); |
970 showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); | 971 // showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); |
971 System.out.println("that FB w:" + viewer.getRfb().getContext().getFbWidth() + " h:" + viewer.getRfb().getContext().getFbHeight()); | 972 System.out.println("that FB w:" + viewer.getRfb().getContext().getFbWidth() + " h:" + viewer.getRfb().getContext().getFbHeight()); |
972 | 973 |
973 frame.setSize(thisScreenWidth, thisScreenHeight); | 974 frame.setSize(thisScreenWidth, thisScreenHeight); |
974 double scale = uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, thatScreenWidth, thatScreenHeight); | 975 double scale = uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, thatScreenWidth, thatScreenHeight); |
975 // final Rectangle visible = new Rectangle((int)(thatScreenX*scale),(int)(thatScreenY*scale),(int)(thatScreenWidth*scale)-1,(int)(thatScreenHeight*scale)-1); | 976 // final Rectangle visible = new Rectangle((int)(thatScreenX*scale),(int)(thatScreenY*scale),(int)(thatScreenWidth*scale)-1,(int)(thatScreenHeight*scale)-1); |
976 showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); | 977 // showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); |
977 final int scrollx = (int)(thatScreenX * scale); | 978 final int scrollx = (int)(thatScreenX * scale); |
978 final int scrolly = (int)(thatScreenY * scale); | 979 final int scrolly = (int)(thatScreenY * scale); |
979 // System.out.println("thisScrollScale: " + scale + " xmax:"+scroller.getHorizontalScrollBar().getMaximum() + " scrollx:"+scrollx); | 980 // System.out.println("thisScrollScale: " + scale + " xmax:"+scroller.getHorizontalScrollBar().getMaximum() + " scrollx:"+scrollx); |
980 // System.out.println("thisScrollScale: " + scale + " ymax:"+scroller.getVerticalScrollBar().getMaximum() + " scrolly:"+scrolly); | 981 // System.out.println("thisScrollScale: " + scale + " ymax:"+scroller.getVerticalScrollBar().getMaximum() + " scrolly:"+scrolly); |
981 SwingUtilities.invokeLater(new Runnable() { | 982 SwingUtilities.invokeLater(new Runnable() { |