public void setCols(int cols) {
        if (this.cols != cols) {
            this.cols = cols <= 0 ? 1 : cols;
            // changeLayout();
            layoutChanged = true;
            damagedArea = new BoundaryRectangle(0, 0, width, height);
            if (group != null) {
                group.damage(new BoundaryRectangle(x, y, width, height));
                group.resizeChild(this);
            }
        }
    }