comparison src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java @ 465:2107b954e285

add comment
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 13 Jul 2016 10:43:39 +0900
parents b7d43b12651c
children 8d636adb292c
comparison
equal deleted inserted replaced
464:a817fa255673 465:2107b954e285
41 import javax.swing.border.BevelBorder; 41 import javax.swing.border.BevelBorder;
42 import javax.swing.border.Border; 42 import javax.swing.border.Border;
43 import javax.swing.border.EmptyBorder; 43 import javax.swing.border.EmptyBorder;
44 import java.awt.*; 44 import java.awt.*;
45 import java.awt.event.*; 45 import java.awt.event.*;
46 import java.lang.reflect.Field;
47 import java.net.Socket; 46 import java.net.Socket;
48 import java.util.ArrayList; 47 import java.util.ArrayList;
49 import java.util.LinkedList; 48 import java.util.LinkedList;
50 import java.util.List; 49 import java.util.List;
51 import java.util.concurrent.Executors; 50 import java.util.concurrent.Executors;
918 int singleWidth = (int) (rectangle1.getWidth()); 917 int singleWidth = (int) (rectangle1.getWidth());
919 int singleHeight = (int) (rectangle1.getHeight()); 918 int singleHeight = (int) (rectangle1.getHeight());
920 int x = rectangle1.getXfb(); 919 int x = rectangle1.getXfb();
921 int y = rectangle1.getYfb(); 920 int y = rectangle1.getYfb();
922 int scale = rectangle1.getRetinaScale(); 921 int scale = rectangle1.getRetinaScale();
923 // showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale); 922 showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale);
924 if (viewer.getRfb().isTreeManager()) { 923 if (viewer.getRfb().isTreeManager()) {
925 changeVncServer(viewer, x, y, singleWidth * scale, singleHeight * scale, scale, viewer.getRfb().getId()); 924 changeVncServer(viewer, x, y, singleWidth * scale, singleHeight * scale, scale, viewer.getRfb().getId());
926 } 925 }
927 if (viewer.getRfb().hasParent()) { 926 if (viewer.getRfb().hasParent()) {
928 String adr = viewer.getRfb().getMyAddress(); 927 String adr = viewer.getRfb().getMyAddress();
932 context.sendMessage(new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, id, x, y, singleWidth * scale, singleHeight * scale, scale)); 931 context.sendMessage(new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, id, x, y, singleWidth * scale, singleHeight * scale, scale));
933 } 932 }
934 } 933 }
935 } 934 }
936 935
936 // scan port is not enough to check VNC server. Root server should send error message to the requested
937 // node when authentication failures are happened
937 private boolean scanPort(String adr, int port) { 938 private boolean scanPort(String adr, int port) {
938 try { 939 try {
939 Socket socket = new Socket(adr, port); 940 Socket socket = new Socket(adr, port);
940 socket.close(); 941 socket.close();
941 return true; 942 return true;