Package com.luciad.lucy.gui.customizer
Class TLcyOGCConditionCustomizerPanelFactories
java.lang.Object
com.luciad.lucy.gui.customizer.TLcyOGCConditionCustomizerPanelFactories
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.
- Since:
- 2017.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanCreateCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer) ReturnstruewhencreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)can create a customizer panel for the specified conditionstatic ILcyCustomizerPanelcreateCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer) Creates a customizer panel for the condition contained inaConditionContainer.static ILcdOGCConditioncreateDefaultCondition(ILcdModelDescriptor aModelDescriptor) Creates a new condition for one of the properties of a model, based on the model descriptor.
-
Method Details
-
canCreateCustomizerPanel
public static boolean canCreateCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer) ReturnstruewhencreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)can create a customizer panel for the specified condition- Parameters:
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 condition- Returns:
truewhencreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)can create a customizer panel for the supplied arguments,falseotherwise- See Also:
-
createCustomizerPanel
public static ILcyCustomizerPanel createCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer) Creates a customizer panel for the condition contained inaConditionContainer. This method should only be called with arguments for whichcanCreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer)returnstrue.- Parameters:
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 condition- Returns:
- a new customizer panel
- See Also:
-
createDefaultCondition
Creates a new condition for one of the properties of a model, based on the model descriptor. A typical use-case for this method is when you want to let the user define a condition for a certain model using a customizer panel: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(); } }- Parameters:
aModelDescriptor- The model descriptor to create the condition for- Returns:
- a new condition for one of the properties of the model descriptor,
or
nullwhen the model descriptor is not supported
-