-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathShapeInformation.java
More file actions
67 lines (54 loc) · 1.86 KB
/
ShapeInformation.java
File metadata and controls
67 lines (54 loc) · 1.86 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
64
65
66
67
//Group Members
//Jonathan Dunsmore
//Arturo Blandon
//Howard Montes de Oca
//
package assignment.sample;
import javafx.scene.shape.Shape3D;
import javafx.stage.Stage;
//This class stores all the information we need to make a shape
public class ShapeInformation {
Shape3D shape;
double startingXCoordinate, startingYCoordinate;
char creationID;
boolean isSelected = false;
double currentXCoordinate;
String color;
public ShapeInformation(Shape3D s, double x, double y, char c){
shape = s;
startingXCoordinate = x;
startingYCoordinate = y;
creationID = c;
currentXCoordinate = x;
s.setTranslateX(x);
s.setTranslateY(y);
//this here shows we can do the clicked even inside here... just have to figure out how to get the information that its been clicked outside
//IF ALL ELSE FAILS
//We can move the creation of this object class to the main.java and simply use a global variable for which creationID is selected
shape.setOnMouseClicked(event -> {
isSelected = true;
});
}
public Shape3D getShape(){
return shape;
}
public double getStartingXCoordinate(){
return startingXCoordinate;
}
public double getStartingYCoordinate(){
return startingYCoordinate;
}
public char getCreationID(){ // this was intended to be what we tied to the object for when we select it with the mouse
return creationID;
}
//This was some stuff I was trying with booleans but it still wont function if I can't index into the vector within the lambda
public void select(){
isSelected = true;
}
public boolean isSelected(){
return isSelected;
}
public void resetSelected(){
isSelected = false;
}
}