prefuse.data.util
Class NamedColumnProjection

java.lang.Object
  extended by prefuse.data.util.AbstractColumnProjection
      extended by prefuse.data.util.NamedColumnProjection
All Implemented Interfaces:
ColumnProjection

public class NamedColumnProjection
extends AbstractColumnProjection

ColumnProjection instance that includes or excludes columns based on the column name.

Author:
jeffrey heer

Constructor Summary
NamedColumnProjection(java.lang.String[] names, boolean include)
          Create a new NamedColumnProjection.
NamedColumnProjection(java.lang.String name, boolean include)
          Create a new NamedColumnProjection.
 
Method Summary
 void addName(java.lang.String name)
          Add a column name to this projection.
 boolean include(Column col, java.lang.String name)
          Determine if the given Column should be included.
 boolean removeName(java.lang.String name)
          Remove a column name from this projection
 
Methods inherited from class prefuse.data.util.AbstractColumnProjection
addProjectionListener, fireUpdate, removeProjectionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedColumnProjection

public NamedColumnProjection(java.lang.String name,
                             boolean include)
Create a new NamedColumnProjection.

Parameters:
name - the name to filter on
include - true to include the given names (and exclude all others), false to exclude them (and include all others)

NamedColumnProjection

public NamedColumnProjection(java.lang.String[] names,
                             boolean include)
Create a new NamedColumnProjection.

Parameters:
names - the names to filter on
include - true to include the given names (and exclude all others), false to exclude them (and include all others)
Method Detail

addName

public void addName(java.lang.String name)
Add a column name to this projection.

Parameters:
name - the column name to add

removeName

public boolean removeName(java.lang.String name)
Remove a column name from this projection

Parameters:
name - the column name to remove
Returns:
true if the name was succesffuly removed, false otherwise

include

public boolean include(Column col,
                       java.lang.String name)
Description copied from interface: ColumnProjection
Determine if the given Column should be included.

Parameters:
col - the Column to test
name - the name of the column
Returns:
true if the column passes the projection, false otherwise
See Also:
ColumnProjection.include(prefuse.data.column.Column, java.lang.String)


Copyright © 2007 Regents of the University of California