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
).
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
DynamicQueryBinding(TupleSet tupleSet,
java.lang.String field)
Create a new DynamicQueryBinding.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected Predicate m_query
protected TupleSet m_tuples
protected java.lang.String m_field
protected DynamicQueryBinding(TupleSet tupleSet, java.lang.String field)
tupleSet
- the TupleSet to queryfield
- the data field (Table column) to querypublic Predicate getPredicate()
ExpressionListener
with the
Predicate
returned by this method.Predicate
protected void setPredicate(Predicate p)
p
- the predicate to setpublic abstract javax.swing.JComponent createComponent()
Copyright ? 2013 Regents of the University of California