@Test public void testSetColumns() { this.table.setModelProvider(provider); this.table.setPath(new Path("this.persons")); this.provider.setPresentationModel(this.groupModel); assertEquals("table.getRowCount()", 2, table.getRowCount()); assertEquals("table.getColumnCount()", 0, table.getColumnCount()); this.table.setColumns(this.def); assertEquals("table.getRowCount()", this.groupModel.persons.size(), table.getRowCount()); assertEquals("table.getColumnCount()", this.def.length, table.getColumnCount()); }
public void setColumns(BnColumn[] newCols) { BnColumn[] old = null; if (this.columns != null) { old = this.columns.toArray(new BnColumn[this.columns.size()]); this.disconnect(); } this.columns = Arrays.asList(newCols); this.connect(); super.firePropertyChange("columns", old, newCols); }
BnTable extends JTable implements View<IListPM<? extends PresentationModel>>, ModelSubscriber { public void setColumns(BnColumn[] newCols) { BnColumn[] old = null; if (this.columns != null) { old = this.columns.toArray(new BnColumn[this.columns.size()]); this.disconnect(); } this.columns = Arrays.asList(newCols); this.connect(); super.firePropertyChange("columns", old, newCols); } }
BnTable extends JTable implements View<IListPM<? extends PresentationModel>>, ModelSubscriber { public void setColumns(BnColumn[] newCols) { BnColumn[] old = null; if (this.columns != null) { old = this.columns.toArray(new BnColumn[this.columns.size()]); this.disconnect(); } this.columns = Arrays.asList(newCols); this.connect(); super.firePropertyChange("columns", old, newCols); } BnTable(); }
BnTable extends JTable implements View<IListPM<? extends PresentationModel>>, ModelSubscriber { public void setColumns(BnColumn[] newCols) { BnColumn[] old = null; if (this.columns != null) { old = this.columns.toArray(new BnColumn[this.columns.size()]); this.disconnect(); } this.columns = Arrays.asList(newCols); this.connect(); super.firePropertyChange("columns", old, newCols); } BnTable(); boolean isCellEditingAllowed(); void setCellEditingAllowed(boolean newValue); boolean isSortable(); void setSortable(boolean newValue); IListPM<? extends PresentationModel> getPresentationModel(); void setPresentationModel(IListPM<? extends PresentationModel> newModel); IModelProvider getModelProvider(); void setModelProvider(IModelProvider provider); Path getPath(); void setPath(Path path); BnColumn[] getColumns(); void addColumn(BnColumn newCol); void setColumns(BnColumn[] newCols); @Override void columnMarginChanged(ChangeEvent e); }
BnTable extends JTable implements View<IListPM<? extends PresentationModel>>, ModelSubscriber { public void setColumns(BnColumn[] newCols) { BnColumn[] old = null; if (this.columns != null) { old = this.columns.toArray(new BnColumn[this.columns.size()]); this.disconnect(); } this.columns = Arrays.asList(newCols); this.connect(); super.firePropertyChange("columns", old, newCols); } BnTable(); boolean isCellEditingAllowed(); void setCellEditingAllowed(boolean newValue); boolean isSortable(); void setSortable(boolean newValue); IListPM<? extends PresentationModel> getPresentationModel(); void setPresentationModel(IListPM<? extends PresentationModel> newModel); IModelProvider getModelProvider(); void setModelProvider(IModelProvider provider); Path getPath(); void setPath(Path path); BnColumn[] getColumns(); void addColumn(BnColumn newCol); void setColumns(BnColumn[] newCols); @Override void columnMarginChanged(ChangeEvent e);  }