ReverseFFGColumnInfo.java :  » Game » FFGenie-2010.3-src » ffg » gui » table » column » Java Open Source

Java Open Source » Game » FFGenie 2010.3 src 
FFGenie 2010.3 src » ffg » gui » table » column » ReverseFFGColumnInfo.java
/*
 * 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();
    }
    
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.