prefuse.data.query
Class DynamicQueryBinding

java.lang.Object
  extended by prefuse.data.query.DynamicQueryBinding
Direct Known Subclasses:
ListQueryBinding, RangeQueryBinding, SearchQueryBinding

public abstract class DynamicQueryBinding
extends java.lang.Object

Abstract base class for dynamic query bindings, which support data queries that can be dynamically edited with direct manipulation user interface components. DynamicQueryBinding instances take a particular field of a table, create a Predicate instance for filtering Tuples based on the values of that data field, and bind that Predicate to any number of user interface components that can be used to manipulate the parameters of the predicate.

Examples include dynamically filtering over a particular range of values (RangeQueryBinding), isolating specific categories of data (ListQueryBinding), and performing text search over data (SearchQueryBinding).

Author:
jeffrey heer

Field Summary
protected  java.lang.String m_field
          The data field processed by the query.
protected  Predicate m_query
          The actual query over Table data.
protected  TupleSet m_tuples
          The TupleSet processed by the query.
 
Constructor Summary
protected DynamicQueryBinding(TupleSet tupleSet, java.lang.String field)
          Create a new DynamicQueryBinding.
 
Method Summary
abstract  javax.swing.JComponent createComponent()
          Generates a new user interface component for dynamically adjusting the query values.
 Predicate getPredicate()
          Returns the query predicate bound to this dynamic query.
protected  void setPredicate(Predicate p)
          Sets the dynamic query predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_query

protected Predicate m_query
The actual query over Table data.


m_tuples

protected TupleSet m_tuples
The TupleSet processed by the query.


m_field

protected java.lang.String m_field
The data field processed by the query.

Constructor Detail

DynamicQueryBinding

protected DynamicQueryBinding(TupleSet tupleSet,
                              java.lang.String field)
Create a new DynamicQueryBinding. Called by subclasses.

Parameters:
tupleSet - the TupleSet to query
field - the data field (Table column) to query
Method Detail

getPredicate

public Predicate getPredicate()
Returns the query predicate bound to this dynamic query. The predicate's behavior can vary dynamically based on interaction with user interface components created by this binding. To automatically monitor changes to this predicate, clients should register an ExpressionListener with the Predicate returned by this method.

Returns:
the dynamic query Predicate

setPredicate

protected void setPredicate(Predicate p)
Sets the dynamic query predicate. For class-internal use only.

Parameters:
p - the predicate to set

createComponent

public abstract javax.swing.JComponent createComponent()
Generates a new user interface component for dynamically adjusting the query values. The type of the component depends on the subclass of DynamicQueryBinding being used. Some subclasses can generate multiple types of user interface components. Such classes will include additional methods for generating the specific kinds of components supported.

Returns:
a user interface component for adjusting the query.


Copyright © 2007 Regents of the University of California