Implemented Display a Boat as a circle.

- created displayBoat function which will display a circle at a Coordinate.
#story[9] #pair[cbt24, fwy13]
main
Fan-Wu Yang 9 years ago
parent fbb3094da8
commit 0729ae719d

@ -1,27 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
<profile default="false" name="Maven default annotation processors profile" enabled="true">
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="true" />
<module name="app" />
</profile>
</annotationProcessing>

@ -1,3 +0,0 @@
<component name="CopyrightManager">
<settings default="" />
</component>

@ -1,26 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="true" />
<option name="OPTION_NAVIGATOR" value="true" />
<option name="OPTION_INDEX" value="true" />
<option name="OPTION_SEPARATE_INDEX" value="true" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
<option name="OPTION_DEPRECATED_LIST" value="true" />
<option name="OTHER_OPTIONS" value="" />
<option name="HEAP_SIZE" />
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPTION_INCLUDE_LIBS" value="false" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
@ -28,14 +7,17 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnConfiguration">
<configuration>$USER_HOME$/.subversion</configuration>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<last-edited>1.8 (1)</last-edited>
<splitter-proportions>
<option name="proportions">
<list>

@ -2,7 +2,11 @@ package seng302.Controllers;
import javafx.fxml.FXML;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.control.TableView;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import seng302.Coordinate;
import java.net.URL;
import java.util.ResourceBundle;
@ -15,10 +19,19 @@ public class RaceController extends Controller{
Canvas raceMap;
@FXML
TableView boatInfoTable;
private GraphicsContext gc;
public void displayBoat(Coordinate coordinate, Paint paint){
gc.setFill(paint);
gc.fillOval(coordinate.getX(), coordinate.getY(), 15, 15);
}
@Override
public void initialize(URL location, ResourceBundle resources) {
this.gc = raceMap.getGraphicsContext2D();
Coordinate boat1coord = new Coordinate(60, 60);
displayBoat(boat1coord, Color.AQUAMARINE);
}
}

Loading…
Cancel
Save