Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
k2024
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
k2024
Commits
6d5517ca
Commit
6d5517ca
authored
1 year ago
by
Vesa Lappalainen
Browse files
Options
Downloads
Patches
Plain Diff
HT5 valmis
parent
98538430
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
luennot/live17/src/fxKerho/KerhoGUIController.java
+21
-1
21 additions, 1 deletion
luennot/live17/src/fxKerho/KerhoGUIController.java
with
21 additions
and
1 deletion
luennot/live17/src/fxKerho/KerhoGUIController.java
+
21
−
1
View file @
6d5517ca
...
...
@@ -6,6 +6,7 @@ import java.io.PrintStream;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
import
java.util.List
;
import
java.util.ResourceBundle
;
import
fi.jyu.mit.fxgui.ComboBoxChooser
;
...
...
@@ -21,6 +22,7 @@ import javafx.scene.control.ScrollPane;
import
javafx.scene.control.TextArea
;
import
javafx.scene.control.TextField
;
import
javafx.scene.text.Font
;
import
kerho.Harrastus
;
import
kerho.Jasen
;
import
kerho.Kerho
;
import
kerho.SailoException
;
...
...
@@ -97,7 +99,8 @@ public class KerhoGUIController implements Initializable {
@FXML
private
void
handleUusiHarrastus
()
{
Dialogs
.
showMessageDialog
(
"Ei osata vielä lisätä harrastusta"
);
// Dialogs.showMessageDialog("Ei osata vielä lisätä harrastusta");
uusiHarrastus
();
}
...
...
@@ -214,7 +217,13 @@ public class KerhoGUIController implements Initializable {
areaJasen
.
setText
(
""
);
try
(
PrintStream
os
=
TextAreaOutputStream
.
getTextPrintStream
(
areaJasen
))
{
os
.
println
(
"----------------------------------------------"
);
jasenKohdalla
.
tulosta
(
os
);
os
.
println
(
"----------------------------------------------"
);
List
<
Harrastus
>
harrastukset
=
kerho
.
annaHarrastukset
(
jasenKohdalla
);
for
(
Harrastus
har:
harrastukset
)
har
.
tulosta
(
os
);
os
.
println
(
"----------------------------------------------"
);
}
}
...
...
@@ -252,6 +261,17 @@ public class KerhoGUIController implements Initializable {
hae
(
uusi
.
getTunnusNro
());
}
private
void
uusiHarrastus
()
{
jasenKohdalla
=
chooserJasenet
.
getSelectedObject
();
if
(
jasenKohdalla
==
null
)
return
;
Harrastus
har
=
new
Harrastus
();
har
.
rekisteroi
();
har
.
vastaaPitsinNyplays
(
jasenKohdalla
.
getTunnusNro
());
// TODO: possauta oikea dialogi
kerho
.
lisaa
(
har
);
hae
(
jasenKohdalla
.
getTunnusNro
());
}
/**
* @param kerho Kerho jota käytetään tässä käyttöliittymässä
...
...
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