Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
AutolaskuriController.java
Go to the documentation of this file.
1
package
autolaskuri.basic;
2
3
import
javafx.fxml.FXML;
4
import
javafx.scene.control.Label;
5
6
/**
7
* Yksinkertainen autolaskuri, jossa painkikkeita painamalla
8
* voidaan kasvattaa laskureiden arvoja
9
* @author vesal
10
* @version 5.3.2016
11
*/
12
public
class
AutolaskuriController
{
13
@FXML
private
Label
laskuriHA
;
14
@FXML
private
Label
laskuriKA
;
15
private
int
ha
= 0;
16
private
int
ka
= 0;
17
18
@FXML
void
handleHA
() {
19
laskuriHA
.setText(
""
+ ++
ha
);
20
}
21
22
@FXML
void
handleKA
() {
23
laskuriKA
.setText(
""
+ ++
ka
);
24
}
25
26
@FXML
void
handleNollaa
() {
27
laskuriHA
.setText(
""
+ (
ha
=0));
28
laskuriKA
.setText(
""
+ (
ka
=0));
29
}
30
}
trunk
Examples
src
autolaskuri
basic
AutolaskuriController.java
Generated on Sat Feb 4 2017 23:18:37 by
1.8.3