/*
* ReverseFFGColumnInfo.java
*
* Created on 2 July 2007, 10:50
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package ffg.gui.table.column;
import ca.odell.glazedlists.GlazedLists;
import ffg.gui.table.filter.FilterOperator;
import java.util.List;
/**
* Decorates an instance of {@link FFGColumnInfo} and reverses the comparator.
* @param <E> The type returned by the column.
* @author eugene
*/
public class ReverseFFGColumnInfo<E> extends AbstractFFGColumnInfo<E> {
private final FFGColumnInfo<E> decorated;
/**
* Creates a new instance of ReverseFFGColumnInfo
* @param decorated
*/
public ReverseFFGColumnInfo(FFGColumnInfo<E> decorated) {
super(decorated.getClassValue(), GlazedLists.reverseComparator(decorated.getComparator()));
this.decorated = decorated;
}
/**
* {@inheritDoc}
*/
public List<FilterOperator<E, ?>> getFilterOperators() {
return decorated.getFilterOperators();
}
/**
* {@inheritDoc}
*/
public FilterOperator<E, ?> getDefaultFilterOperator() {
return decorated.getDefaultFilterOperator();
}
/**
* {@inheritDoc}
*/
public Object getDefaultFilterValue() {
return decorated.getDefaultFilterValue();
}
}
|