Examples of NamedObject


Examples of org.freeplane.core.resources.NamedObject

      value = values.getSelectedItem();
    }
    if (value == null) {
      value = "";
    }
    final NamedObject simpleCond = (NamedObject) elementaryConditions.getSelectedItem();
    final boolean matchCase = caseSensitive.isSelected();
    final boolean matchApproximately = approximateMatching.isSelected();
    ResourceController.getResourceController().setProperty(PROPERTY_FILTER_MATCH_CASE, matchCase);
    final Object selectedItem = filteredPropertiesComponent.getSelectedItem();
    newCond = filterController.getConditionFactory().createCondition(selectedItem, simpleCond, value, matchCase, matchApproximately);
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

        public void actionPerformed(ActionEvent e) {
          if(internalChange)
            return;
          final ModeController modeController = Controller.getCurrentModeController();
          AutomaticLayoutController al = modeController.getExtension(AutomaticLayoutController.class);
          NamedObject selectedItem = (NamedObject)mAutomaticLayoutComboBox.getSelectedItem();
          al.undoableDeactivateHook(Controller.getCurrentController().getMap().getRootNode());
          if(!selectedItem.equals(AUTOMATIC_LAYOUT_DISABLED)){
            al.undoableActivateHook(Controller.getCurrentController().getMap().getRootNode(), (AutomaticLayout) selectedItem.getObject());
          }
        }
      });
    }
      final String label = TextUtils.getText("AutomaticLayoutAction.text");
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(FILTER_LINK) || namedObject.objectEquals(CONNECTOR_LABEL)
            || namedObject.objectEquals(CONNECTOR);
  }
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

  }

  public ASelectableCondition createCondition(final Object selectedItem, final NamedObject simpleCond,
                                              final Object value, final boolean matchCase,
                                              final boolean matchApproximately) {
    final NamedObject namedObject = (NamedObject) selectedItem;
    if (namedObject.objectEquals(FILTER_LINK)) {
      if (simpleCond.objectEquals(ConditionFactory.FILTER_IS_EQUAL_TO)) {
        return new HyperLinkEqualsCondition((String) value, matchCase, matchApproximately);
      }
      if (simpleCond.objectEquals(ConditionFactory.FILTER_CONTAINS)) {
        return new HyperLinkContainsCondition((String) value, matchCase, matchApproximately);
      }
      if (simpleCond.objectEquals(ConditionFactory.FILTER_EXIST)) {
        return new HyperLinkExistsCondition();
      }
      return null;
    }
    if (namedObject.objectEquals(CONNECTOR_LABEL)) {
      if (simpleCond.objectEquals(ConditionFactory.FILTER_IS_EQUAL_TO)) {
        return new ConnectorLabelEqualsCondition((String) value, matchCase, matchApproximately);
      }
      if (simpleCond.objectEquals(ConditionFactory.FILTER_CONTAINS)) {
        return new ConnectorLabelContainsCondition((String) value, matchCase, matchApproximately);
      }
      return null;
    }
    if (namedObject.objectEquals(CONNECTOR)) {
      if (simpleCond.objectEquals(ConditionFactory.FILTER_EXIST)) {
        return new ConnectorExistsCondition();
      }
    }
    return null;
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

    }
    return null;
  }

  public ComboBoxModel getConditionsForProperty(final Object property) {
    final NamedObject no = (NamedObject) property;
    final Object[] linkConditionNames;
    if (no.getObject().equals(FILTER_LINK)) {
      linkConditionNames = new NamedObject[] {
              TextUtils.createTranslatedString(ConditionFactory.FILTER_IS_EQUAL_TO),
              TextUtils.createTranslatedString(ConditionFactory.FILTER_CONTAINS),
              TextUtils.createTranslatedString(ConditionFactory.FILTER_EXIST) };
    }
    else if (no.getObject().equals(CONNECTOR_LABEL)) {
      linkConditionNames = new NamedObject[] {
              TextUtils.createTranslatedString(ConditionFactory.FILTER_IS_EQUAL_TO),
              TextUtils.createTranslatedString(ConditionFactory.FILTER_CONTAINS) };
    }
    else {
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(PriorityConditionController.FILTER_PRIORITY);
  }
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

      if (styles.contains(styleString)) {
        setStyle(styleString);
        return;
      }
      // search for predefined styles by key
      final IStyle styleNamedObject = StyleFactory.create(new NamedObject(styleName));
      if (styles.contains(styleNamedObject)) {
        setStyle(styleNamedObject);
        return;
      }
      // search for predefined styles by their translated name (style.toString())
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(IconConditionController.FILTER_ICON);
  }
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

    final JComboBox box = new JComboBox();
    box.setEditable(false);
    final File dir = getLastCurrentDir() != null ? getLastCurrentDir() : chooser.getCurrentDirectory();
    final File templateDir = defaultStandardTemplateDir();
    final File userTemplateDir = defaultUserTemplateDir();
    box.addItem(new NamedObject(dir, TextUtils.getText("current_dir")));
    box.addItem(new NamedObject(templateDir, TextUtils.getText("template_dir")));
    box.addItem(new NamedObject(userTemplateDir, TextUtils.getText("user_template_dir")));
    box.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        final JComboBox box = (JComboBox) e.getSource();
        final NamedObject obj = (NamedObject) box.getSelectedItem();
        final File dir = (File) obj.getObject();
        chooser.setCurrentDirectory(dir);
      }
    });
    File selectedDir = chooser.getCurrentDirectory();
    final String selectedPath = selectedDir.getAbsolutePath();
    if (!selectedDir.equals(dir)) {
      for (int i = 0; i < box.getItemCount(); i++) {
        NamedObject item = (NamedObject) box.getItemAt(i);
        File itemDir = (File) item.getObject();
        if (itemDir.getAbsolutePath().equals(selectedPath)) {
          box.setSelectedItem(item);
          break;
        }
      }
View Full Code Here

Examples of org.freeplane.core.resources.NamedObject

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(CloneConditionController.FILTER_CLONE);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.