Mercurial > hg > Applications > TreeVNC
diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 363:bc5624e3e9c5
Add newVNCConnection method to Viewer
author | innparusu |
---|---|
date | Mon, 10 Aug 2015 18:17:12 +0900 |
parents | 47e351909227 |
children | 2d83bea06f00 |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Thu Aug 06 20:11:28 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Aug 10 18:17:12 2015 +0900 @@ -224,7 +224,7 @@ public void run() { final boolean hasJsch = checkJsch(); final boolean allowInteractive = allowAppletInteractiveConnections || ! isApplet; - connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); + ConnectionPresenter connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); connectionPresenter.setNoConnection(noConnection); connectionPresenter.addModel("ConnectionParamsModel", connectionParams); ConnectionView connectionView = new ConnectionView( @@ -249,6 +249,11 @@ } @Override + public synchronized void newVNCConnection(ConnectionPresenter presenter) { + connectionPresenter = presenter; + } + + @Override public void windowOpened(WindowEvent e) { /* nop */ } @Override public void windowClosed(WindowEvent e) { /* nop */ } @@ -458,6 +463,7 @@ return rectangles; } + @Override public void setFitScreen() { SwingViewerWindow v = connectionPresenter.getViewer();