Mercurial > hg > Applications > TreeVNC
changeset 374:638b604aa508
Add synchronized to newVNCConnection method
author | innparusu |
---|---|
date | Tue, 25 Aug 2015 18:04:01 +0900 |
parents | b6665f7f18d1 |
children | bd74b2406775 |
files | .idea/workspace.xml src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java |
diffstat | 2 files changed, 43 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/workspace.xml Tue Aug 25 17:52:05 2015 +0900 +++ b/.idea/workspace.xml Tue Aug 25 18:04:01 2015 +0900 @@ -3,10 +3,6 @@ <component name="ChangeListManager"> <list default="true" id="0a04b9e3-21eb-43ee-b441-59e664eecd89" name="Default" comment="setFitScreen in ReceiverTask"> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> </list> <ignored path="TreeVNC.iws" /> @@ -38,7 +34,7 @@ <file leaf-file-name="ReceiverTask.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-21.45" vertical-offset="5536" max-vertical-offset="8142"> + <state vertical-scroll-proportion="0.0" vertical-offset="4215" max-vertical-offset="5355"> <caret line="303" column="75" selection-start-line="303" selection-start-column="75" selection-end-line="303" selection-end-column="75" /> <folding> <element signature="imports" expanded="true" /> @@ -62,7 +58,7 @@ <file leaf-file-name="Protocol.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/Protocol.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-12.825" vertical-offset="47" max-vertical-offset="8288"> + <state vertical-scroll-proportion="0.0" vertical-offset="300" max-vertical-offset="4440"> <caret line="58" column="37" selection-start-line="58" selection-start-column="25" selection-end-line="58" selection-end-column="37" /> <folding> <element signature="e#4261#4262#0" expanded="true" /> @@ -75,7 +71,7 @@ <file leaf-file-name="InitState.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1224"> + <state vertical-scroll-proportion="0.0" vertical-offset="675" max-vertical-offset="1020"> <caret line="77" column="30" selection-start-line="77" selection-start-column="30" selection-end-line="77" selection-end-column="30" /> <folding /> </state> @@ -95,12 +91,9 @@ <file leaf-file-name="TreeRFBProto.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="1.2385827" vertical-offset="9444" max-vertical-offset="18906"> + <state vertical-scroll-proportion="-0.034013607" vertical-offset="7200" max-vertical-offset="12300"> <caret line="548" column="5" selection-start-line="548" selection-start-column="5" selection-end-line="548" selection-end-column="5" /> - <folding> - <element signature="e#16883#16884#0" expanded="true" /> - <element signature="e#16924#16925#0" expanded="true" /> - </folding> + <folding /> </state> </provider> </entry> @@ -134,12 +127,9 @@ <file leaf-file-name="ConnectionPresenter.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.9574803" vertical-offset="7316" max-vertical-offset="8910"> - <caret line="382" column="46" selection-start-line="382" selection-start-column="46" selection-end-line="382" selection-end-column="46" /> - <folding> - <element signature="e#11667#11668#0" expanded="true" /> - <element signature="e#11736#11737#0" expanded="true" /> - </folding> + <state vertical-scroll-proportion="0.45267177" vertical-offset="5863" max-vertical-offset="7872"> + <caret line="329" column="5" selection-start-line="329" selection-start-column="5" selection-end-line="329" selection-end-column="5" /> + <folding /> </state> </provider> </entry> @@ -147,7 +137,7 @@ <file leaf-file-name="RichCursorDecoder.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/encoding/decoder/RichCursorDecoder.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="885"> + <state vertical-scroll-proportion="0.0" vertical-offset="345" max-vertical-offset="885"> <caret line="49" column="0" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" /> <folding /> </state> @@ -157,7 +147,7 @@ <file leaf-file-name="SwingConnectionWorkerFactory.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingConnectionWorkerFactory.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1215"> + <state vertical-scroll-proportion="0.0" vertical-offset="480" max-vertical-offset="675"> <caret line="61" column="38" selection-start-line="61" selection-start-column="38" selection-end-line="61" selection-end-column="38" /> <folding /> </state> @@ -167,7 +157,7 @@ <file leaf-file-name="SwingViewerWindow.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="7571" max-vertical-offset="21625"> + <state vertical-scroll-proportion="0.0" vertical-offset="12780" max-vertical-offset="12975"> <caret line="1015" column="33" selection-start-line="1015" selection-start-column="33" selection-end-line="1015" selection-end-column="33" /> <folding /> </state> @@ -177,7 +167,7 @@ <file leaf-file-name="SwingNetworkConnectionWorker.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingNetworkConnectionWorker.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="1625" max-vertical-offset="4075"> + <state vertical-scroll-proportion="0.0" vertical-offset="1275" max-vertical-offset="2445"> <caret line="121" column="58" selection-start-line="121" selection-start-column="58" selection-end-line="121" selection-end-column="58" /> <folding /> </state> @@ -187,7 +177,7 @@ <file leaf-file-name="SwingRfbConnectionWorker.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="939" max-vertical-offset="6075"> + <state vertical-scroll-proportion="0.0" vertical-offset="990" max-vertical-offset="3645"> <caret line="109" column="35" selection-start-line="109" selection-start-column="35" selection-end-line="109" selection-end-column="35" /> <folding /> </state> @@ -483,8 +473,8 @@ </option> </component> <component name="ProjectFrameBounds"> - <option name="x" value="146" /> - <option name="y" value="54" /> + <option name="x" value="4" /> + <option name="y" value="23" /> <option name="width" value="3836" /> <option name="height" value="2137" /> </component> @@ -511,8 +501,6 @@ <sortByType /> </navigator> <panes> - <pane id="Scope" /> - <pane id="PackagesPane" /> <pane id="ProjectPane"> <subPane> <PATH> @@ -669,6 +657,8 @@ </PATH> </subPane> </pane> + <pane id="Scope" /> + <pane id="PackagesPane" /> <pane id="Scratches" /> </panes> </component> @@ -800,6 +790,19 @@ </ExternalSystemSettings> <method /> </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <method /> + </configuration> <configuration default="true" type="TestNG" factoryName="TestNG"> <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> <module name="" /> @@ -828,19 +831,6 @@ <listeners /> <method /> </configuration> - <configuration default="true" type="Applet" factoryName="Applet"> - <module name="" /> - <option name="MAIN_CLASS_NAME" /> - <option name="HTML_FILE_NAME" /> - <option name="HTML_USED" value="false" /> - <option name="WIDTH" value="400" /> - <option name="HEIGHT" value="300" /> - <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> - <option name="VM_PARAMETERS" /> - <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> - <option name="ALTERNATIVE_JRE_PATH" /> - <method /> - </configuration> <configuration default="true" type="Application" factoryName="Application"> <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> <option name="MAIN_CLASS_NAME" /> @@ -941,7 +931,7 @@ <servers /> </component> <component name="ToolWindowManager"> - <frame x="146" y="54" width="3836" height="2137" extended-state="6" /> + <frame x="4" y="23" width="3836" height="2137" extended-state="6" /> <editor active="true" /> <layout> <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> @@ -963,26 +953,26 @@ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.10870699" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32791728" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13034411" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32791728" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32988676" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> </layout> <layout-to-restore> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.109228365" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32988676" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.11991658" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32988676" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> @@ -1353,7 +1343,6 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.15873016" vertical-offset="0" max-vertical-offset="1323"> <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="9" /> - <folding /> </state> </provider> </entry> @@ -1417,7 +1406,6 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.4396985" vertical-offset="0" max-vertical-offset="1592"> <caret line="59" column="34" selection-start-line="59" selection-start-column="34" selection-end-line="59" selection-end-column="34" /> - <folding /> </state> </provider> </entry> @@ -1442,7 +1430,7 @@ </entry> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-21.45" vertical-offset="5536" max-vertical-offset="8142"> + <state vertical-scroll-proportion="0.0" vertical-offset="4215" max-vertical-offset="5355"> <caret line="303" column="75" selection-start-line="303" selection-start-column="75" selection-end-line="303" selection-end-column="75" /> <folding> <element signature="imports" expanded="true" /> @@ -1478,7 +1466,7 @@ </entry> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/Protocol.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-12.825" vertical-offset="47" max-vertical-offset="8288"> + <state vertical-scroll-proportion="0.0" vertical-offset="300" max-vertical-offset="4440"> <caret line="58" column="37" selection-start-line="58" selection-start-column="25" selection-end-line="58" selection-end-column="37" /> <folding> <element signature="e#4261#4262#0" expanded="true" /> @@ -1526,23 +1514,17 @@ </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.9574803" vertical-offset="7316" max-vertical-offset="8910"> - <caret line="382" column="46" selection-start-line="382" selection-start-column="46" selection-end-line="382" selection-end-column="46" /> - <folding> - <element signature="e#11667#11668#0" expanded="true" /> - <element signature="e#11736#11737#0" expanded="true" /> - </folding> + <state vertical-scroll-proportion="0.45267177" vertical-offset="5863" max-vertical-offset="7872"> + <caret line="329" column="5" selection-start-line="329" selection-start-column="5" selection-end-line="329" selection-end-column="5" /> + <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="1.2385827" vertical-offset="9444" max-vertical-offset="18906"> + <state vertical-scroll-proportion="-0.034013607" vertical-offset="7200" max-vertical-offset="12300"> <caret line="548" column="5" selection-start-line="548" selection-start-column="5" selection-end-line="548" selection-end-column="5" /> - <folding> - <element signature="e#16883#16884#0" expanded="true" /> - <element signature="e#16924#16925#0" expanded="true" /> - </folding> + <folding /> </state> </provider> </entry>
--- a/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Tue Aug 25 17:52:05 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Tue Aug 25 18:04:01 2015 +0900 @@ -377,7 +377,7 @@ startConnection(viewer.settings, viewer.uiSettings, viewer.paramsMask); } - public void newVNCConnection(Protocol workingProtocol) { + public synchronized void newVNCConnection(Protocol workingProtocol) { TreeRFBProto rfb = viewer.getRfb(); rfb.stopReceiverTask(); rfb.setProtocolContext(workingProtocol);