Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kerho8
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
Model registry
Operate
Environments
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
kerhoja
kerho20
kerho8
Commits
24b572d6
Commit
24b572d6
authored
5 years ago
by
Vesa Lappalainen
Browse files
Options
Downloads
Patches
Plain Diff
Vaihe 7.1.3 - Harrastusten tietojen tilapainen nayttaminen
parent
008168da
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
kerho.jar
+0
-0
0 additions, 0 deletions
kerho.jar
src/fxKerho/KerhoGUIController.java
+24
-0
24 additions, 0 deletions
src/fxKerho/KerhoGUIController.java
src/fxKerho/KerhoGUIView.fxml
+1
-1
1 addition, 1 deletion
src/fxKerho/KerhoGUIView.fxml
with
25 additions
and
1 deletion
kerho.jar
+
0
−
0
View file @
24b572d6
No preview for this file type
This diff is collapsed.
Click to expand it.
src/fxKerho/KerhoGUIController.java
+
24
−
0
View file @
24b572d6
...
...
@@ -14,6 +14,7 @@ import fi.jyu.mit.fxgui.ComboBoxChooser;
import
fi.jyu.mit.fxgui.Dialogs
;
import
fi.jyu.mit.fxgui.ListChooser
;
import
fi.jyu.mit.fxgui.ModalController
;
import
fi.jyu.mit.fxgui.StringGrid
;
import
fi.jyu.mit.fxgui.TextAreaOutputStream
;
import
javafx.application.Platform
;
import
javafx.fxml.FXML
;
...
...
@@ -43,6 +44,7 @@ public class KerhoGUIController implements Initializable {
@FXML
private
Label
labelVirhe
;
@FXML
private
ScrollPane
panelJasen
;
@FXML
private
ListChooser
<
Jasen
>
chooserJasenet
;
@FXML
private
StringGrid
<
Harrastus
>
tableHarrastukset
;
@FXML
private
TextField
editNimi
;
@FXML
private
TextField
editHetu
;
@FXML
private
TextField
editKatuosoite
;
...
...
@@ -228,6 +230,7 @@ public class KerhoGUIController implements Initializable {
if
(
jasenKohdalla
==
null
)
return
;
JasenDialogController
.
naytaJasen
(
edits
,
jasenKohdalla
);
naytaHarrastukset
(
jasenKohdalla
);
}
...
...
@@ -279,6 +282,27 @@ public class KerhoGUIController implements Initializable {
}
private
void
naytaHarrastukset
(
Jasen
jasen
)
{
tableHarrastukset
.
clear
();
if
(
jasen
==
null
)
return
;
try
{
List
<
Harrastus
>
harrastukset
=
kerho
.
annaHarrastukset
(
jasen
);
if
(
harrastukset
.
size
()
==
0
)
return
;
for
(
Harrastus
har:
harrastukset
)
naytaHarrastus
(
har
);
}
catch
(
SailoException
e
)
{
// naytaVirhe(e.getMessage());
}
}
private
void
naytaHarrastus
(
Harrastus
har
)
{
String
[]
rivi
=
har
.
toString
().
split
(
"\\|"
);
// TODO: huono ja tilapäinen ratkaisu
tableHarrastukset
.
add
(
har
,
rivi
[
2
],
rivi
[
3
],
rivi
[
4
]);
}
/**
* Tekee uuden tyhjän harrastuksen editointia varten
*/
...
...
This diff is collapsed.
Click to expand it.
src/fxKerho/KerhoGUIView.fxml
+
1
−
1
View file @
24b572d6
...
...
@@ -173,7 +173,7 @@
<Label
text=
"Jäsenen harrastukset"
BorderPane.alignment=
"CENTER"
/>
</top>
<center>
<StringGrid
editable=
"true"
rivit=
"ala|aloitusvuosi|h/vko kalastus|1955|20 laiskottelu|1950|20 työn pakoilu|1952|40"
BorderPane.alignment=
"CENTER"
/>
<StringGrid
fx:id=
"tableHarrastukset"
editable=
"true"
rivit=
"ala|aloitusvuosi|h/vko kalastus|1955|20 laiskottelu|1950|20 työn pakoilu|1952|40"
BorderPane.alignment=
"CENTER"
/>
</center>
</BorderPane>
</items>
...
...
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