public CoreEntity addView(Shape2D shape) { View component = (View) recoverComponent(CoreComponentsLookup.View); if (component == null) { component = new View(shape); } else { component.shape = shape; } addComponent(CoreComponentsLookup.View, component); return this; }
public CoreEntity replaceView(Shape2D shape) { View component = (View) recoverComponent(CoreComponentsLookup.View); if (component == null) { component = new View(shape); } else { component.shape = shape; } replaceComponent(CoreComponentsLookup.View, component); return this; }
@Override public Shape2D getBounds() { return bounds; }
public View(Shape2D shape) { this.shape = shape; }
/** * Constructor for a ShapeModel. * * @param type The model's type. * @param shape The model's shape. */ ShapeModel(ModelType type, Shape2D shape) { this.type = type; this.shape = shape; }
/** * Getter for the model's shape. * * @return this model's shape. */ public Shape2D getShape() { return shape; }
public abstract Shape2D getBounds();