Package org.freeplane.features.styles

Examples of org.freeplane.features.styles.MapStyleModel


  public Color getColor(final NodeModel node) {
    return textColorHandlers.getProperty(node);
  }

  private Color getStyleBackgroundColor(final MapModel map, final Collection<IStyle> styleKeys) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for(IStyle styleKey : styleKeys){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final NodeStyleModel styleModel = NodeStyleModel.getModel(styleNode);
      if (styleModel == null) {
View Full Code Here


    }
    return null;
  }

  private int getStyleMaxNodeWidth(final MapModel map, final Collection<IStyle> styleKeys) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for(IStyle styleKey : styleKeys){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final NodeSizeModel sizeModel = NodeSizeModel.getModel(styleNode);
      if (sizeModel == null) {
View Full Code Here

    }
    return 600;
  }
 
  private int getStyleMinWidth(final MapModel map, final Collection<IStyle> styleKeys) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for(IStyle styleKey : styleKeys){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final NodeSizeModel sizeModel = NodeSizeModel.getModel(styleNode);
      if (sizeModel == null) {
View Full Code Here

  private static int getDefaultFontSize() {
    return ResourceController.getResourceController().getIntProperty("defaultfontsize", 10);
  }

  public Font getDefaultFont(final MapModel map, final IStyle style) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    final NodeModel styleNode = model.getStyleNodeSafe(style);
    return getFont(styleNode);
  }
View Full Code Here

    final NodeModel styleNode = model.getStyleNodeSafe(style);
    return getFont(styleNode);
  }

  private Font getStyleFont(final Font baseFont, final MapModel map, final Collection<IStyle> collection) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    Boolean bold = null;
        Boolean italic = null;
        String fontFamilyName = null;
        Integer fontSize = null;
    for(IStyle styleKey : collection){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final NodeStyleModel styleModel = NodeStyleModel.getModel(styleNode);
      if (styleModel == null) {
View Full Code Here

    }
    return new Font(family, style, size);
  }

  private String getStyleShape(final MapModel map, final Collection<IStyle> style) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for(IStyle styleKey : style){
      final NodeModel styleNode = model.getStyleNode(styleKey);
      if (styleNode == null) {
        continue;
      }
      final NodeStyleModel styleModel = NodeStyleModel.getModel(styleNode);
      if (styleModel == null) {
View Full Code Here

    }
    return null;
  }

  private Color getStyleTextColor(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 NodeStyleModel styleModel = NodeStyleModel.getModel(styleNode);
      if (styleModel == null) {
View Full Code Here

    final NoteController noteController = NoteController.getController(getModeController());
    showNotes= noteController != null && noteController.showNotesInMap(getModel());
        updateContentStyle();
        initRoot();
    setBackground(requiredBackground());
    final MapStyleModel mapStyleModel = MapStyleModel.getExtension(model);
    zoom = mapStyleModel.getZoom();
    layoutType = mapStyleModel.getMapViewLayout();
    final IUserInputListenerFactory userInputListenerFactory = getModeController().getUserInputListenerFactory();
    addMouseListener(userInputListenerFactory.getMapMouseListener());
    addMouseMotionListener(userInputListenerFactory.getMapMouseListener());
    addMouseWheelListener(userInputListenerFactory.getMapMouseWheelListener());
    setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, emptyNodeViewSet());
View Full Code Here

  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);
        detailForeground = style.getColor(detailStyleNode);
    }
View Full Code Here

    final CloudBuilder cloudBuilder = new CloudBuilder(mapController, this);
    cloudBuilder.registerBy(readManager, writeManager);
  }

  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

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.