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; } }