Package org.freeplane.features.nodestyle.mindmapmode

Examples of org.freeplane.features.nodestyle.mindmapmode.MNodeStyleController


      super(mSet, mProperty);
    }

    @Override
    void applyValue(final boolean enabled, final NodeModel node, final PropertyChangeEvent evt) {
      final MNodeStyleController styleController = (MNodeStyleController) Controller
      .getCurrentModeController().getExtension(NodeStyleController.class);
      styleController.setMinNodeWidth(node, enabled ? Integer.parseInt(mMinNodeWidth.getValue()): NodeSizeModel.NOT_SET);
    }
View Full Code Here


    new MMapController(modeController);
    userInputListenerFactory.getMenuBuilder(RibbonBuilder.class).setEnabled(false);
    TextController.install(new MTextController(modeController));
    SpellCheckerController.install(modeController);
    IconController.install(new MIconController(modeController));
    NodeStyleController.install(new MNodeStyleController(modeController));
    EdgeController.install(new MEdgeController(modeController));
    CloudController.install(new MCloudController(modeController));
    NoteController.install(new MNoteController(modeController));
    LinkController.install(new MLinkController());
    MFileManager.install(new MFileManager());
View Full Code Here

      super(mSet, mProperty);
    }

    @Override
    void applyValue(final boolean enabled, final NodeModel node, final PropertyChangeEvent evt) {
      final MNodeStyleController styleController = (MNodeStyleController) Controller.getCurrentModeController()
          .getExtension(NodeStyleController.class);
      styleController.setNodeNumbering(node, enabled ? mNodeNumbering.getBooleanValue() : null);
    }
View Full Code Here

      super(mSet, mProperty);
    }

    @Override
    void applyValue(final boolean enabled, final NodeModel node, final PropertyChangeEvent evt) {
      final MNodeStyleController styleController = (MNodeStyleController) Controller.getCurrentModeController()
          .getExtension(NodeStyleController.class);
      styleController.setNodeFormat(node, enabled ? mNodeFormat.getSelectedPattern() : null);
    }
View Full Code Here

          "30", "36", "48", "72" };
  public MUIFactory() {
    size = new DefaultComboBoxModel(MUIFactory.FONT_SIZES);
    styles = new DefaultComboBoxModel();
    final ModeController modeController = Controller.getCurrentModeController();
    final MNodeStyleController styleController = (MNodeStyleController) modeController
        .getExtension(NodeStyleController.class);
    final GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
    final String[] envFonts = gEnv.getAvailableFontFamilyNames();
    fonts = new DefaultComboBoxModel(envFonts);
    final ListDataListener fontsListener = new ListDataListener() {
      public void intervalRemoved(final ListDataEvent e) {
      }

      public void intervalAdded(final ListDataEvent e) {
      }

      public void contentsChanged(final ListDataEvent e) {
        if (e.getIndex0() != -1) {
          return;
        }
        if (ignoreChangeEvent) {
          return;
        }
        ignoreChangeEvent = true;
        final DefaultComboBoxModel source = (DefaultComboBoxModel) e.getSource();
        styleController.setFontFamily((String) source.getSelectedItem());
        ignoreChangeEvent = false;
      }
    };
    fonts.addListDataListener(fontsListener);
    final ListDataListener sizeListener = new ListDataListener() {
      public void intervalRemoved(final ListDataEvent e) {
      }

      public void intervalAdded(final ListDataEvent e) {
      }

      public void contentsChanged(final ListDataEvent e) {
        if (e.getIndex0() != -1) {
          return;
        }
        if (ignoreChangeEvent) {
          return;
        }
        try {
          final DefaultComboBoxModel source = (DefaultComboBoxModel) e.getSource();
          final int intSize = Integer.parseInt(((String) source.getSelectedItem()));
          styleController.setFontSize(intSize);
        }
        catch (final NumberFormatException nfe) {
        }
      }
    };
View Full Code Here

    styles.addListDataListener(styleListener);
  }

  private void changeToolbar(final NodeModel node) {
    final Controller controller = Controller.getCurrentController();
    final MNodeStyleController styleController = (MNodeStyleController) controller.getModeController()
        .getExtension(NodeStyleController.class);
    selectFontSize(Integer.toString(styleController.getFontSize(node)));
    selectFontName(styleController.getFontFamilyName(node));
    final LogicalStyleController logicalStyleController = LogicalStyleController.getController();
    ignoreChangeEvent = true;
     styles.setSelectedItem(logicalStyleController.getFirstStyle(node));
        ignoreChangeEvent = false;
  }
View Full Code Here

    CloudController.install(new MCloudController(modeController));
    NoteController.install(new MNoteController(modeController));
    final MTextController textController = new MTextController(modeController);
    TextController.install(textController);
    LinkController.install(new MLinkController());
    NodeStyleController.install(new MNodeStyleController(modeController));
    ClipboardController.install(new MClipboardController());
    LocationController.install(new MLocationController());
    final MLogicalStyleController logicalStyleController = new MLogicalStyleController(modeController);
    LogicalStyleController.install(logicalStyleController);
    logicalStyleController.initM();
View Full Code Here

      final String part = parts[i];
      if (part == null) {
        continue;
      }
      ((MTextController) TextController.getController()).setNodeText(lowerNode, part);
      final MNodeStyleController nodeStyleController = (MNodeStyleController) NodeStyleController
          .getController();
      nodeStyleController.copyStyle(node, lowerNode);
      mapController.setFolded(lowerNode, !lowerNode.isFolded());
    }
  }
View Full Code Here

    setNodeObject(node, newUpperContent);
    final NodeModel parent = node.getParentNode();
    final ModeController modeController = Controller.getCurrentModeController();
    final NodeModel lowerNode = ((MMapController) modeController.getMapController()).addNewNode(parent, parent
        .getChildPosition(node) + 1, node.isLeft());
    final MNodeStyleController nodeStyleController = (MNodeStyleController) NodeStyleController
        .getController();
    nodeStyleController.copyStyle(node, lowerNode);
    setNodeObject(lowerNode, newLowerContent);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.nodestyle.mindmapmode.MNodeStyleController

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.