Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IDATT2003_gr43-Programmering 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
August Reitan Bøgseth
IDATT2003_gr43-Programmering 2
Commits
3b520403
Commit
3b520403
authored
1 year ago
by
Johan Martin Arntsen
Browse files
Options
Downloads
Patches
Plain Diff
refactor FileInputPage
parent
d021f648
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/edu/ntnu/stud/view/FileInputPage.java
+5
-7
5 additions, 7 deletions
src/main/java/edu/ntnu/stud/view/FileInputPage.java
with
5 additions
and
7 deletions
src/main/java/edu/ntnu/stud/view/FileInputPage.java
+
5
−
7
View file @
3b520403
...
@@ -76,17 +76,11 @@ public class FileInputPage {
...
@@ -76,17 +76,11 @@ public class FileInputPage {
* @return the left menu of the file input page
* @return the left menu of the file input page
*/
*/
public
VBox
getLeftMenu
(
SceneController
sceneController
)
{
public
VBox
getLeftMenu
(
SceneController
sceneController
)
{
VBox
leftMenu
=
new
VBox
();
Text
titleText
=
new
Text
(
"File Input"
);
Text
titleText
=
new
Text
(
"File Input"
);
titleText
.
setFont
(
Font
.
font
(
""
,
20
));
titleText
.
setFont
(
Font
.
font
(
""
,
20
));
PageMenu
pageMenu
=
new
PageMenu
(
sceneController
);
MenuButton
menuButton
=
pageMenu
.
getMenuButton
();
HBox
filePathBox
=
new
HBox
();
HBox
filePathBox
=
new
HBox
();
Label
filePathLabel
=
new
Label
(
"File path:"
);
TextField
filePathField
=
new
TextField
();
TextField
filePathField
=
new
TextField
();
filePathField
.
setPromptText
(
"Paste file path here"
);
filePathField
.
setPromptText
(
"Paste file path here"
);
...
@@ -121,7 +115,6 @@ public class FileInputPage {
...
@@ -121,7 +115,6 @@ public class FileInputPage {
Button
plus10000Button
=
new
Button
(
"+ 10 000"
);
Button
plus10000Button
=
new
Button
(
"+ 10 000"
);
plus10000Button
.
setOnAction
(
e
->
CanvasObserver
.
update
(
10000
,
canvas
,
chaosGame
));
plus10000Button
.
setOnAction
(
e
->
CanvasObserver
.
update
(
10000
,
canvas
,
chaosGame
));
HBox
iterationsBox
=
new
HBox
();
TextField
iterationsField
=
new
TextField
();
TextField
iterationsField
=
new
TextField
();
iterationsField
.
setPromptText
(
"Iterations"
);
iterationsField
.
setPromptText
(
"Iterations"
);
Button
plusIterationsButton
=
new
Button
(
"+"
);
Button
plusIterationsButton
=
new
Button
(
"+"
);
...
@@ -135,6 +128,7 @@ public class FileInputPage {
...
@@ -135,6 +128,7 @@ public class FileInputPage {
CanvasObserver
.
update
(
iterations
,
canvas
,
chaosGame
);
CanvasObserver
.
update
(
iterations
,
canvas
,
chaosGame
);
});
});
iterationsField
.
setMaxWidth
(
70
);
iterationsField
.
setMaxWidth
(
70
);
HBox
iterationsBox
=
new
HBox
();
iterationsBox
.
getChildren
().
addAll
(
plusIterationsButton
,
iterationsField
);
iterationsBox
.
getChildren
().
addAll
(
plusIterationsButton
,
iterationsField
);
HBox
iterationsButtonsBox
=
new
HBox
();
HBox
iterationsButtonsBox
=
new
HBox
();
...
@@ -161,6 +155,10 @@ public class FileInputPage {
...
@@ -161,6 +155,10 @@ public class FileInputPage {
Region
spacer
=
new
Region
();
Region
spacer
=
new
Region
();
VBox
.
setVgrow
(
spacer
,
Priority
.
ALWAYS
);
VBox
.
setVgrow
(
spacer
,
Priority
.
ALWAYS
);
VBox
leftMenu
=
new
VBox
();
PageMenu
pageMenu
=
new
PageMenu
(
sceneController
);
MenuButton
menuButton
=
pageMenu
.
getMenuButton
();
Label
filePathLabel
=
new
Label
(
"File path:"
);
leftMenu
.
getChildren
().
addAll
(
leftMenu
.
getChildren
().
addAll
(
menuButton
,
menuButton
,
titleText
,
titleText
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment