Package org.freeplane.features.filter.condition

Examples of org.freeplane.features.filter.condition.IElementaryConditionController


    root.getGlassPane().setVisible(false);
  }

  private void setValuesEditor() {
    final Object selectedProperty = filteredPropertiesComponent.getSelectedItem();
    final IElementaryConditionController conditionController = filterController.getConditionFactory()
        .getConditionController(selectedProperty);
    final NamedObject selectedCondition = (NamedObject) elementaryConditions.getSelectedItem();
    final boolean canSelectValues = conditionController
        .canSelectValues(selectedProperty, selectedCondition);
    values.setEnabled(canSelectValues);
    values.setEditable(false);
    values.setModel(conditionController.getValuesForProperty(selectedProperty, selectedCondition));
   
    final ComboBoxEditor valueEditor = conditionController.getValueEditor(selectedProperty, selectedCondition);
    values.setEditor(valueEditor != null ? valueEditor : new FixedBasicComboBoxEditor());
    setValuesEnterKeyListener();
   
    final ListCellRenderer valueRenderer = conditionController.getValueRenderer(selectedProperty, selectedCondition);
    values.setRenderer(valueRenderer != null ? valueRenderer : filterController.getConditionRenderer());
   
    values.setEditable(conditionController.canEditValues(selectedProperty, selectedCondition));
    if (values.getModel().getSize() > 0) {
      values.setSelectedIndex(0);
    }
    caseSensitive.setEnabled(canSelectValues
            && conditionController.isCaseDependent(selectedProperty, selectedCondition));
    approximateMatching.setEnabled(canSelectValues
        && conditionController.supportsApproximateMatching(selectedProperty, selectedCondition));
  }
View Full Code Here


      }
      filteredPropertiesModel.removeAllElements();
      final Iterator<IElementaryConditionController> conditionIterator = filterController.getConditionFactory()
          .conditionIterator();
      while (conditionIterator.hasNext()) {
        final IElementaryConditionController next = conditionIterator.next();
        filteredPropertiesModel.addExtensionList(next.getFilteredProperties());
        filteredPropertiesModel.setSelectedItem(filteredPropertiesModel.getElementAt(0));
      }
    }
    else {
      filteredPropertiesComponent.setSelectedIndex(-1);
View Full Code Here

  private class FilteredPropertyChangeListener implements ItemListener {
    public void itemStateChanged(final ItemEvent e) {
      if (e.getStateChange() == ItemEvent.SELECTED) {
        final Object selectedProperty = filteredPropertiesComponent.getSelectedItem();
        final IElementaryConditionController conditionController = filterController.getConditionFactory()
        .getConditionController(selectedProperty);
        final ComboBoxModel simpleConditionComboBoxModel = conditionController
        .getConditionsForProperty(selectedProperty);
        elementaryConditions.setModel(simpleConditionComboBoxModel);
        elementaryConditions.setEnabled(simpleConditionComboBoxModel.getSize() > 0);
        setValuesEditor();
        return;
View Full Code Here

TOP

Related Classes of org.freeplane.features.filter.condition.IElementaryConditionController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.