public final class TLcyOGCConditionCustomizerPanelFactories extends Object
This class provides methods to create an ILcyCustomizerPanel
for an ILcdOGCCondition
wrapped
in an TLcyImmutableObjectContainer
.
This is for example used by the table view add-on to create the UI behind the "Add filter" button.
That UI creates for each ILcdOGCCondition
in the TLcdModelQueryConfiguration
a
customizer panel using the methods of this class.
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreateCustomizerPanel(ILcdModelDescriptor aModelDescriptor,
ILcyLucyEnv aLucyEnv,
TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer)
Returns
true when createCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer) can
create a customizer panel for the specified condition |
static ILcyCustomizerPanel |
createCustomizerPanel(ILcdModelDescriptor aModelDescriptor,
ILcyLucyEnv aLucyEnv,
TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer)
Creates a customizer panel for the condition contained in
aConditionContainer . |
static ILcdOGCCondition |
createDefaultCondition(ILcdModelDescriptor aModelDescriptor)
Creates a new condition for one of the properties of a model, based on the model descriptor.
|
public static boolean canCreateCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer)
true
when createCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)
can
create a customizer panel for the specified conditionaModelDescriptor
- The model descriptor for which the condition was created.
The model descriptor is used to determine the available property names from which the user can choose.aLucyEnv
- The Lucy back-endaConditionContainer
- The container containing the conditiontrue
when createCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)
can create a
customizer panel for the supplied arguments, false
otherwisecreateDefaultCondition(ILcdModelDescriptor)
public static ILcyCustomizerPanel createCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer)
aConditionContainer
.
This method should only be called with arguments for which canCreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)
returns true
.aModelDescriptor
- The model descriptor for which the condition was created.
The model descriptor is used to determine the available property names from which the user can choose.aLucyEnv
- The Lucy back-endaConditionContainer
- The container containing the conditioncreateDefaultCondition(ILcdModelDescriptor)
public static ILcdOGCCondition createDefaultCondition(ILcdModelDescriptor aModelDescriptor)
ILcyLucyEnv lucy = ...;
ILcdModel model = ...;
//create a customizer panel
ILcdOGCCondition condition = createDefaultCondition(model.getModelDescriptor());
if(condition != null){
TLcyImmutableObjectContainer<ILcdOGCCondition> container = new TLcyImmutableObjectContainer<>(condition);
if(canCreateCustomizerPanel(model.getModelDescriptor(), lucy, container)){
ILcyCustomizerPanel customizerPanel = createCustomizerPanel(model.getModelDescriptor(),lucy,container);
//show panel to user, and let the user modify the condition
//...
ILcdOGCCondition userDefinedCondition = container.getObject();
}
}
aModelDescriptor
- The model descriptor to create the condition fornull
when the model descriptor is not supported