- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTile.java
More file actions
Latest commit
63 lines (54 loc) · 1.44 KB
/
Copy pathTile.java
File metadata and controls
63 lines (54 loc) · 1.44 KB
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
importjavafx.scene.layout.StackPane;
importjavafx.scene.shape.Rectangle;
importjavafx.scene.text.Text;
importjavafx.scene.text.Font;
importjavafx.scene.paint.Color;
/**
* @author Thomas L Jessop
* @since 2018-10-26
* @version 1.2
* @param tileText set as class variable for mutilmethod actcess
*
*/
publicclassTileextendsStackPane{
privateTexttileText = newText();
/**
* Tile constrctor
* @param boader for seeing the egde of the tiles
* @param tileText
*/
Tile(){
Rectangleboader = newRectangle(200, 200);
boader.setStroke(Color.BLACK);
boader.setFill(null);
tileText = newText("...");
tileText.setFont(newFont(72));
getChildren().addAll(boader, tileText);
}//Tile
/**
* Sets test of the tile
* @param passText
*/
publicvoidsetTileText(StringpassText){
this.tileText.setText(passText);
}//setTileText
/**
* Get the tile's text in string form
* @return
*/
publicStringgetTextValue() {
returntileText.getText();
}//getTextValue
/**
* Tests if tileText is default value
* @return
*/
publicbooleanisTileActive() {
if (tileText.getText().equals("...")) {
returnfalse;
}//if tileText is default value
else{
returntrue;
}//else tileText is default value
}//isTileActive
}//class Tile