public void revertToDefault(){
  stopListening();
  DataLineModel<?,?> dlm=(DataLineModel<?,?>)table.getModel();
  for (int i=0; i < dlm.getColumnCount(); i++) {
    LimeTableColumn ltc=dlm.getTableColumn(i);
    setVisibility(ltc,ltc.getDefaultVisibility());
    setOrder(ltc,ltc.getDefaultOrder());
    setWidth(ltc,ltc.getDefaultWidth());
    try {
      if (!table.isColumnVisible(ltc.getId())) {
        table.setColumnVisible(ltc.getId(),true);
        if (listener != null)         listener.columnAdded(ltc,table);
      }
    }
 catch (    LastColumnException impossible) {
    }
  }
  TableColumnModel tcm=table.getColumnModel();
  for (int i=0; i < dlm.getColumnCount(); i++) {
    LimeTableColumn ltc=dlm.getTableColumn(i);
    int order=getOrder(ltc);
    int current=tcm.getColumnIndex(ltc.getId());
    if (current != order)     tcm.moveColumn(current,order);
    ltc.setPreferredWidth(ltc.getDefaultWidth());
  }
  for (int i=0; i < dlm.getColumnCount(); i++) {
    LimeTableColumn ltc=dlm.getTableColumn(i);
    boolean wantVis=getVisibility(ltc);
    try {
      if (!wantVis) {
        table.setColumnVisible(ltc.getId(),false);
        if (listener != null)         listener.columnRemoved(ltc,table);
      }
    }
 catch (    LastColumnException ignored) {
    }
  }
  startListening();
  save();
}

public void revertToDefault ( ) { stopListening ( ) ; DataLineModel < ? , ? > dlm = ( DataLineModel < ? , ? > ) table . getModel ( ) ; for ( int i = 0 ; i < dlm . getColumnCount ( ) ; i ++ ) { LimeTableColumn ltc = dlm . getTableColumn ( i ) ; setVisibility ( ltc , ltc . getDefaultVisibility ( ) ) ; setOrder ( ltc , ltc . getDefaultOrder ( ) ) ; setWidth ( ltc , ltc . getDefaultWidth ( ) ) ; try { if ( ! table . isColumnVisible ( ltc . getId ( ) ) ) { table . setColumnVisible ( ltc . getId ( ) , true ) ; if ( listener != null ) listener . columnAdded ( ltc , table ) ; } } catch ( LastColumnException impossible ) { } } TableColumnModel tcm = table . getColumnModel ( ) ; for ( int i = 0 ; i < dlm . getColumnCount ( ) ; i ++ ) { LimeTableColumn ltc = dlm . getTableColumn ( i ) ; int order = getOrder ( ltc ) ; int current = tcm . getColumnIndex ( ltc . getId ( ) ) ; if ( current != order ) tcm . moveColumn ( current , order ) ; ltc . setPreferredWidth ( ltc . getDefaultWidth ( ) ) ; } for ( int i = 0 ; i < dlm . getColumnCount ( ) ; i ++ ) { LimeTableColumn ltc = dlm . getTableColumn ( i ) ; boolean wantVis = getVisibility ( ltc ) ; try { if ( ! wantVis ) { table . setColumnVisible ( ltc . getId ( ) , false ) ; if ( listener != null ) listener . columnRemoved ( ltc , table ) ; } } catch ( LastColumnException ignored ) { } } startListening ( ) ; save ( ) ; }
reverts this table ' s header preferences to their default values .
