Package docking.widgets.table.constraint
Class EnumColumnConstraint<T extends java.lang.Enum<T>>
- java.lang.Object
 - 
- docking.widgets.table.constraint.EnumColumnConstraint<T>
 
 
- 
- Type Parameters:
 T- the Enum column type.
- All Implemented Interfaces:
 ColumnConstraint<T>,java.lang.Comparable<ColumnConstraint<T>>
public class EnumColumnConstraint<T extends java.lang.Enum<T>> extends java.lang.Object implements ColumnConstraint<T>
Column Constraint where acceptable column values are Enum values that match one of a set of selected values from the Enum. 
- 
- 
Constructor Summary
Constructors Constructor Description EnumColumnConstraint(java.lang.Class<T> enumClass, java.util.Set<T> acceptableValues)Construct an EnumColumnConstraint with a set of acceptable Enum values. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(T value, TableFilterContext context)Compares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwisebooleanequals(java.lang.Object obj)java.lang.Class<T>getColumnType()Returns the column type that this constraint can be used to filter.java.lang.StringgetConstraintValueString()Returns the "value" of the constraint in string formjava.lang.StringgetConstraintValueTooltip()returns a description of the constraint suitable for displaying in a tooltipColumnConstraintEditor<T>getEditor(ColumnData<T> columnDataSource)Returns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.java.lang.Class<T>getEnumClass()Return the class of the column's Enum type.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 constraintjava.util.Set<T>getSelectedValues()Returns the set of acceptable (matching) Enum values that are acceptable to this constraint.inthashCode()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
asString, compareTo 
 - 
 
 - 
 
- 
- 
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 extends java.lang.Enum<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 extends java.lang.Enum<T>>- Returns:
 - the name of the constraint.
 
 
- 
accepts
public boolean accepts(T value, TableFilterContext context)
Description copied from interface:ColumnConstraintCompares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwise- Specified by:
 acceptsin interfaceColumnConstraint<T extends java.lang.Enum<T>>- Parameters:
 value- the column value to be tested.context- provides additional information about the the table and its data. This allows the filter to base its decision on information other than just the column value.- Returns:
 - true if the column value passes the constraint, false otherwise
 
 
- 
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 extends java.lang.Enum<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.
 
 
- 
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 extends java.lang.Enum<T>>- Returns:
 - the column type
 
 
- 
getEnumClass
public java.lang.Class<T> getEnumClass()
Return the class of the column's Enum type.- Returns:
 - the class of the column's Enum type.
 
 
- 
getSelectedValues
public java.util.Set<T> getSelectedValues()
Returns the set of acceptable (matching) Enum values that are acceptable to this constraint.- Returns:
 - the set of acceptable (matching) Enum values that are acceptable to this constraint.
 
 
- 
getConstraintValueTooltip
public java.lang.String getConstraintValueTooltip()
Description copied from interface:ColumnConstraintreturns a description of the constraint suitable for displaying in a tooltip- Specified by:
 getConstraintValueTooltipin interfaceColumnConstraint<T extends java.lang.Enum<T>>- Returns:
 - a description of the constraint.
 
 
- 
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 extends java.lang.Enum<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 extends java.lang.Enum<T>>- Parameters:
 newValue- the value of the constraint in string form.dataSource- the DataSource from the Table.- Returns:
 - a new ColumnConstraint
 
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -