コード例 #1
0
 private IControlPanelProvider<ELEMENT_VALUE_TYPE> findControlPanel(
     final IDisplayFormat displayFormat) {
   for (final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanelProvider : controlPanels) {
     if (controlPanelProvider.getDisplayFormat().getId().equals(displayFormat.getId())) {
       return controlPanelProvider;
     }
   }
   return null;
 }
コード例 #2
0
 @Override
 public String getValueAsString(final Object value) {
   final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanel = getCurrentControlPanel();
   if (controlPanel != null) {
     final IObjectLabelConverter<ELEMENT_VALUE_TYPE> converter =
         controlPanel.getObjectLabelConverter();
     if (converter != null) {
       return getValueAsString(converter, value);
     }
   }
   return null;
 }
コード例 #3
0
 @Override
 public List<IFilterType> getSupportedFilterTypes() {
   final Set<IFilterType> result = new LinkedHashSet<IFilterType>();
   for (final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanelProvider : controlPanels) {
     final IFilterSupport<?> filterSupport = controlPanelProvider.getFilterSupport();
     if (filterSupport != null) {
       for (final IFilterPanelProvider<?> filterPanelProvider : filterSupport.getFilterPanels()) {
         final IFilterType filterType = filterPanelProvider.getType();
         result.add(filterType);
       }
     }
   }
   return new LinkedList<IFilterType>(result);
 }
コード例 #4
0
 @Override
 public IFilterPanelProvider<IOperator> getFilterPanelProvider(final IFilterType filterType) {
   for (final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanelProvider : controlPanels) {
     final IFilterSupport<Object> filterSupport = controlPanelProvider.getFilterSupport();
     if (filterSupport != null) {
       for (final IFilterPanelProvider<IOperator> filterPanelProvider :
           filterSupport.getFilterPanels()) {
         if (filterType.equals(filterPanelProvider.getType())) {
           return filterPanelProvider;
         }
       }
     }
   }
   return null;
 }
コード例 #5
0
 private boolean hasFilterTypeSupport(
     final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanel, final IFilterType filterType) {
   if (controlPanel != null) {
     final IFilterSupport<Object> filterSupport = controlPanel.getFilterSupport();
     if (filterSupport != null) {
       for (final IFilterPanelProvider<?> filterPanel : filterSupport.getFilterPanels()) {
         if (NullCompatibleEquivalence.equals(filterType, filterPanel.getType())) {
           return true;
         }
       }
     }
   }
   return false;
 }
コード例 #6
0
 private boolean hasIncludingFilterTypeSupport(
     final IControlPanelProvider<ELEMENT_VALUE_TYPE> controlPanel, final IFilterType filterType) {
   if (controlPanel != null) {
     final IFilterSupport<Object> filterSupport = controlPanel.getFilterSupport();
     if (filterSupport != null) {
       final IIncludingFilterFactory<Object> includingFilterFactory =
           filterSupport.getIncludingFilterFactory();
       if (includingFilterFactory != null) {
         if (filterType != null) {
           return filterType.equals(includingFilterFactory.getFilterType());
         } else {
           return true;
         }
       }
     }
   }
   return false;
 }
コード例 #7
0
 @Override
 public IDisplayFormat getDisplayFormat() {
   return currentControlPanel.getDisplayFormat();
 }