Class TLcyOGCConditionCustomizerPanelFactories

java.lang.Object
com.luciad.lucy.gui.customizer.TLcyOGCConditionCustomizerPanelFactories

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.

Since:
2017.0
  • Method Details

    • canCreateCustomizerPanel

      public 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
      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-end
      aConditionContainer - The container containing the condition
      Returns:
      true when createCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer) can create a customizer panel for the supplied arguments, false otherwise
      See Also:
    • createCustomizerPanel

      public static ILcyCustomizerPanel createCustomizerPanel(ILcdModelDescriptor aModelDescriptor, ILcyLucyEnv aLucyEnv, TLcyImmutableObjectContainer<ILcdOGCCondition> aConditionContainer)
      Creates a customizer panel for the condition contained in aConditionContainer. This method should only be called with arguments for which canCreateCustomizerPanel(ILcdModelDescriptor, ILcyLucyEnv, TLcyImmutableObjectContainer) returns true.
      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-end
      aConditionContainer - The container containing the condition
      Returns:
      a new customizer panel
      See Also:
    • createDefaultCondition

      public static ILcdOGCCondition createDefaultCondition(ILcdModelDescriptor aModelDescriptor)
      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 null when the model descriptor is not supported