IdentityBeanTableColumn.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 » IdentityBeanTableColumn.java
/*
 * IdentityBeanTableColumn.java
 *
 * Created on 18 May 2006, 15:25
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ffg.gui.table.column;

import ffg.game.GameStats;
import ffg.gui.table.renderer.TableCellRendererDecorator;

/**
 * A bean column based on the {@link GameStats} object itself
 * @author eugeneh
 * @param <T> The subclass of {@link GameStats}
 * @param <V> The value that is returned.
 */
public class IdentityBeanTableColumn<T extends GameStats, V> extends AbstractBeanTableColumn<T, V, T>{
    
    /**
     * Creates a new instance of IdentityBeanTableColumn 
     * @param beanName The name of the bean, must confirm to the JavaBean specification.
     * @param columnName The column's name
     * @param columnInfo The column's metadata
     * @param rendererDecorator The decorator for the renderer.
     */
    public IdentityBeanTableColumn(String beanName, String columnName, FFGColumnInfo<V> columnInfo, TableCellRendererDecorator rendererDecorator) {
        super(beanName, columnName, columnInfo, rendererDecorator);
    }

    /**
     * Always returns the given T
     * @param firstObject The base subclass of {@link GameStats}
     * @return as above
     */
    @Override
    public final T getBaseObject(T firstObject) {
        return firstObject;
    }

    /**
     * Always returns <code>true</code>
     * @return <code>true</code>
     */
    @Override
    public boolean isFilterable() {
        return true;
    }
}
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.