Package org.freeplane.features.styles

Examples of org.freeplane.features.styles.MapStyleModel


  public boolean formatNodeAsHyperlink(final ModeController modeController, final NodeModel node){
    final Boolean ownFlag = ownFormatNodeAsHyperlink(node);
    if(ownFlag != null)
      return ownFlag;
    Collection<IStyle> collection = LogicalStyleController.getController(modeController).getStyles(node);
    final MapStyleModel mapStyles = MapStyleModel.getExtension(node.getMap());
    for(IStyle styleKey : collection){
      final NodeModel styleNode = mapStyles.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final Boolean styleFlag = ownFormatNodeAsHyperlink(styleNode);
      if(styleFlag != null)
View Full Code Here


            nodes.add(child);
        }
        if(! node.isRoot()){
            return nodes;
        }
        final MapStyleModel mapStyleModel = MapStyleModel.getExtension(node.getMap());
        MapViewLayout layoutType = mapStyleModel.getMapViewLayout();
        if(layoutType.equals(MapViewLayout.OUTLINE)){
            return nodes;
        }

        Collections.sort(nodes, new Comparator<Object>() {
View Full Code Here

    controller.copyAttributesToNode(model, node);
  }

  private NodeModel getAttributes(final NodeModel node) {
    final IStyle style = LogicalStyleController.getController().getFirstStyle(node);
    final MapStyleModel extension = MapStyleModel.getExtension(node.getMap());
    final NodeModel styleNode = extension.getStyleNode(style);
    return styleNode;
    }
View Full Code Here

    final WriteManager writeManager = mapController.getWriteManager();
    final IconBuilder textBuilder = new IconBuilder(this, IconStoreFactory.create());
    textBuilder.registerBy(readManager, writeManager);
    addIconGetter(IPropertyHandler.STYLE, new IPropertyHandler<Collection<MindIcon>, NodeModel>() {
      public Collection<MindIcon> getProperty(final NodeModel node, final Collection<MindIcon> currentValue) {
        final MapStyleModel model = MapStyleModel.getExtension(node.getMap());
        final Collection<IStyle> styleKeys = LogicalStyleController.getController(modeController).getStyles(node);
        for(IStyle styleKey : styleKeys){
          final NodeModel styleNode = model.getStyleNode(styleKey);
          if (styleNode == null || node == styleNode && !(styleKey instanceof StyleNode)) {
            continue;
          }
          final List<MindIcon> styleIcons;
          styleIcons = styleNode.getIcons();
View Full Code Here

    defaultFont = null;
    defaultColor = null;
  }

  private void setDefaultsFrom(MapModel map) {
      final MapStyleModel model = MapStyleModel.getExtension(map);
        final NodeModel styleNode = model.getStyleNodeSafe(MapStyleModel.DEFAULT_STYLE);
        defaultFont = nodeStyleController.getFont(styleNode);
        defaultColor =  nodeStyleController.getColor(styleNode);
    }
View Full Code Here

    fileout.write("<title>"
            + MindMapHTMLWriter.writeHTML_escapeUnicodeAndSpecialCharacters(TextController.getController().getPlainTextContent(rootNodeOfBranch)
                .replace('\n', ' ')) + "</title>" + MindMapHTMLWriter.el);
    writeStyle();
    fileout.write(MindMapHTMLWriter.el + "</head>" + MindMapHTMLWriter.el + "<body");
    final MapStyleModel style = MapStyleModel.getExtension(rootNodeOfBranch.getMap());
    final Color background = style != null ? style.getBackgroundColor() : null;
    if (background != null) {
      fileout.write(" bgcolor=" + ColorUtils.colorToString(background));
    }
    fileout.write(">" + MindMapHTMLWriter.el);
    if (writeFoldingCode) {
View Full Code Here

          final DetailTextModel detailText = DetailTextModel.getDetailText(node);
          if (detailText == null || ! (detailText.isHidden() || ShortenedTextModel.isShortened(node)) ){
             return null;
           }
          final NodeStyleController style = (NodeStyleController) modeController.getExtension(NodeStyleController.class);
              final MapStyleModel model = MapStyleModel.getExtension(node.getMap());
              final NodeModel detailStyleNode = model.getStyleNodeSafe(MapStyleModel.DETAILS_STYLE);
              Font detailFont = style.getFont(detailStyleNode);
              Color detailBackground = style.getBackgroundColor(detailStyleNode);
              Color detailForeground = style.getColor(detailStyleNode);
         
          final StringBuilder rule = new StringBuilder();
View Full Code Here

    setIsMinimized(node, ! isMinimized(node));
    }

  public String getNodeFormat(NodeModel node) {
    Collection<IStyle> collection = LogicalStyleController.getController(modeController).getStyles(node);
    final MapStyleModel model = MapStyleModel.getExtension(node.getMap());
    for(IStyle styleKey : collection){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final String format = NodeStyleModel.getNodeFormat(styleNode);
      if (format != null) {
View Full Code Here

        return false;
    }

    public boolean getNodeNumbering(NodeModel node) {
    Collection<IStyle> collection = LogicalStyleController.getController(modeController).getStyles(node);
    final MapStyleModel model = MapStyleModel.getExtension(node.getMap());
    for(IStyle styleKey : collection){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final Boolean numbering = NodeStyleModel.getNodeNumbering(styleNode);
      if (numbering != null) {
View Full Code Here

TOP

Related Classes of org.freeplane.features.styles.MapStyleModel

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.