Ellipse clickGetter works

This commit is contained in:
jan 2016-07-10 07:14:09 -07:00
parent ee6eccee36
commit df880a0e66
6 changed files with 243 additions and 212 deletions

View File

@ -2,16 +2,12 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="6e752a8c-6cb9-4ef9-9031-0329ce15fcb4" name="Default" comment=""> <list default="true" id="6e752a8c-6cb9-4ef9-9031-0329ce15fcb4" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/ProjectorCommand.java" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/ClickGetter.java" />
<change type="MOVED" beforePath="$PROJECT_DIR$/src/EllipseClass.java" afterPath="$PROJECT_DIR$/src/Ellipse.java" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/Procedure.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Calibrator.java" afterPath="$PROJECT_DIR$/src/Calibrator.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Ellipse.java" afterPath="$PROJECT_DIR$/src/Ellipse.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Camera.java" afterPath="$PROJECT_DIR$/src/Camera.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/EuglenaApplet.java" afterPath="$PROJECT_DIR$/src/EuglenaApplet.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/EuglenaApplet.java" afterPath="$PROJECT_DIR$/src/EuglenaApplet.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/LEDControl.java" afterPath="$PROJECT_DIR$/src/LEDControl.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Menu.java" afterPath="$PROJECT_DIR$/src/Menu.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ProjectorApplet.java" afterPath="$PROJECT_DIR$/src/ProjectorApplet.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ProjectorApplet.java" afterPath="$PROJECT_DIR$/src/ProjectorApplet.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/shrinkingCircle.java" afterPath="$PROJECT_DIR$/src/shrinkingCircle.java" />
</list> </list>
<ignored path="processing-intellij.iws" /> <ignored path="processing-intellij.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -35,8 +31,8 @@
<file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true"> <file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java"> <entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="536"> <state relative-caret-position="392">
<caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" /> <caret line="424" column="17" selection-start-line="424" selection-start-column="17" selection-end-line="424" selection-end-column="17" />
<folding> <folding>
<element signature="e#0#16478#0" expanded="true" /> <element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
@ -56,12 +52,15 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="EuglenaApplet.java" pinned="false" current-in-tab="false"> <file leaf-file-name="EuglenaApplet.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java"> <entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="717"> <state relative-caret-position="321">
<caret line="54" column="58" selection-start-line="54" selection-start-column="58" selection-end-line="54" selection-end-column="58" /> <caret line="59" column="9" selection-start-line="59" selection-start-column="9" selection-end-line="59" selection-end-column="9" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -69,12 +68,12 @@
<file leaf-file-name="ProjectorApplet.java" pinned="false" current-in-tab="false"> <file leaf-file-name="ProjectorApplet.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java"> <entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574"> <state relative-caret-position="573">
<caret line="34" column="18" selection-start-line="34" selection-start-column="18" selection-end-line="36" selection-end-column="20" /> <caret line="44" column="0" selection-start-line="44" selection-start-column="0" selection-end-line="44" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#543#544#0" expanded="true" /> <element signature="e#514#515#0" expanded="true" />
<element signature="e#602#603#0" expanded="true" /> <element signature="e#573#574#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -83,19 +82,11 @@
<file leaf-file-name="Ellipse.java" pinned="false" current-in-tab="false"> <file leaf-file-name="Ellipse.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Ellipse.java"> <entry file="file://$PROJECT_DIR$/src/Ellipse.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="141"> <state relative-caret-position="645">
<caret line="62" column="21" selection-start-line="62" selection-start-column="21" selection-end-line="62" selection-end-column="21" /> <caret line="56" column="25" selection-start-line="56" selection-start-column="25" selection-end-line="56" selection-end-column="25" />
<folding /> <folding>
</state> <element signature="imports" expanded="true" />
</provider> </folding>
</entry>
</file>
<file leaf-file-name="ProjectorCommand.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/ProjectorCommand.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="1" column="4" selection-start-line="1" selection-start-column="4" selection-end-line="1" selection-end-column="4" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -112,20 +103,6 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Camera.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="828">
<caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1074#1075#0" expanded="true" />
<element signature="e#1108#1109#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Menu.java" pinned="false" current-in-tab="false"> <file leaf-file-name="Menu.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Menu.java"> <entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -138,19 +115,6 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Calibrator.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2880">
<caret line="80" column="17" selection-start-line="80" selection-start-column="17" selection-end-line="80" selection-end-column="17" />
<folding>
<element signature="e#0#3781#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
@ -186,10 +150,13 @@
<option value="$PROJECT_DIR$/src/Camera.java" /> <option value="$PROJECT_DIR$/src/Camera.java" />
<option value="$PROJECT_DIR$/src/EllipseClass.java" /> <option value="$PROJECT_DIR$/src/EllipseClass.java" />
<option value="$PROJECT_DIR$/src/Command.java" /> <option value="$PROJECT_DIR$/src/Command.java" />
<option value="$PROJECT_DIR$/src/ProjectorCommand.java" />
<option value="$PROJECT_DIR$/src/MouseGetter.java" />
<option value="$PROJECT_DIR$/src/ClickGetter.java" />
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
<option value="$PROJECT_DIR$/src/Procedure.java" />
<option value="$PROJECT_DIR$/src/Ellipse.java" /> <option value="$PROJECT_DIR$/src/Ellipse.java" />
<option value="$PROJECT_DIR$/src/EuglenaApplet.java" /> <option value="$PROJECT_DIR$/src/EuglenaApplet.java" />
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
<option value="$PROJECT_DIR$/src/ProjectorCommand.java" />
</list> </list>
</option> </option>
</component> </component>
@ -468,7 +435,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1468109775159</updated> <updated>1468109775159</updated>
</task> </task>
<option name="localTasksCounter" value="2" /> <task id="LOCAL-00002" summary="Ellipse can be drawn...">
<created>1468157042910</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1468157042910</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
@ -531,7 +505,8 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Start javaifying" /> <MESSAGE value="Start javaifying" />
<option name="LAST_COMMIT_MESSAGE" value="Start javaifying" /> <MESSAGE value="Ellipse can be drawn..." />
<option name="LAST_COMMIT_MESSAGE" value="Ellipse can be drawn..." />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager /> <breakpoint-manager />
@ -546,7 +521,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="630"> <state relative-caret-position="630">
<caret line="39" column="5" selection-start-line="39" selection-start-column="5" selection-end-line="39" selection-end-column="5" /> <caret line="39" column="5" selection-start-line="39" selection-start-column="5" selection-end-line="39" selection-end-column="5" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -556,8 +534,8 @@
<caret line="33" column="18" selection-start-line="33" selection-start-column="8" selection-end-line="33" selection-end-column="18" /> <caret line="33" column="18" selection-start-line="33" selection-start-column="8" selection-end-line="33" selection-end-column="18" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#543#544#0" expanded="true" /> <element signature="e#514#515#0" expanded="true" />
<element signature="e#602#603#0" expanded="true" /> <element signature="e#573#574#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -577,9 +555,8 @@
<state relative-caret-position="720"> <state relative-caret-position="720">
<caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" /> <caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="e#1074#1075#0" expanded="false" />
<element signature="e#1074#1075#0" expanded="true" /> <element signature="e#1108#1109#0" expanded="false" />
<element signature="e#1108#1109#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -620,7 +597,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="522"> <state relative-caret-position="522">
<caret line="40" column="35" selection-start-line="40" selection-start-column="35" selection-end-line="40" selection-end-column="35" /> <caret line="40" column="35" selection-start-line="40" selection-start-column="35" selection-end-line="40" selection-end-column="35" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -654,7 +634,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -662,7 +645,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -670,7 +656,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -678,7 +667,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -686,7 +678,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -694,7 +689,10 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -753,54 +751,13 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="536">
<caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2880">
<caret line="80" column="17" selection-start-line="80" selection-start-column="17" selection-end-line="80" selection-end-column="17" />
<folding>
<element signature="e#0#3781#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/core.jar!/processing/core/PApplet.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187665">
<caret line="6804" column="0" selection-start-line="6804" selection-start-column="0" selection-end-line="6804" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Camera.java"> <entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="828"> <state relative-caret-position="828">
<caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" /> <caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="e#1074#1075#0" expanded="false" />
<element signature="e#1074#1075#0" expanded="true" /> <element signature="e#1108#1109#0" expanded="false" />
<element signature="e#1108#1109#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="3" column="12" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
<folding>
<element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -815,34 +772,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="717">
<caret line="54" column="58" selection-start-line="54" selection-start-column="58" selection-end-line="54" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574">
<caret line="34" column="18" selection-start-line="34" selection-start-column="18" selection-end-line="36" selection-end-column="20" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#543#544#0" expanded="true" />
<element signature="e#602#603#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Ellipse.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="141">
<caret line="62" column="21" selection-start-line="62" selection-start-column="21" selection-end-line="62" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ProjectorCommand.java"> <entry file="file://$PROJECT_DIR$/src/ProjectorCommand.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36"> <state relative-caret-position="36">
@ -851,6 +780,95 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/ClickGetter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="1" column="42" selection-start-line="1" selection-start-column="42" selection-end-line="1" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="684">
<caret line="97" column="41" selection-start-line="97" selection-start-column="41" selection-end-line="97" selection-end-column="41" />
<folding>
<element signature="e#0#3781#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="3" column="12" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ProjectorApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="573">
<caret line="44" column="0" selection-start-line="44" selection-start-column="0" selection-end-line="44" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#514#515#0" expanded="true" />
<element signature="e#573#574#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="392">
<caret line="424" column="17" selection-start-line="424" selection-start-column="17" selection-end-line="424" selection-end-column="17" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Procedure.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Ellipse.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="645">
<caret line="56" column="25" selection-start-line="56" selection-start-column="25" selection-end-line="56" selection-end-column="25" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/core.jar!/processing/core/PApplet.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="812">
<caret line="887" column="16" selection-start-line="887" selection-start-column="16" selection-end-line="887" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/EuglenaApplet.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="321">
<caret line="59" column="9" selection-start-line="59" selection-start-column="9" selection-end-line="59" selection-end-column="9" />
<folding>
<element signature="e#398#399#0" expanded="true" />
<element signature="e#443#444#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

