Base java event POC
This commit is contained in:
24
src/main/java/ovh/gasser/newshapes/Selection.java
Normal file
24
src/main/java/ovh/gasser/newshapes/Selection.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package ovh.gasser.newshapes;
|
||||
|
||||
import ovh.gasser.newshapes.attributes.SelectionAttributes;
|
||||
import ovh.gasser.newshapes.shapes.Shape;
|
||||
|
||||
public class Selection {
|
||||
|
||||
private final SelectionAttributes attributes;
|
||||
public final Shape shape;
|
||||
|
||||
public Selection(final Shape shape, boolean selected) {
|
||||
this(shape);
|
||||
attributes.selected = selected;
|
||||
}
|
||||
|
||||
private Selection(final Shape shape) {
|
||||
attributes = (SelectionAttributes) shape.getAttributes(SelectionAttributes.ID);
|
||||
this.shape = shape;
|
||||
}
|
||||
|
||||
public void unselect() {
|
||||
attributes.selected = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user