Module is.codion.swing.common.ui
Interface ColumnConditionPanel.FieldFactory
- All Known Implementing Classes:
EntityConditionFieldFactory
- Enclosing class:
- ColumnConditionPanel<T>
public static interface ColumnConditionPanel.FieldFactory
Provides equal, in, upper and lower bound input fields for a
ColumnConditionPanel
-
Method Summary
Modifier and TypeMethodDescription<T> JComponent
createEqualField
(ConditionModel<T> condition) Creates the field representing theOperator.EQUAL
andOperator.NOT_EQUAL
operand, linked toConditionModel.Operands.equal()
<T> JComponent
createInField
(ConditionModel<T> condition) Creates the field representing theOperator.IN
operands, linked toConditionModel.Operands.in()
<T> Optional<JComponent>
createLowerBoundField
(ConditionModel<T> condition) Creates the field representing the lower bound operand, linked toConditionModel.Operands.lowerBound()
<T> Optional<JComponent>
createUpperBoundField
(ConditionModel<T> condition) Creates the field representing the upper bound operand, linked toConditionModel.Operands.upperBound()
boolean
supportsType
(Class<?> valueClass)
-
Method Details
-
supportsType
- Parameters:
valueClass
- the value class- Returns:
- true if the type is supported
-
createEqualField
Creates the field representing theOperator.EQUAL
andOperator.NOT_EQUAL
operand, linked toConditionModel.Operands.equal()
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- the equal value field
- Throws:
IllegalArgumentException
- in case the bound type is not supported
-
createUpperBoundField
Creates the field representing the upper bound operand, linked toConditionModel.Operands.upperBound()
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- an upper bound input field, or an empty Optional if it does not apply to the bound type
- Throws:
IllegalArgumentException
- in case the bound type is not supported
-
createLowerBoundField
Creates the field representing the lower bound operand, linked toConditionModel.Operands.lowerBound()
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- a lower bound input field, or an empty Optional if it does not apply to the bound type
- Throws:
IllegalArgumentException
- in case the bound type is not supported
-
createInField
Creates the field representing theOperator.IN
operands, linked toConditionModel.Operands.in()
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- the in value field
- Throws:
IllegalArgumentException
- in case the bound type is not supported
-