Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Class EntityConditionFieldFactory
java.lang.Object
is.codion.swing.framework.ui.EntityConditionFieldFactory
- All Implemented Interfaces:
ColumnConditionPanel.FieldFactory
public final class EntityConditionFieldFactory
extends Object
implements ColumnConditionPanel.FieldFactory
A default field factory implementation for attributes.
-
Constructor Summary
ConstructorDescriptionEntityConditionFieldFactory
(EntityDefinition entityDefinition, Attribute<?> attribute) -
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)
-
Constructor Details
-
EntityConditionFieldFactory
- Parameters:
entityDefinition
- the entity definitionattribute
- the attribute
-
-
Method Details
-
supportsType
- Specified by:
supportsType
in interfaceColumnConditionPanel.FieldFactory
- Parameters:
valueClass
- the value class- Returns:
- true if the type is supported
-
createEqualField
Description copied from interface:ColumnConditionPanel.FieldFactory
Creates the field representing theOperator.EQUAL
andOperator.NOT_EQUAL
operand, linked toConditionModel.Operands.equal()
- Specified by:
createEqualField
in interfaceColumnConditionPanel.FieldFactory
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- the equal value field
-
createUpperBoundField
Description copied from interface:ColumnConditionPanel.FieldFactory
Creates the field representing the upper bound operand, linked toConditionModel.Operands.upperBound()
- Specified by:
createUpperBoundField
in interfaceColumnConditionPanel.FieldFactory
- 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
-
createLowerBoundField
Description copied from interface:ColumnConditionPanel.FieldFactory
Creates the field representing the lower bound operand, linked toConditionModel.Operands.lowerBound()
- Specified by:
createLowerBoundField
in interfaceColumnConditionPanel.FieldFactory
- 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
-
createInField
Description copied from interface:ColumnConditionPanel.FieldFactory
Creates the field representing theOperator.IN
operands, linked toConditionModel.Operands.in()
- Specified by:
createInField
in interfaceColumnConditionPanel.FieldFactory
- Type Parameters:
T
- the value type- Parameters:
condition
- the condition model- Returns:
- the in value field
-