comparison src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java @ 447:3996fde6f8ed

cleanUp
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Jun 2016 17:06:22 +0900
parents 9ab123ce3d9f
children 344a35b7c47f
comparison
equal deleted inserted replaced
446:9ab123ce3d9f 447:3996fde6f8ed
855 @Override 855 @Override
856 public void actionPerformed(ActionEvent e) { 856 public void actionPerformed(ActionEvent e) {
857 ArrayList<Rectangle> rectangles = viewer.getScreenRectangles(); 857 ArrayList<Rectangle> rectangles = viewer.getScreenRectangles();
858 if (rectangles.size() == 1) { // single display 858 if (rectangles.size() == 1) { // single display
859 screenChangeRequest(context, 0); 859 screenChangeRequest(context, 0);
860 } else if (rectangles.size() == 2){ // dual display 860 } else if (rectangles.size() > 1){ // dual display
861 ScreenChangeSelectionPanel selectionPanel = new ScreenChangeSelectionPanel(viewerWindow, context); 861 ScreenChangeSelectionPanel selectionPanel = new ScreenChangeSelectionPanel(viewerWindow, context);
862 for (int i = 0; i < rectangles.size(); i++) { 862 for (int i = 0; i < rectangles.size(); i++) {
863 Rectangle rectangle = rectangles.get(i); 863 Rectangle rectangle = rectangles.get(i);
864 int scale = retinaScale(i); 864 // int scale = retinaScale(i);
865 int screenWidth = rectangle.width * scale; 865 int screenWidth = rectangle.width; // * scale;
866 int screenHeight = rectangle.height * scale; 866 int screenHeight = rectangle.height; // * scale;
867 selectionPanel.checkBox(screenWidth+" X "+screenHeight); 867 selectionPanel.checkBox(screenWidth+" X "+screenHeight);
868 } 868 }
869 selectionPanel.setButton(); 869 selectionPanel.setButton();
870 selectionPanel.visible(); 870 selectionPanel.visible();
871 } 871 }
988 if ( rect.contains(thisScreenLocation) ) break; 988 if ( rect.contains(thisScreenLocation) ) break;
989 thisScreenNumber++; 989 thisScreenNumber++;
990 } 990 }
991 int thisScreenWidth = (int) rectangles.get(thisScreenNumber).getWidth(); 991 int thisScreenWidth = (int) rectangles.get(thisScreenNumber).getWidth();
992 int thisScreenHeight = (int) rectangles.get(thisScreenNumber).getHeight(); 992 int thisScreenHeight = (int) rectangles.get(thisScreenNumber).getHeight();
993 int thisRetinaScale = retinaScale(thisScreenNumber); 993 // int thisRetinaScale = retinaScale(thisScreenNumber);
994 994
995 final int thatScreenX = presenter.getX(); 995 final int thatScreenX = presenter.getX();
996 final int thatScreenY = presenter.getY(); 996 final int thatScreenY = presenter.getY();
997 int thatRetinaScale = presenter.getRetinaScale(); 997 // int thatRetinaScale = presenter.getRetinaScale();
998 final int thatScreenWidth = presenter.getFrameSizeWidth(); 998 final int thatScreenWidth = presenter.getFrameSizeWidth();
999 final int thatScreenHeight = presenter.getFrameSizeHeight(); 999 final int thatScreenHeight = presenter.getFrameSizeHeight();
1000 // showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); 1000 // showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale);
1001 1001
1002 frame.setSize(thisScreenWidth, thisScreenHeight); 1002 frame.setSize(thisScreenWidth, thisScreenHeight);