-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJumpingPegsController.java
143 lines (97 loc) · 2.98 KB
/
JumpingPegsController.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package jumpingpegsiii;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.image.Image;
/**
*
* @author hhira
*/
public class JumpingPegsController {
@FXML
private Label labelMovingNow;
@FXML
private ImageView imageView9;
@FXML
private ImageView imageView14;
@FXML
private ImageView imageView8;
@FXML
private ImageView imageView13;
@FXML
private ImageView imageView12;
@FXML
private HBox hboxPegBoard;
@FXML
private ImageView imageView11;
@FXML
private ImageView imgViewBackground;
@FXML
private ImageView imageView5;
@FXML
private ImageView imageView4;
@FXML
private Label labelSwaps;
@FXML
private ImageView imageView7;
@FXML
private TextField textFieldSystemMsg;
@FXML
private ImageView imageView6;
@FXML
private ImageView imageView1;
@FXML
private Button ButtonMove;
@FXML
private ImageView imageView3;
@FXML
private ImageView imageView2;
@FXML
private Label labelSystemMsg;
@FXML
private ImageView imageView10;
@FXML
private TextField TextFieldSwaps;
@FXML
private TextField textFieldMoveNow;
@FXML
private AnchorPane anchorPanelMain;
private Image[] iconImage;
private Image[] iconImage1;
private Image[] iconImage2;
private Image blankImage;
public void initialize() {
int qtyleftpegs = 3;
int qtyrightpegs =3;
iconImage = new Image[qtyleftpegs+qtyrightpegs];
iconImage2 = new Image[qtyrightpegs];
iconImage[0]=new Image("file:C\\jumpingPegs\\img\\car1.jpg");
iconImage[1]=new Image("file:C\\jumpingPegs\\img\\car1.jpg");
iconImage[2]=new Image("file:C\\jumpingPegs\\img\\car1.jpg");
iconImage[4]=new Image("file:C\\jumpingPegs\\img\\car2.jpg");
iconImage[5]=new Image("file:C\\jumpingPegs\\img\\car2.jpg");
iconImage[6]=new Image("file:C\\jumpingPegs\\img\\car2.jpg");
// imageView5.setImage(iconImage[0]);
// imageView6.setImage(iconImage[1]);
// imageView7.setImage(iconImage[2]);
// imageView9.setImage(iconImage[4]);
// imageView10.setImage(iconImage[5]);
// imageView11.setImage(iconImage[6]);
}
public void buttonMoveListener()
{
// console message
System.out.println("MOVE");
}
}