@Test public void testIdentityColumn() { final String[] propertyNames = {"this"}; final String[] columnLabels = {"Summary"}; final TableFormat<FootballTeam> footballTeamTableFormat = GlazedLists.tableFormat(propertyNames, columnLabels); assertSame(riders, footballTeamTableFormat.getColumnValue(riders, 0)); final boolean[] writable = {true}; try { GlazedLists.tableFormat(FootballTeam.class, propertyNames, columnLabels, writable); fail("failed to throw an exception for a writable column of property 'this'"); } catch (IllegalArgumentException iae) { } }
@Override public Object getColumnValue(E baseObject, int column) { if(baseObject == null) return null; if(beanProperties == null) loadPropertyDescriptors((Class<E>) baseObject.getClass()); return beanProperties[column].get(baseObject); }
BeanTableFormat implements WritableTableFormat<E>, AdvancedTableFormat<E> { @Override public Object getColumnValue(E baseObject, int column) { if(baseObject == null) return null; if(beanProperties == null) loadPropertyDescriptors((Class<E>) baseObject.getClass()); return beanProperties[column].get(baseObject); } }
BeanTableFormat implements WritableTableFormat<E>, AdvancedTableFormat<E> { @Override public Object getColumnValue(E baseObject, int column) { if(baseObject == null) return null; if(beanProperties == null) loadPropertyDescriptors((Class<E>) baseObject.getClass()); return beanProperties[column].get(baseObject); } BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels, boolean[] editable);  BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels); }
BeanTableFormat implements WritableTableFormat<E>, AdvancedTableFormat<E> { @Override public Object getColumnValue(E baseObject, int column) { if(baseObject == null) return null; if(beanProperties == null) loadPropertyDescriptors((Class<E>) baseObject.getClass()); return beanProperties[column].get(baseObject); } BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels, boolean[] editable);  BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels); @Override int getColumnCount(); @Override String getColumnName(int column); @Override Object getColumnValue(E baseObject, int column); @Override boolean isEditable(E baseObject, int column); @Override E setColumnValue(E baseObject, Object editedValue, int column); @Override Class getColumnClass(int column); @Override Comparator getColumnComparator(int column); }
BeanTableFormat implements WritableTableFormat<E>, AdvancedTableFormat<E> { @Override public Object getColumnValue(E baseObject, int column) { if(baseObject == null) return null; if(beanProperties == null) loadPropertyDescriptors((Class<E>) baseObject.getClass()); return beanProperties[column].get(baseObject); } BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels, boolean[] editable);  BeanTableFormat(Class<E> beanClass, String[] propertyNames, String[] columnLabels); @Override int getColumnCount(); @Override String getColumnName(int column); @Override Object getColumnValue(E baseObject, int column); @Override boolean isEditable(E baseObject, int column); @Override E setColumnValue(E baseObject, Object editedValue, int column); @Override Class getColumnClass(int column); @Override Comparator getColumnComparator(int column);  }