Package org.freeplane.features.styles

Examples of org.freeplane.features.styles.IStyle


    super("RedefineStyleAction");
  }

  public void actionPerformed(final ActionEvent e) {
    final NodeModel node = Controller.getCurrentController().getSelection().getSelected();
    final IStyle style = LogicalStyleController.getController().getFirstStyle(node);
    final MapStyleModel extension = MapStyleModel.getExtension(node.getMap());
    final NodeModel styleNode = extension.getStyleNode(style);
    if(styleNode == null)
      return;
    Controller.getCurrentModeController().undoableCopyExtensions(LogicalStyleKeys.NODE_STYLE, node, styleNode);
View Full Code Here


  public IStyle getStyle() {
    return LogicalStyleModel.getStyle(getDelegate());
  }

  public String getName() {
      final IStyle style = getStyle();
    return style == null ? null : StyleNamedObject.toKeyString(style);
    }
View Full Code Here

    else {
      final MapStyleModel mapStyleModel = MapStyleModel.getExtension(getDelegate().getMap());
      // actually styles is a HashSet so lookup is fast
      final Set<IStyle> styles = mapStyleModel.getStyles();
      // search for user defined styles
      final IStyle styleString = StyleFactory.create(styleName);
      if (styles.contains(styleString)) {
        setStyle(styleString);
        return;
      }
      // search for predefined styles by key
      final IStyle styleNamedObject = StyleFactory.create(new NamedObject(styleName));
      if (styles.contains(styleNamedObject)) {
        setStyle(styleNamedObject);
        return;
      }
      // search for predefined styles by their translated name (style.toString())
View Full Code Here

    final MAttributeController controller = MAttributeController.getController();
    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

TOP

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

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.