Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java @ 407:7cd416d6a152
Show port Error dialog to server change client
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 16 Nov 2015 19:05:19 +0900 |
parents | 966331aef4b3 |
children |
comparison
equal
deleted
inserted
replaced
406:0eea469c6349 | 407:7cd416d6a152 |
---|---|
411 public void closeView() { | 411 public void closeView() { |
412 view.setVisible(false); | 412 view.setVisible(false); |
413 } | 413 } |
414 | 414 |
415 public void showConnectionErrorDialog(final String message) { | 415 public void showConnectionErrorDialog(final String message) { |
416 showErrorDialog(message); | |
417 if ( ! presenter.allowInteractive()) { | |
418 presenter.cancelConnection(); | |
419 closeApp(); | |
420 } | |
421 } | |
422 | |
423 public void showErrorDialog(String message) { | |
416 JOptionPane errorPane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE); | 424 JOptionPane errorPane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE); |
417 final JDialog errorDialog = errorPane.createDialog(view, "Connection error"); | 425 final JDialog errorDialog = errorPane.createDialog(view, "Connection error"); |
418 Utils.decorateDialog(errorDialog); | 426 Utils.decorateDialog(errorDialog); |
419 errorDialog.setVisible(true); | 427 errorDialog.setVisible(true); |
420 if ( ! presenter.allowInteractive()) { | |
421 presenter.cancelConnection(); | |
422 closeApp(); | |
423 } | |
424 } | 428 } |
425 | 429 |
426 public void closeApp() { | 430 public void closeApp() { |
427 appWindowListener.windowClosing(null); | 431 appWindowListener.windowClosing(null); |
428 } | 432 } |