Commit abb44f14 authored by Håvard Østli Fjørkenstad's avatar Håvard Østli Fjørkenstad 🐞
Browse files

fixed buttons + added method

parent acbdf8b1
......@@ -6,6 +6,7 @@
<change beforePath="$PROJECT_DIR$/src/main/java/GUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GUI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/GUI.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/GUI.class" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
......@@ -45,7 +46,7 @@
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="project.structure.last.edited" value="SDKs" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2678161" />
<property name="settings.editor.selected.configurable" value="configurable.group.editor" />
......@@ -56,6 +57,18 @@
<recent name="C:\Users\Milos\IdeaProjects\JavaFXTests\src\main\java" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Application.Run">
<configuration name="Metadata run" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="Metadata" />
......@@ -66,7 +79,7 @@
</configuration>
<configuration name="Run" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="GUI" />
<module name="idatg1002-project-group-5" />
<module name="JavaFXTests" />
<method v="2">
<option name="Make" enabled="true" />
</method>
......@@ -90,6 +103,7 @@
<workItem from="1583230272265" duration="1008000" />
<workItem from="1583407347557" duration="1507000" />
<workItem from="1583409003925" duration="3912000" />
<workItem from="1583415867207" duration="1302000" />
</task>
<task id="LOCAL−00001" summary="Commit 3, Added Comment">
<created>1583407680263</created>
......
......@@ -82,34 +82,31 @@ public class GUI extends Application {
*/
Image cancelImage = new Image(getClass().getResourceAsStream("cancelBtn.png"));
// stage upload
Button cancelBtnforUpload = new Button("Back");
cancelBtnforUpload.setLayoutX(50);
cancelBtnforUpload.setLayoutY(10);
cancelBtnforUpload.setOnAction(e-> primaryStage.setScene(scene));
// stage search
Button cancelBtnforSearch = new Button("Back");
cancelBtnforSearch.setLayoutX(50);
cancelBtnforSearch.setLayoutY(10);
cancelBtnforSearch.setOnAction(e-> primaryStage.setScene(scene));
// main stage
Button btnCancel = new Button();
btnCancel.setGraphic(new ImageView(cancelImage));
btnCancel.setGraphic(setImageView("cancel_btn.png", 0.5, 0.5));
btnCancel.setOnAction(e -> stop());
btnCancel.resize(15, 15);
Image searchImage = new Image(getClass().getResourceAsStream("searchBtn.png"));
Button searchBtn = new Button();
searchBtn.setGraphic(new ImageView(searchImage));
searchBtn.setGraphic(setImageView("search_btn.png", 0.5, 0.5));
searchBtn.setOnAction(e->primaryStage.setScene(searchScene));
searchBtn.resize(40, 40);
Image uploadImage = new Image(getClass().getResourceAsStream("uploadBtn.png"));
Button uploadBtn = new Button();
uploadBtn.setGraphic(new ImageView(uploadImage));
uploadBtn.setGraphic(setImageView("upload_btn.png", 0.5, 0.5));
uploadBtn.setOnAction(e->primaryStage.setScene(uploadScene));
uploadBtn.resize(40, 40);
......@@ -123,6 +120,14 @@ public class GUI extends Application {
primaryStage.setTitle("Image Processing for Dummies");
primaryStage.show();
}
public ImageView setImageView(String path, double x, double y){
ImageView imageView = new ImageView(new Image(getClass().getResourceAsStream(path)));
imageView.setScaleX(x);
imageView.setScaleY(y);
return imageView;
}
@Override
public void stop()
{
......
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment