Package org.freeplane.core.resources

Examples of org.freeplane.core.resources.ResourceController


    super();
    this.matchCase = matchCase;
    this.matchApproximately = matchApproximately;
    stringMatchingStrategy = matchApproximately ? StringMatchingStrategy.DEFAULT_APPROXIMATE_STRING_MATCHING_STRATEGY :
      new ExactStringMatchingStrategy();
    final ResourceController resourceController = ResourceController.getResourceController();
    if(value instanceof String && resourceController.getBooleanProperty("compare_as_number") && TextUtils.isNumber((String) value)) {
      Number number = TextUtils.toNumber((String) value);
      if(number instanceof Comparable<?>){
        conditionValue = (Comparable<?>) number;
      }
      return;
View Full Code Here


  private boolean isMasterPresent;
    final private FreeplaneStarter starter;

  public SingleInstanceManager(FreeplaneStarter starter) {
      this.starter = starter;
      final ResourceController resourceController = starter.getResourceController();
    isSingleInstanceMode = resourceController.getBooleanProperty("single_instance");
    isSingleInstanceForceMode = resourceController.getBooleanProperty("single_instance_force");
  }
View Full Code Here

    private File findScriptFile_pre_1_3_x_final(Script script) {
        return new File(ScriptResources.getUserScriptsDir(), script.name);
    }

  private TreeSet<File> getScriptDirs() {
    final ResourceController resourceController = ResourceController.getResourceController();
    final String dirsString = resourceController.getProperty(ScriptResources.RESOURCES_SCRIPT_DIRECTORIES);
    final TreeSet<File> dirs = new TreeSet<File>(); // remove duplicates -> Set
    if (dirsString != null) {
      for (String dir : ConfigurationUtils.decodeListValue(dirsString, false)) {
          dirs.add(createFile(dir));
            }
View Full Code Here

    }
    return icons;
  }

  private static List<MindIcon> getUserIcons() {
    final ResourceController resourceController = ResourceController.getResourceController();
    if (resourceController.isApplet()) {
      return Collections.emptyList();
    }
    final File iconDir = new File(resourceController.getFreeplaneUserDirectory(), "icons");
    if (!iconDir.exists()) {
      LogUtils.info("creating user icons directory " + iconDir);
      iconDir.mkdirs();
      return Collections.emptyList();
    }
View Full Code Here

    addAction(new SaveAcceleratorPresetsAction());
  }

  private void createOptionPanelControls() {
    optionPanelBuilder = new OptionPanelBuilder();
    final ResourceController resourceController = ResourceController.getResourceController();
    URL preferences = resourceController.getResource("/xml/preferences.xml");
    optionPanelBuilder.load(preferences);
    addAction(createPropertyAction(optionPanelBuilder));
  }
View Full Code Here

    // applets have no user directory and no file access anyhow
    pathToFile = freeplaneUserDirectory == null ? null : freeplaneUserDirectory + File.separator + SCANNER_XML;
    initScanners();
    selectScanner(FormatUtils.getFormatLocaleFromResources());
        addParsersForStandardFormats();
        final ResourceController resourceController = ResourceController.getResourceController();
        resourceController.addPropertyChangeListener(this);
  }
View Full Code Here

      catch (final UnsupportedFlavorException e) {
      }
      catch (final IOException e) {
      }
    }
    final ResourceController resourceController = ResourceController.getResourceController();
    if (t.isDataFlavorSupported(MindMapNodesSelection.htmlFlavor)) {
      try {
        final String textFromClipboard = t.getTransferData(MindMapNodesSelection.htmlFlavor).toString();
        if (textFromClipboard.charAt(0) != 65533) {
          if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
            final MTextController textController = (MTextController) TextController
                .getController();
            final boolean richText = textController.useRichTextInEditor(RESOURCES_REMIND_USE_RICH_TEXT_IN_NEW_NODES);
            if (richText) {
              final boolean structuredHtmlImport = resourceController
                  .getBooleanProperty("structured_html_import");
              final IDataFlavorHandler htmlFlavorHandler;
              if (structuredHtmlImport) {
                htmlFlavorHandler = new StructuredHtmlFlavorHandler(textFromClipboard);
              }
View Full Code Here

    }
    return frameController.getPropertyKeyPrefix() + completeKeyString;
  }

  public void toggleVisibility() {
      final ResourceController resourceController = ResourceController.getResourceController();
    final boolean wasVisible = resourceController.getBooleanProperty(getPropertyName());
    setVisible(!wasVisible);
    }
View Full Code Here

    if(parent != null)
      ((JComponent) parent).revalidate();
    }

  public void setProperty(final boolean visible) {
      final ResourceController resourceController = ResourceController.getResourceController();
      resourceController.setProperty(getPropertyName(), visible);
    }
View Full Code Here

          controller.getViewController().setWaitingCursor(false);
        }
      }

      private String getInstallScriptSource() throws IOException {
        final ResourceController resourceController = ResourceController.getResourceController();
        final File scriptDir = new File(resourceController.getInstallationBaseDir(), "scripts");
        final File installScript = new File(scriptDir, "installScriptAddOn.groovy");
        if (!installScript.exists())
          throw new RuntimeException("internal error: installer not found at " + installScript);
        return FileUtils.slurpFile(installScript);
      }
View Full Code Here

TOP

Related Classes of org.freeplane.core.resources.ResourceController

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.