@Override
    public void resize(int width, int height) {
        if (this.width != width || this.height != height) {
            if (group != null) {
                group.damage(new BoundaryRectangle(x, y, this.width, this.height));
            }
            this.width = width;
            this.height = height;
            if (group != null) {
                group.resizeChild(this);
                group.damage(new BoundaryRectangle(x, y, width, height));
            }
        }
    }