Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
k2022
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
tie
ohj2
esimerkit
k2022
Commits
ca8c412a
Commit
ca8c412a
authored
3 years ago
by
Vesa Lappalainen
Browse files
Options
Downloads
Patches
Plain Diff
kerho annettu konrollerille
parent
7f5189a1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
luennot/live14/src/fxKerho/KerhoGUIController.java
+12
-0
12 additions, 0 deletions
luennot/live14/src/fxKerho/KerhoGUIController.java
luennot/live14/src/fxKerho/KerhoMain.java
+4
-0
4 additions, 0 deletions
luennot/live14/src/fxKerho/KerhoMain.java
with
16 additions
and
0 deletions
luennot/live14/src/fxKerho/KerhoGUIController.java
+
12
−
0
View file @
ca8c412a
...
@@ -15,6 +15,7 @@ import javafx.fxml.FXML;
...
@@ -15,6 +15,7 @@ import javafx.fxml.FXML;
import
javafx.fxml.Initializable
;
import
javafx.fxml.Initializable
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.TextField
;
import
javafx.scene.control.TextField
;
import
kerho.Kerho
;
/**
/**
* Luokka kerhon käyttöliittymän tapahtumien hoitamiseksi.
* Luokka kerhon käyttöliittymän tapahtumien hoitamiseksi.
...
@@ -113,6 +114,8 @@ public class KerhoGUIController implements Initializable {
...
@@ -113,6 +114,8 @@ public class KerhoGUIController implements Initializable {
//===========================================================================================
//===========================================================================================
// Tästä eteenpäin ei käyttöliittymään suoraan liittyvää koodia
// Tästä eteenpäin ei käyttöliittymään suoraan liittyvää koodia
private
Kerho
kerho
;
private
void
naytaVirhe
(
String
virhe
)
{
private
void
naytaVirhe
(
String
virhe
)
{
if
(
virhe
==
null
||
virhe
.
isEmpty
()
)
{
if
(
virhe
==
null
||
virhe
.
isEmpty
()
)
{
labelVirhe
.
setText
(
""
);
labelVirhe
.
setText
(
""
);
...
@@ -187,4 +190,13 @@ public class KerhoGUIController implements Initializable {
...
@@ -187,4 +190,13 @@ public class KerhoGUIController implements Initializable {
}
}
}
}
/**
* Astetaan käytettävä kerho
* @param kerho jota käytetään
*/
public
void
setKerho
(
Kerho
kerho
)
{
this
.
kerho
=
kerho
;
}
}
}
This diff is collapsed.
Click to expand it.
luennot/live14/src/fxKerho/KerhoMain.java
+
4
−
0
View file @
ca8c412a
...
@@ -3,6 +3,7 @@ package fxKerho;
...
@@ -3,6 +3,7 @@ package fxKerho;
import
javafx.application.Application
;
import
javafx.application.Application
;
import
javafx.application.Platform
;
import
javafx.application.Platform
;
import
javafx.stage.Stage
;
import
javafx.stage.Stage
;
import
kerho.Kerho
;
import
javafx.scene.Scene
;
import
javafx.scene.Scene
;
import
javafx.scene.layout.Pane
;
import
javafx.scene.layout.Pane
;
import
javafx.fxml.FXMLLoader
;
import
javafx.fxml.FXMLLoader
;
...
@@ -26,6 +27,9 @@ public class KerhoMain extends Application {
...
@@ -26,6 +27,9 @@ public class KerhoMain extends Application {
primaryStage
.
setScene
(
scene
);
primaryStage
.
setScene
(
scene
);
primaryStage
.
setTitle
(
"Kerho"
);
primaryStage
.
setTitle
(
"Kerho"
);
Kerho
kerho
=
new
Kerho
();
kerhoCtrl
.
setKerho
(
kerho
);
// Platform.setImplicitExit(false); // tätä ei kai saa laittaa
// Platform.setImplicitExit(false); // tätä ei kai saa laittaa
primaryStage
.
setOnCloseRequest
((
event
)
->
{
primaryStage
.
setOnCloseRequest
((
event
)
->
{
...
...
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