3
src/ClickGetter.java Normal file
View File

@ -0,0 +1,3 @@
public interface ClickGetter {
boolean click(int mouseX, int mouseY);
}

View File

@ -1,82 +1,80 @@
import processing.core.*; import processing.core.*;
import static processing.core.PApplet.*;
//class EllipseDrawer {
//
// Ellipse ellipseinprogress;
//
// boolean centerpointcomplete;
// boolean widthcomplete;
//
// void reset() {
// ellipseinprogress = new Ellipse(-1, -1, 0, 0);
// ellipseinprogress.visible = false;
// centerpointcomplete = false;
// widthcomplete = false;
//
// }
//
// EllipseDrawer(){
// this.reset();
// }
//
// void mouseClicked(ProjectorApplet p, float x, float y){
// if (!centerpointcomplete){
// ellipseinprogress.centerX = x;
// ellipseinprogress.centerY = y;
// centerpointcomplete = true;
//
// } else if (!widthcomplete) {
// ellipseinprogress.width = PApplet.abs(ellipseinprogress.centerX - x) * 2;
// widthcomplete = true;
//
// } else {
// ellipseinprogress.height = PApplet.abs(ellipseinprogress.centerY - y) * 2;
// ellipseinprogress.visible = true;
// //ellipses.add(ellipseinprogress);
//
// ellipseinprogress.draw(p);
// this.reset();
// }
// }
//}
class Ellipse { class Ellipse {
float centerX, centerY, width, height; float centerX, centerY, width, height;
int red, green, blue, brushSize; int color, brushSize;
boolean visible; boolean visible;
Ellipse(float centerX, float centerY, float width, float height, int rVal, int gVal, int bVal, int penWidth) { private boolean centerPointComplete, widthComplete;
Ellipse(int color, int penWidth) {
this.color = color;
this.brushSize = penWidth;
this.centerPointComplete = false;
this.widthComplete = false;
}
Ellipse(float centerX, float centerY, float width, float height, int color, int penWidth) {
this.centerX = centerX; this.centerX = centerX;
this.centerY = centerY; this.centerY = centerY;
this.width = width; this.width = width;
this.height = height; this.height = height;
this.red = rVal; this.color = color;
this.green = gVal;
this.blue = bVal;
this.brushSize = penWidth; this.brushSize = penWidth;
this.visible = true; this.visible = true;
this.centerPointComplete = true;
this.widthComplete = true;
} }
void draw(ProjectorApplet projector) { ProjectorCommand drawCommand() {
if (visible) { return (ProjectorApplet p) -> {
projector.commandQueue.add( if (!visible) {
(ProjectorApplet p) -> { //done drawing already
float old_strokeWeight = p.g.strokeWeight; return true;
int old_strokeColor = p.g.strokeColor; }
p.ellipseMode(PApplet.CENTER); float old_strokeWeight = p.g.strokeWeight;
p.strokeWeight(brushSize); int old_strokeColor = p.g.strokeColor;
p.stroke(p.color(red, green, blue));
p.noFill();
p.ellipse(p.convertXCoord(centerX), p.convertYCoord(centerY), p.ellipseMode(CENTER);
p.convertXDistance(width), p.convertYDistance(height)); p.strokeWeight(brushSize);
p.strokeWeight(old_strokeWeight); p.stroke(color);
p.stroke(old_strokeColor); p.noFill();
return true;
}); p.ellipse(p.convertXCoord(centerX), p.convertYCoord(centerY),
} p.convertXDistance(width), p.convertYDistance(height));
p.strokeWeight(old_strokeWeight);
p.stroke(old_strokeColor);
return true;
};
}
ClickGetter clickGetter(ProjectorApplet p) {
return (int x, int y) -> {
if (!centerPointComplete){
centerX = x;
centerY = y;
centerPointComplete = true;
return false;
} else if (!widthComplete) {
width = abs(centerX - x) * 2;
widthComplete = true;
return false;
} else {
height = abs(centerY - y) * 2;
visible = true;
p.commandQueue.add(drawCommand());
return true;
}
};
} }
} }

