equal
deleted
inserted
replaced
53 private String password; |
53 private String password; |
54 private String url; |
54 private String url; |
55 private VMInternalFrame vmIF = null; |
55 private VMInternalFrame vmIF = null; |
56 private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>(); |
56 private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>(); |
57 private boolean wasConnected = false; |
57 private boolean wasConnected = false; |
|
58 private boolean userDisconnected = false; |
58 private boolean shouldUseSSL = true; |
59 private boolean shouldUseSSL = true; |
59 |
60 |
60 // The everConnected flag keeps track of whether the window can be |
61 // The everConnected flag keeps track of whether the window can be |
61 // closed if the user clicks Cancel after a failed connection attempt. |
62 // closed if the user clicks Cancel after a failed connection attempt. |
62 // |
63 // |
124 |
125 |
125 public void mouseClicked(MouseEvent e) { |
126 public void mouseClicked(MouseEvent e) { |
126 if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) { |
127 if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) { |
127 |
128 |
128 if (isConnected()) { |
129 if (isConnected()) { |
|
130 userDisconnected = true; |
129 disconnect(); |
131 disconnect(); |
130 wasConnected = false; |
132 wasConnected = false; |
131 } else { |
133 } else { |
132 connect(); |
134 connect(); |
133 } |
135 } |
450 } |
452 } |
451 |
453 |
452 // Call on EDT |
454 // Call on EDT |
453 private void vmPanelDied() { |
455 private void vmPanelDied() { |
454 disconnect(); |
456 disconnect(); |
|
457 |
|
458 if (userDisconnected) { |
|
459 userDisconnected = false; |
|
460 return; |
|
461 } |
455 |
462 |
456 JOptionPane optionPane; |
463 JOptionPane optionPane; |
457 String msgTitle, msgExplanation, buttonStr; |
464 String msgTitle, msgExplanation, buttonStr; |
458 |
465 |
459 if (wasConnected) { |
466 if (wasConnected) { |