@SuppressWarnings("unchecked") @Override public Class getColumnType(int arg0) { return table.getSchema().getColumnType(arg0); }
/** * Gets the class of a column. * @param columnIndex index of the column * @return class of the column */ public Class<?> getColumnClass(int columnIndex) { return table.getSchema().getColumnType(columnIndex); }
@SuppressWarnings("unchecked") @Override public Class getValueClass() { return table.getSchema().getColumnType(id); }
/** * Returns the most specific superclass for all the cell values in the column * This is used by the JTable to set up a default renderer * and editor for the column. * @param columnIndex the index of the column * @return the common ancestor class of the object values in the model. */ public Class<?> getColumnClass(int columnIndex) { return this.table.getSchema().getColumnType(columnIndex); }
/** * Gets the name of a column. * @param columnIndex index of the column * @return name of the column */ public String getColumnName(int columnIndex) { return table.getSchema().getColumnName(columnIndex); }
/** * Returns the name of the column at columnIndex. * This is used to initialize the table's column header name. * Note: this name does not need to be unique; two columns * in a table can have the same name. * @param columnIndex the index of the column * @return the name of the column */ public String getColumnName(int columnIndex) { return this.table.getSchema().getColumnName(columnIndex); }
@SuppressWarnings("unchecked") @Override public boolean canGet(String arg0, Class arg1) { return table.getSchema().canGet(arg0, arg1); }
@SuppressWarnings("unchecked") @Override public boolean canSet(String arg0, Class arg1) { return table.getSchema().canSet(arg0, arg1); }
@Override public int getColumnCount() { return table.getSchema().getColumnCount(); }
@Override public String getName() { return table.getSchema().getColumnName(id); }
@Override public int getColumnCount() { return table.getSchema().getColumnCount(); }
@Override public String getColumnName(int arg0) { return table.getSchema().getColumnName(arg0); }
@SuppressWarnings("unchecked") @Override public Class getColumnType(String arg0) { return table.getSchema().getColumnType(arg0); }
/** * Creates attributes vector from an obvious table. * @return vector from attributes */ protected FastVector createAttributes() { FastVector attributes = new FastVector(); for (int i = 0; i < table.getSchema().getColumnCount(); i++) { attributes.addElement(createAttribute(table.getSchema().getColumnName(i), table.getSchema().getColumnType(i))); } return attributes; }
@Override public boolean removeColumn(Column c) { return table.getSchema().removeColumn(c.getName()); }
@Override protected Column removeColumn(int arg0) { table.getSchema().removeColumn(arg0); return super.removeColumn(arg0); }
@Override public Column removeColumn(String arg0) { if (!table.getSchema().hasColumn(arg0)) { return null; } else { return removeColumn(this.getColumnNumber(arg0)); } }
@Override public boolean checkForAttributeType(int attType) { for (int i = 0; i < table.getSchema().getColumnCount(); i++) { if (attribute(i).type() == attType) { return true; } } return false; }
@Override public void removeColumn(Column arg0) { if (!table.getSchema().hasColumn(getColumnName(getColumnNumber(arg0)))) { return; } removeColumn(getColumnNumber(arg0)); }