Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ohj2
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
vvlaspa
ohj2
Commits
cfad1b44
Commit
cfad1b44
authored
1 month ago
by
Läspä Vili Valtteri
Browse files
Options
Downloads
Patches
Plain Diff
Liikkeiden näyttäminen
parent
25bb4870
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
puntti/src/fxPuntti/PunttiGUIController.java
+24
-0
24 additions, 0 deletions
puntti/src/fxPuntti/PunttiGUIController.java
puntti/src/fxPuntti/PunttiGUIView.fxml
+1
-1
1 addition, 1 deletion
puntti/src/fxPuntti/PunttiGUIView.fxml
with
25 additions
and
1 deletion
puntti/src/fxPuntti/PunttiGUIController.java
+
24
−
0
View file @
cfad1b44
package
fxPuntti
;
import
java.io.PrintStream
;
import
java.net.URL
;
import
java.util.ResourceBundle
;
import
fi.jyu.mit.fxgui.Dialogs
;
import
fi.jyu.mit.fxgui.ListChooser
;
import
fi.jyu.mit.fxgui.ModalController
;
import
fi.jyu.mit.fxgui.TextAreaOutputStream
;
import
javafx.fxml.FXML
;
import
javafx.fxml.Initializable
;
import
javafx.scene.control.ScrollPane
;
import
javafx.scene.control.TextArea
;
import
javafx.scene.text.Font
;
import
puntti.Liike
;
import
puntti.Puntti
;
import
puntti.SailoException
;
...
...
@@ -21,6 +26,7 @@ import puntti.SailoException;
public
class
PunttiGUIController
implements
Initializable
{
@FXML
private
ListChooser
<
Liike
>
chooserLiikkeet
;
@FXML
private
ScrollPane
panelLiike
;
...
...
@@ -68,10 +74,28 @@ public class PunttiGUIController implements Initializable{
* puntti mitä käytetään
*/
private
Puntti
puntti
;
private
TextArea
areaLiike
=
new
TextArea
();
//Poista lopuksi
private
void
alusta
()
{
chooserLiikkeet
.
clear
();
chooserLiikkeet
.
addSelectionListener
(
e
->
naytaLiike
());
panelLiike
.
setContent
(
areaLiike
);
areaLiike
.
setFont
(
new
Font
(
"Arial"
,
12
));
panelLiike
.
setFitToHeight
(
true
);
}
private
void
naytaLiike
()
{
Liike
liikeKohdalla
=
chooserLiikkeet
.
getSelectedObject
();
if
(
liikeKohdalla
==
null
)
return
;
areaLiike
.
setText
(
""
);
try
(
PrintStream
os
=
TextAreaOutputStream
.
getTextPrintStream
(
areaLiike
)){
liikeKohdalla
.
tulosta
(
os
);
}
}
private
void
lueTiedosto
(
@SuppressWarnings
(
"unused"
)
String
nimi
)
{
...
...
This diff is collapsed.
Click to expand it.
puntti/src/fxPuntti/PunttiGUIView.fxml
+
1
−
1
View file @
cfad1b44
...
...
@@ -80,7 +80,7 @@
<items>
<BorderPane>
<center>
<ScrollPane
fitToWidth=
"true"
prefHeight=
"200.0"
prefWidth=
"200.0"
BorderPane.alignment=
"CENTER"
>
<ScrollPane
fx:id =
"panelLiike"
fitToWidth=
"true"
prefHeight=
"200.0"
prefWidth=
"200.0"
BorderPane.alignment=
"CENTER"
>
<content>
<GridPane
hgap=
"10.0"
>
<columnConstraints>
...
...
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