View File

@ -12,6 +12,7 @@ public class EuglenaApplet extends PApplet {
// Software components // Software components
Menu menu; Menu menu;
Calibrator calibrator; Calibrator calibrator;
ClickGetter clickGetter;
boolean tester; boolean tester;
@ -52,12 +53,24 @@ public class EuglenaApplet extends PApplet {
image(camera.getImage(), 0, 0, width - menu.width, height); image(camera.getImage(), 0, 0, width - menu.width, height);
if (!tester) { if (!tester) {
new Ellipse(0f, 0f, 1000f, 1000f, 250, 250, 250, 8).draw(this.projectorApplet); // this.projectorApplet.commandQueue.add(new Ellipse(0f, 0f, 1000f, 1000f, color(250, 250, 250), 8).drawCommand());
this.clickGetter = new Ellipse(color(255), 10).clickGetter(projectorApplet);
tester = true;
} }
} }
@Override
public void mouseClicked(){
if (clickGetter != null) {
if (clickGetter.click(mouseX, mouseY)) {
clickGetter = null;
}
}
}
void drawArrow(int cx, int cy, int len, float angle){ void drawArrow(int cx, int cy, int len, float angle){
pushMatrix(); pushMatrix();
translate(cx, cy); translate(cx, cy);

4
src/Procedure.java Normal file
View File

@ -0,0 +1,4 @@
public interface Procedure {
void execute();
}

View File

@ -1,7 +1,6 @@
import processing.core.PApplet; import processing.core.PApplet;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.function.*;
class ProjectorApplet extends PApplet { class ProjectorApplet extends PApplet {
final int projectorScreenNumber = 2; final int projectorScreenNumber = 2;
@ -32,10 +31,6 @@ class ProjectorApplet extends PApplet {
@Override @Override
public void draw() { public void draw() {
// background(50);
// fill(255);
// ellipse(mouseX, mouseY, 10, 10);
calibrator.draw(parent); calibrator.draw(parent);
while (!commandQueue.isEmpty()) { while (!commandQueue.isEmpty()) {