Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idatt1002_2023_9
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
Container 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
Andreas Kluge Svendsrud
idatt1002_2023_9
Commits
0ce4a521
Commit
0ce4a521
authored
1 year ago
by
Harry Linrui XU
Browse files
Options
Downloads
Patches
Plain Diff
Removed unnecessary methods
parent
d90723cb
No related branches found
No related tags found
1 merge request
!43
Merging frontend-testing into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/ntnu/idatt1002/demo/controller/SceneController.java
+2
-41
2 additions, 41 deletions
...va/no/ntnu/idatt1002/demo/controller/SceneController.java
with
2 additions
and
41 deletions
src/main/java/no/ntnu/idatt1002/demo/controller/SceneController.java
+
2
−
41
View file @
0ce4a521
...
...
@@ -15,14 +15,6 @@ public class SceneController {
private
Stage
stage
;
private
Scene
scene
;
public
void
switchStartMenu
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
getClass
().
getResource
(
"/view/FirstMenu.fxml"
));
Parent
root
=
loader
.
load
();
stage
=
(
Stage
)((
Node
)
event
.
getSource
()).
getScene
().
getWindow
();
scene
=
new
Scene
(
root
);
stage
.
setScene
(
scene
);
stage
.
show
();
}
public
void
switchNewBudget
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/NewBudget.fxml"
));
Parent
root
=
loader
.
load
();
...
...
@@ -33,16 +25,7 @@ public class SceneController {
}
public
void
switchIncome
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/MainMenuNew.fxml"
));
Parent
root
=
loader
.
load
();
stage
=
(
Stage
)((
Node
)
event
.
getSource
()).
getScene
().
getWindow
();
scene
=
new
Scene
(
root
);
stage
.
setScene
(
scene
);
stage
.
show
();
}
public
void
switchOverview
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/Overview.fxml"
));
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/newBudgetBudgert.fxml"
));
Parent
root
=
loader
.
load
();
stage
=
(
Stage
)((
Node
)
event
.
getSource
()).
getScene
().
getWindow
();
scene
=
new
Scene
(
root
);
...
...
@@ -51,35 +34,13 @@ public class SceneController {
}
public
void
switchMainMenu
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/MainMenu.fxml"
));
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/MainMenu
New
.fxml"
));
Parent
root
=
loader
.
load
();
stage
=
(
Stage
)((
Node
)
event
.
getSource
()).
getScene
().
getWindow
();
scene
=
new
Scene
(
root
);
stage
.
setScene
(
scene
);
stage
.
show
();
}
public
void
addIncome
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/addIncome.fxml"
));
Scene
newScene
=
new
Scene
(
loader
.
load
());
Stage
newStage
=
new
Stage
();
newStage
.
setScene
(
newScene
);
newStage
.
setResizable
(
false
);
newStage
.
initModality
(
Modality
.
APPLICATION_MODAL
);
newStage
.
show
();
}
public
void
underProgress
(
ActionEvent
event
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
SceneController
.
class
.
getResource
(
"/view/underProgress.fxml"
));
Scene
newScene
=
new
Scene
(
loader
.
load
());
Stage
newStage
=
new
Stage
();
newStage
.
setScene
(
newScene
);
newStage
.
setResizable
(
false
);
newStage
.
initModality
(
Modality
.
APPLICATION_MODAL
);
newStage
.
show
();
}
public
void
closeButton
(
ActionEvent
actionEvent
)
{
final
Node
source
=
(
Node
)
actionEvent
.
getSource
();
final
Stage
stage
=
(
Stage
)
source
.
getScene
().
getWindow
();
...
...
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