Examples of MapModel


Examples of freemarker.ext.beans.MapModel

    if (obj instanceof Collection<?>) { return new SimpleSequence((Collection<?>) obj, this); }
    if (obj instanceof Map<?, ?>) {
      if (altMapWrapper) {
        return new FriendlyMapModel((Map<?, ?>) obj, this);
      } else {
        return new MapModel((Map<?, ?>) obj, this);
      }
    }
    return super.wrap(obj);
  }
View Full Code Here

Examples of freemarker.ext.beans.MapModel

                    map.put( Character.toLowerCase(p.charAt(0)) + p.substring(1), value.toString());   
                   
                }
          
                SimpleHash model = new SimpleHash();
                model.put( "properties", new MapModel(map, this) );
                model.put( "className", clazz.getSimpleName() );
               
                wrapInternal(map, model, (T) object);
                return model;
            }
View Full Code Here

Examples of freemarker.ext.beans.MapModel

    if (obj instanceof Collection<?>) { return new SimpleSequence((Collection<?>) obj, this); }
    if (obj instanceof Map<?, ?>) {
      if (altMapWrapper) {
        return new FriendlyMapModel((Map<?, ?>) obj, this);
      } else {
        return new MapModel((Map<?, ?>) obj, this);
      }
    }
    return super.wrap(obj);
  }
View Full Code Here

Examples of org.freeplane.features.map.MapModel

  public ShowNotesInMapAction() {
    super("ShowNotesInMapAction");
  }

  public void actionPerformed(ActionEvent e) {
    final MapModel map = Controller.getCurrentController().getMap();
    final MNoteController noteController = (MNoteController) NoteController.getController();
    noteController.setShowNotesInMap(map, ! NoteController.getController().showNotesInMap(map));
    final IMapSelection selection = Controller.getCurrentController().getSelection();
    selection.keepNodePosition(selection.getSelected(), 0.0f, 0.0f);
    setSelected();
View Full Code Here

Examples of org.freeplane.features.map.MapModel

    setSelected();
  }

  @Override
  public void setSelected() {
    final MapModel map = Controller.getCurrentController().getMap();
    final boolean notesShown = map != null && NoteController.getController().showNotesInMap(map);
    setSelected(notesShown);
  }
View Full Code Here

Examples of org.freeplane.features.map.MapModel

        return null;
      }
    }
    final MMapIO mapIO = (MMapIO) MModeController.getMModeController().getExtension(MapIO.class);

    MapModel map = mapIO.newMapFromDefaultTemplate();
    if (map == null) {
      return null;
    }

    if (name != null) {
      //WORKSPACE - fixme: the updates do not show in mapview (ask dimitry)
      //String oldName = map.getRootNode().getText();
      map.getRootNode().setText(name);
      Controller.getCurrentController().getMapViewManager().getMapViewComponent().repaint();
    }

    if (save) {
      mapIO.save(map, f);
    }
    else {
      if(f != null) {
        try {
          map.setURL(Compat.fileToUrl(f));
        } catch (MalformedURLException e) {
          LogUtils.warn(WorkspaceNewMapAction.class + ": " + e.getMessage());
        }
      }
      Controller.getCurrentModeController().getMapController().setSaved(map, false);
View Full Code Here

Examples of org.freeplane.features.map.MapModel

        return getStyleBackgroundColor(node.getMap(), LogicalStyleController.getController(modeController).getStyles(node));
      }
    });
    addShapeGetter(IPropertyHandler.STYLE, new IPropertyHandler<String, NodeModel>() {
      public String getProperty(final NodeModel node, final String currentValue) {
        final MapModel map = node.getMap();
        final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
        final Collection<IStyle> style = styleController.getStyles(node);
        final String returnedString = getStyleShape(map, style);
        return returnedString;
      }
View Full Code Here

Examples of org.freeplane.features.map.MapModel

    final NodeStyleModel style = (NodeStyleModel) node.getExtension(NodeStyleModel.class);
    return style == null ? null : style.getNodeFormat();
  }

  public int getMaxWidth(NodeModel node) {
    final MapModel map = node.getMap();
    final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
    final Collection<IStyle> style = styleController.getStyles(node);
    final int maxTextWidth = getStyleMaxNodeWidth(map, style);
    return maxTextWidth;
    }
View Full Code Here

Examples of org.freeplane.features.map.MapModel

    final int maxTextWidth = getStyleMaxNodeWidth(map, style);
    return maxTextWidth;
    }

  public int getMinWidth(NodeModel node) {
    final MapModel map = node.getMap();
    final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
    final Collection<IStyle> style = styleController.getStyles(node);
    final int minWidth = getStyleMinWidth(map, style);
    return minWidth;
    }
View Full Code Here

Examples of org.freeplane.features.map.MapModel

      }
    }

  private void updateContentStyle() {
        final NodeStyleController style = Controller.getCurrentModeController().getExtension(NodeStyleController.class);
        MapModel map = getModel();
        noteFont = UITools.scale(style.getDefaultFont(map, MapStyleModel.NOTE_STYLE));
        final MapStyleModel model = MapStyleModel.getExtension(map);
        final NodeModel detailStyleNode = model.getStyleNodeSafe(MapStyleModel.DETAILS_STYLE);
        detailFont = UITools.scale(style.getFont(detailStyleNode));
        detailBackground = style.getBackgroundColor(detailStyleNode);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.