Change the number of columns in this table. Resizes all rows to ensure the same number of columns in each row. Entries in the additional (empty) columns will be set to null. @param newCount
(int newCount)
| 1922 | * @param newCount |
| 1923 | */ |
| 1924 | public void setColumnCount(int newCount) { |
| 1925 | int oldCount = columns.length; |
| 1926 | if (oldCount != newCount) { |
| 1927 | columns = (Object[]) PApplet.expand(columns, newCount); |
| 1928 | // create new columns, default to String as the data type |
| 1929 | for (int c = oldCount; c < newCount; c++) { |
| 1930 | columns[c] = new String[rowCount]; |
| 1931 | } |
| 1932 | |
| 1933 | if (columnTitles != null) { |
| 1934 | columnTitles = PApplet.expand(columnTitles, newCount); |
| 1935 | } |
| 1936 | columnTypes = PApplet.expand(columnTypes, newCount); |
| 1937 | columnCategories = (HashMapBlows[]) |
| 1938 | PApplet.expand(columnCategories, newCount); |
| 1939 | } |
| 1940 | } |
| 1941 | |
| 1942 | |
| 1943 | public void setColumnType(String columnName, String columnType) { |
no test coverage detected