Package org.freeplane.features.text.mindmapmode

Examples of org.freeplane.features.text.mindmapmode.MTextController


    userInputListenerFactory.setNodeMouseMotionListener(new DefaultNodeMouseMotionListener());
    modeController.setUserInputListenerFactory(userInputListenerFactory);
    controller.addExtension(ModelessAttributeController.class, new ModelessAttributeController());
    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));
View Full Code Here


    };
    modeController.execute(actor, node.getMap());
  }

    public void copyStyleExtensions(final IStyle style, final NodeModel target) {
        final MTextController textController = MTextController.getController();
        final MapStyleModel extension = MapStyleModel.getExtension(target.getMap());
        final NodeModel styleNode = extension.getStyleNode(style);
        if(styleNode != null){
            final MAttributeController attributeController = MAttributeController.getController();
            attributeController.copyAttributesToNode(styleNode, target);
            final String detailTextText = DetailTextModel.getDetailTextText(styleNode);
            if(detailTextText != null)
                textController.setDetails(target, detailTextText);
            final String noteText = NoteModel.getNoteText(styleNode);
            if(noteText != null)
            {
              MNoteController noteController = (MNoteController) NoteController.getController();
              noteController.setNoteText(target, noteText);
View Full Code Here

    IconController.install(new MIconController(modeController));
    new ProgressFactory().installActions(modeController);
    EdgeController.install(new MEdgeController(modeController));
    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());
View Full Code Here

    return null;
  }

  public EditNodeBase createEditor(NodeModel node,
      IEditControl editControl, String text, boolean editLong) {
    MTextController textController = MTextController.getController();
    if (textController.isTextFormattingDisabled(node)) // Format=Text!
      return null;
    final KeyEvent firstKeyEvent = textController.getEventQueue().getFirstEvent();
    String nodeFormat = textController.getNodeFormat(node);
    final String latexText = getLatexNode(text, nodeFormat, TargetMode.FOR_EDITOR);
   
    // this option has been added to work around bugs in JSyntaxPane with Chinese characters
    if (ResourceController.getResourceController().getBooleanProperty(LATEX_EDITOR_DISABLE))
      return null;
View Full Code Here

    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) {
View Full Code Here

        return result;
    }

  public EditNodeBase createEditor(final NodeModel node, final EditNodeBase.IEditControl editControl,
                                   String text, final boolean editLong) {
    MTextController textController = MTextController.getController();
    if (textController.isTextFormattingDisabled(node))
      return null;
    final KeyEvent firstKeyEvent = textController.getEventQueue().getFirstEvent();
    if(firstKeyEvent != null){
      if (firstKeyEvent.getKeyChar() == '='){
        text = "=";
      }
      else{
View Full Code Here

            }
        }
        else{
          ModeController mController = Controller.getCurrentModeController();
          for (final NodeModel node : mController.getMapController().getSelectedNodes()) {
            final MTextController textController = (MTextController) TextController.getController();
            Object date = node.getUserObject();
            if(date instanceof FormattedDate){
              final FormattedDate fd = (FormattedDate) date;
              if(! fd.getDateFormat().equals(dateFormat)){
                textController.setNodeObject(node, new FormattedDate(fd, dateFormat.getPattern()));
              }
            }
          }
        }
View Full Code Here

            table.setValueAt(date, r, c);
      }
      else{
        ModeController mController = Controller.getCurrentModeController();
        for (final NodeModel node : mController.getMapController().getSelectedNodes()) {
          final MTextController textController = (MTextController) TextController.getController();
          textController.setNodeObject(node, date);
        }
      }
    }
View Full Code Here

    public TableCellEditor getCellEditor(final int row, final int col, EventObject e) {
    if (dce != null) {
      dce.stopCellEditing();
    }
    if(col == 1){
      final MTextController textController = (MTextController) TextController.getController();
      if(e instanceof KeyEvent){
        final KeyEvent kev = (KeyEvent) e;
        textController.getEventQueue().setFirstEvent(kev);
      }
      final IAttributeTableModel model = (IAttributeTableModel) getModel();
      final String text = getValueForEdit(row, col);
      final DialogTableCellEditor dialogTableCellEditor = new DialogTableCellEditor();
      EditNodeBase base = textController.getEditNodeBase(model.getNode(), text, dialogTableCellEditor.getEditControl(), false);
      if(base != null){
        dialogTableCellEditor.setEditBase(base);
        return dialogTableCellEditor;
      }
    }
View Full Code Here

           // Take in the new value
          TableCellEditor editor = getCellEditor();
          if (editor != null) {
              Object value = editor.getCellEditorValue();
        if (value != null) {
          final MTextController textController = (MTextController) TextController.getController();
          final Object oldValue = getValueAt(editingRow, editingColumn);
          final String pattern  = oldValue instanceof IFormattedObject
                  ? ((IFormattedObject) oldValue).getPattern() : null;
          setValueAt(textController.guessObjectOrURI(value, pattern), editingRow, editingColumn);
        }
              removeEditor();
          }
    }
    finally{
View Full Code Here

TOP

Related Classes of org.freeplane.features.text.mindmapmode.MTextController

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.