Package org.freeplane.features.map

Examples of org.freeplane.features.map.NodeModel


    public void selectContinuous(final NodeModel node) {
      MapView.this.selectContinuous(getNodeView(node));
    }

    public void selectRoot() {
      final NodeModel rootNode = getModel().getRootNode();
      selectAsTheOnlyOneSelected(rootNode);
      centerNode(rootNode);
    }
View Full Code Here


      if ((e.getClickCount() != 2) || (e.getButton() != MouseEvent.BUTTON1)
              || (cursorType == Cursor.SE_RESIZE_CURSOR)) {
        return false;
      }
      final ExternalResource activeView = getModel(e);
      NodeModel node = null;
      //get node from mouse click
      for (int i = 0; i < e.getComponent().getParent().getComponentCount(); i++) {
        if (e.getComponent().getParent().getComponent(i) instanceof MainView) {
          final MainView mv = (MainView) e.getComponent().getParent().getComponent(i);
          node = mv.getNodeView().getModel();
          break;
        }
      }
      if (node == null) {
        node = Controller.getCurrentModeController().getMapController().getSelectedNode();
      }
      final MapModel map = node.getMap();
      URI absoluteUri = activeView.getAbsoluteUri(map);
      if(absoluteUri == null)
        return false;
      final String sActUri = absoluteUri.toString();
      if (!sActUri.matches(".*_[0-9]{2}\\.[a-zA-Z0-9]*")) {
View Full Code Here

    private void addSelectionForHooks(final NodeView node) {
      if(! isSelected())
        return;
      final ModeController modeController = getModeController();
      final MapController mapController = modeController.getMapController();
      final NodeModel model = node.getModel();
      mapController.onSelect(model);
    }
View Full Code Here

    return null;
  }

  public void endElement(final Object parent, final String tag, final Object userObject, final XMLElement dom) {
    if (parent instanceof NodeModel) {
      final NodeModel node = (NodeModel) parent;
      if (userObject instanceof CloudModel) {
        final CloudModel cloud = (CloudModel) userObject;
        CloudModel.setModel(node, cloud);
      }
    }
View Full Code Here

  }

  protected CloudModel getStyleCloud(final MapModel map, final Collection<IStyle> collection) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for(IStyle styleKey : collection){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final CloudModel styleModel = CloudModel.getModel(styleNode);
      if (styleModel != null) {
View Full Code Here

  }

  /**
   */
  private void copyFormat(final NodeModel node) {
    CopyFormat.pattern = new NodeModel(null);
    Controller.getCurrentModeController().undoableCopyExtensions(LogicalStyleKeys.NODE_STYLE, node, pattern);
    Controller.getCurrentModeController().undoableCopyExtensions(LogicalStyleKeys.LOGICAL_STYLE, node, pattern);
  }
View Full Code Here

  }

  /**
   */
  private void pasteFormat(final NodeModel node) {
    final NodeModel pattern = CopyFormat.getPattern();
    if (pattern == null) {
      JOptionPane.showMessageDialog(Controller.getCurrentController().getViewController().getContentPane(), TextUtils
          .getText("no_format_copy_before_format_paste"), "" /*=Title*/, JOptionPane.ERROR_MESSAGE);
      return;
    }
View Full Code Here

  protected void actionPerformed(final ActionEvent e, final NodeModel selected) {
    ((MNodeStyleController) NodeStyleController.getController()).setBold(selected, bold);
  }

  boolean isBold() {
    final NodeModel node = Controller.getCurrentModeController().getMapController().getSelectedNode();
    return NodeStyleController.getController().isBold(node);
  }
View Full Code Here

  @Override
  public void actionPerformed(final ActionEvent e) {
    ModeController controller;
    {
      controller = Controller.getCurrentModeController();
      final NodeModel selected = controller.getMapController().getSelectedNode();
      final MCloudController cloudController = (MCloudController) CloudController
          .getController();
      cloudController.setCloud(selected, true);
    }
    super.actionPerformed(e);
View Full Code Here

    cloudController.setShape(node, actionShape);
  }

  @Override
  public void setSelected() {
    final NodeModel node = Controller.getCurrentModeController().getMapController().getSelectedNode();
    final CloudModel model = CloudModel.getModel(node);
    if (model != null) {
      if (actionShape.equals(model.getShape())) {
        setSelected(true);
        return;
View Full Code Here

TOP

Related Classes of org.freeplane.features.map.NodeModel

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.