Package docking.widgets.table.constraint
Class SingleValueColumnConstraint<T>
- java.lang.Object
 - 
- docking.widgets.table.constraint.SingleValueColumnConstraint<T>
 
 
- 
- Type Parameters:
 T- the column type
- All Implemented Interfaces:
 ColumnConstraint<T>,java.lang.Comparable<ColumnConstraint<T>>
- Direct Known Subclasses:
 AtLeastColumnConstraint,AtLeastDateColumnConstraint,AtMostColumnConstraint,AtMostDateColumnConstraint
public abstract class SingleValueColumnConstraint<T> extends java.lang.Object implements ColumnConstraint<T>
Abstract base class for single value constraints such as "At Most" or "At Least" 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected EditorProvider<T>editorProviderprotected java.lang.StringnameThis constraints' name 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedSingleValueColumnConstraint(java.lang.String name, T constraintValue, EditorProvider<T> editorProvider, java.lang.String group)Constructor 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract SingleValueColumnConstraint<T>copy(T newValue)subclasses must override to generate new versions of themselves but with new comparison value.booleanequals(java.lang.Object o)java.lang.Class<T>getColumnType()Returns the column type that this constraint can be used to filter.TgetConstraintValue()Returns the constraint valuejava.lang.StringgetConstraintValueString()Returns the "value" of the constraint in string formColumnConstraintEditor<T>getEditor(ColumnData<T> columnDataSource)Returns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.java.lang.StringgetGroup()Returns a "group" string that is used to logically group column constraints for presentation to the userjava.lang.StringgetName()Returns the name of the constraintinthashCode()ColumnConstraint<T>parseConstraintValue(java.lang.String newValue, java.lang.Object dataSource)Parses the constraint value string for deserialization purposes.- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface docking.widgets.table.constraint.ColumnConstraint
accepts, asString, compareTo, getConstraintValueTooltip 
 - 
 
 - 
 
- 
- 
Field Detail
- 
name
protected final java.lang.String name
This constraints' nameIt sometimes makes grammatical sense to set a more useful name than the default; while 'at least' makes sense for a number-based constraint, 'after' reads better for date-based constraints.
 
- 
editorProvider
protected EditorProvider<T> editorProvider
 
 - 
 
- 
Constructor Detail
- 
SingleValueColumnConstraint
protected SingleValueColumnConstraint(java.lang.String name, T constraintValue, EditorProvider<T> editorProvider, java.lang.String group)Constructor- Parameters:
 name- the name of the constraint.constraintValue- the value of this constraint to be compared with column values.editorProvider- the editor provider that generates the appropriate editors for constraints of this type.group- the group of the constraint for visual grouping when presenting to the user.
 
 - 
 
- 
Method Detail
- 
getGroup
public java.lang.String getGroup()
Description copied from interface:ColumnConstraintReturns a "group" string that is used to logically group column constraints for presentation to the user- Specified by:
 getGroupin interfaceColumnConstraint<T>- Returns:
 - the group this constraint belongs to.
 
 
- 
getName
public java.lang.String getName()
Description copied from interface:ColumnConstraintReturns the name of the constraint- Specified by:
 getNamein interfaceColumnConstraint<T>- Returns:
 - the name of the constraint.
 
 
- 
getConstraintValue
public final T getConstraintValue()
Returns the constraint value- Returns:
 - the constraint value
 
 
- 
copy
public abstract SingleValueColumnConstraint<T> copy(T newValue)
subclasses must override to generate new versions of themselves but with new comparison value.- Parameters:
 newValue- the new value to compare column values against.- Returns:
 - a new ColumnConstraint that is the same type as this constraint but with a new comparison value.
 
 
- 
getEditor
public ColumnConstraintEditor<T> getEditor(ColumnData<T> columnDataSource)
Description copied from interface:ColumnConstraintReturns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.- Specified by:
 getEditorin interfaceColumnConstraint<T>- Parameters:
 columnDataSource- This provides the constraint with access to the column data in the table model as well as the DataProvider of the table (if it has one)- Returns:
 - A columnConstraintEditor for editing the constraints value.
 
 
- 
getConstraintValueString
public java.lang.String getConstraintValueString()
Description copied from interface:ColumnConstraintReturns the "value" of the constraint in string formThis is used for serializing the constraint.
- Specified by:
 getConstraintValueStringin interfaceColumnConstraint<T>- Returns:
 - the "value" of the constraint in string form.
 
 
- 
parseConstraintValue
public ColumnConstraint<T> parseConstraintValue(java.lang.String newValue, java.lang.Object dataSource)
Description copied from interface:ColumnConstraintParses the constraint value string for deserialization purposes.- Specified by:
 parseConstraintValuein interfaceColumnConstraint<T>- Parameters:
 newValue- the value of the constraint in string form.dataSource- the DataSource from the Table.- Returns:
 - a new ColumnConstraint
 
 
- 
getColumnType
public java.lang.Class<T> getColumnType()
Description copied from interface:ColumnConstraintReturns the column type that this constraint can be used to filter.- Specified by:
 getColumnTypein interfaceColumnConstraint<T>- Returns:
 - the column type
 
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -