freemind.modes
Class StylePattern

java.lang.Object
  extended byfreemind.modes.StylePattern

public class StylePattern
extends java.lang.Object

This class represents a StylePattern than can be applied to a node or a whole branch. The properties of the nodes are replaced with the properties saved in the pattern. If a property "text" is given, this pattern is automatically applied to all nodes that contain the String saved in "text".


Constructor Summary
StylePattern(MindMapNode node)
          Constructs a style pattern from a node:
StylePattern(XMLElement elm, java.util.List justConstructedPatterns)
           
 
Method Summary
 boolean getAppliesToChildren()
           
 boolean getAppliesToEdge()
           
 boolean getAppliesToNode()
           
 boolean getAppliesToNodeFont()
           
 boolean getAppliesToNodeIcon()
           
 StylePattern getChildrenStylePattern()
          Get the value of ChildrenStylePattern.
 java.awt.Color getEdgeColor()
          Get the value of edgeColor.
 java.lang.String getEdgeStyle()
          Get the value of edgeStyle.
 int getEdgeWidth()
          Get the value of edgeWidth.
 boolean getFolded()
          Get the value of folded.
 java.lang.String getName()
          Get the value of name.
 java.awt.Color getNodeBackgroundColor()
           
 java.awt.Color getNodeColor()
          Get the value of nodeColor.
 java.lang.Boolean getNodeFontBold()
           
 java.lang.String getNodeFontFamily()
           
 java.lang.Boolean getNodeFontItalic()
           
 java.lang.Integer getNodeFontSize()
           
 MindIcon getNodeIcon()
          Get the value of icon.
 java.lang.String getNodeStyle()
          Get the value of nodeStyle.
 boolean getRecursive()
          Determine if the properies of this pattern, of course except the "text" attribute, apply to all the child nodes of this node.
 java.lang.String getText()
          Get the value of text.
protected  void loadPattern(XMLElement pattern, java.util.List justConstructedPatterns)
           
static java.util.List loadPatterns(java.io.File file)
           
static java.util.List loadPatterns(java.io.Reader reader)
           
 void setChildrenStylePattern(StylePattern ChildrenStylePattern)
          Set the value of ChildrenStylePattern.
 void setEdgeColor(java.awt.Color edgeColor)
          Set the value of edgeColor.
 void setEdgeStyle(java.lang.String edgeStyle)
          Set the value of edgeStyle.
 void setEdgeWidth(int edgeWidth)
          Set the value of edgeWidth.
 void setFolded(boolean v)
          Set the value of folded.
 void setName(java.lang.String v)
          Set the value of name.
 void setNodeBackgroundColor(java.awt.Color nodeBackgroundColor)
           
 void setNodeColor(java.awt.Color v)
          Set the value of nodeColor.
 void setNodeFontBold(java.lang.Boolean nodeFontBold)
           
 void setNodeFontFamily(java.lang.String nodeFontFamily)
           
 void setNodeFontItalic(java.lang.Boolean nodeFontItalic)
           
 void setNodeFontSize(java.lang.Integer nodeFontSize)
           
 void setNodeIcon(MindIcon nodeIcon)
          Set the value of icon.
 void setNodeStyle(java.lang.String nodeStyle)
          Set the value of nodeStyle.
 void setRecursive(boolean v)
          Set the value of recursive.
 void setText(java.lang.String v)
          Set the value of text.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StylePattern

public StylePattern(XMLElement elm,
                    java.util.List justConstructedPatterns)

StylePattern

public StylePattern(MindMapNode node)
Constructs a style pattern from a node:

Parameters:
node -
Method Detail

toString

public java.lang.String toString()

getAppliesToEdge

public boolean getAppliesToEdge()

getAppliesToNode

public boolean getAppliesToNode()

getAppliesToNodeFont

public boolean getAppliesToNodeFont()

getAppliesToNodeIcon

public boolean getAppliesToNodeIcon()

getAppliesToChildren

public boolean getAppliesToChildren()

getName

public java.lang.String getName()
Get the value of name.

Returns:
Value of name.

setName

public void setName(java.lang.String v)
Set the value of name.

Parameters:
v - Value to assign to name.

getRecursive

public boolean getRecursive()
Determine if the properies of this pattern, of course except the "text" attribute, apply to all the child nodes of this node.

Returns:
Value of recursive.

setRecursive

public void setRecursive(boolean v)
Set the value of recursive.

Parameters:
v - Value to assign to recursive.

getFolded

public boolean getFolded()
Get the value of folded.

Returns:
Value of folded.

setFolded

public void setFolded(boolean v)
Set the value of folded.

Parameters:
v - Value to assign to folded.

getText

public java.lang.String getText()
Get the value of text.

Returns:
Value of text.

setText

public void setText(java.lang.String v)
Set the value of text.

Parameters:
v - Value to assign to text.

getNodeColor

public java.awt.Color getNodeColor()
Get the value of nodeColor.

Returns:
Value of nodeColor.

setNodeColor

public void setNodeColor(java.awt.Color v)
Set the value of nodeColor.

Parameters:
v - Value to assign to nodeColor.

getNodeBackgroundColor

public java.awt.Color getNodeBackgroundColor()

setNodeBackgroundColor

public void setNodeBackgroundColor(java.awt.Color nodeBackgroundColor)

getNodeStyle

public java.lang.String getNodeStyle()
Get the value of nodeStyle.

Returns:
Value of nodeStyle.

setNodeStyle

public void setNodeStyle(java.lang.String nodeStyle)
Set the value of nodeStyle.


getNodeFontFamily

public java.lang.String getNodeFontFamily()
Returns:
Returns the nodeFontFamily.

setNodeFontFamily

public void setNodeFontFamily(java.lang.String nodeFontFamily)
Parameters:
nodeFontFamily - The nodeFontFamily to set.

getNodeFontSize

public java.lang.Integer getNodeFontSize()
Returns:
Returns the nodeFontSize.

setNodeFontSize

public void setNodeFontSize(java.lang.Integer nodeFontSize)
Parameters:
nodeFontSize - The nodeFontSize to set.

getNodeIcon

public MindIcon getNodeIcon()
Get the value of icon.

Returns:
Value of icon.

setNodeIcon

public void setNodeIcon(MindIcon nodeIcon)
Set the value of icon.


getEdgeColor

public java.awt.Color getEdgeColor()
Get the value of edgeColor.

Returns:
Value of edgeColor.

setEdgeColor

public void setEdgeColor(java.awt.Color edgeColor)
Set the value of edgeColor.


getEdgeStyle

public java.lang.String getEdgeStyle()
Get the value of edgeStyle.

Returns:
Value of edgeStyle.

setEdgeStyle

public void setEdgeStyle(java.lang.String edgeStyle)
Set the value of edgeStyle.


getEdgeWidth

public int getEdgeWidth()
Get the value of edgeWidth.

Returns:
Value of edgeWidth.

setEdgeWidth

public void setEdgeWidth(int edgeWidth)
Set the value of edgeWidth.


getChildrenStylePattern

public StylePattern getChildrenStylePattern()
Get the value of ChildrenStylePattern.

Returns:
Value of ChildrenStylePattern.

setChildrenStylePattern

public void setChildrenStylePattern(StylePattern ChildrenStylePattern)
Set the value of ChildrenStylePattern.


loadPatterns

public static java.util.List loadPatterns(java.io.File file)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

loadPatterns

public static java.util.List loadPatterns(java.io.Reader reader)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

loadPattern

protected void loadPattern(XMLElement pattern,
                           java.util.List justConstructedPatterns)

getNodeFontBold

public java.lang.Boolean getNodeFontBold()
Returns:
Returns the nodeFontBold.

setNodeFontBold

public void setNodeFontBold(java.lang.Boolean nodeFontBold)
Parameters:
nodeFontBold - The nodeFontBold to set.

getNodeFontItalic

public java.lang.Boolean getNodeFontItalic()
Returns:
Returns the nodeFontItalic.

setNodeFontItalic

public void setNodeFontItalic(java.lang.Boolean nodeFontItalic)
Parameters:
nodeFontItalic - The nodeFontItalic to set.