Mercurial > hg > Members > riono > TreeVNC_ja_comment
diff src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncRootSelectionPanel.java @ 434:aad75cd6d9e2
Multicast joins both ipv4 and ipv6 now.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 11 Jun 2016 22:42:58 +0900 |
parents | 3a7d02844cfe |
children |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncRootSelectionPanel.java Fri Jun 10 19:58:59 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncRootSelectionPanel.java Sat Jun 11 22:42:58 2016 +0900 @@ -1,12 +1,13 @@ package jp.ac.u_ryukyu.treevnc; -import javax.swing.*; - import com.glavsoft.viewer.swing.ConnectionParams; +import javax.swing.*; import java.awt.*; -import java.awt.event.*; -import java.io.IOException; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; public class TreeVncRootSelectionPanel extends JFrame implements ActionListener, ItemListener { @@ -24,7 +25,6 @@ private double width = 750; private double height = 500; private JLabel label; - private boolean flag; private int counter = 0; // private JCheckBox[] check = new JCheckBox[20]; private Checkbox[] check = new Checkbox[20]; @@ -87,6 +87,10 @@ contentPane.add(label, BorderLayout.SOUTH); } + /** + * add tree vnc server selection + * @param str + */ public void checkBox(String str) { if (counter == 0) check[counter] = new Checkbox(str, true, ch); @@ -105,16 +109,6 @@ contentPane.add(panel, BorderLayout.CENTER); } - public String getAddressOption() { - while (!(flag)) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return t1.getText(); - } public String getPortOption() { return t2.getText(); @@ -126,7 +120,6 @@ public void actionPerformed(ActionEvent e) { if (advancedMenu.getSelectedIndex() == 0) { - flag = true; for (int t = 0; t < counter; t++) { int ipv4AddressLength = 3; int ipv6AddressLength = 17; @@ -134,7 +127,7 @@ String hostAddress = null; String rootAddress = null; if (check[t].getState()) { - System.out.println(check[t].getLabel()); + // System.out.println("Root Seletion Panel get the address : "+e+" "+check[t].getLabel()); String str = check[t].getLabel(); String[] temp = str.split(":"); if (temp.length == ipv4AddressLength) {