freemind.modes

Class 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(XMLElement elm, List justConstructedPatterns)

Method Summary

boolean
getAppliesToChildren()
boolean
getAppliesToEdge()
boolean
getAppliesToNode()
boolean
getAppliesToNodeFont()
boolean
getAppliesToNodeIcon()
StylePattern
getChildrenStylePattern()
Get the value of ChildrenStylePattern.
Color
getEdgeColor()
Get the value of edgeColor.
String
getEdgeStyle()
Get the value of edgeStyle.
int
getEdgeWidth()
Get the value of edgeWidth.
boolean
getFolded()
Get the value of folded.
String
getName()
Get the value of name.
Color
getNodeColor()
Get the value of nodeColor.
Font
getNodeFont()
Get the value of font.
MindIcon
getNodeIcon()
Get the value of icon.
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.
String
getText()
Get the value of text.
protected void
loadPattern(XMLElement pattern, List justConstructedPatterns)
static List
loadPatterns(File file)
static List
loadPatterns(Reader reader)
void
setChildrenStylePattern(StylePattern ChildrenStylePattern)
Set the value of ChildrenStylePattern.
void
setEdgeColor(Color edgeColor)
Set the value of edgeColor.
void
setEdgeStyle(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(String v)
Set the value of name.
void
setNodeColor(Color v)
Set the value of nodeColor.
void
setNodeFont(Font nodeFont)
Set the value of font.
void
setNodeIcon(MindIcon nodeIcon)
Set the value of icon.
void
setNodeStyle(String nodeStyle)
Set the value of nodeStyle.
void
setRecursive(boolean v)
Set the value of recursive.
void
setText(String v)
Set the value of text.
String
toString()

Constructor Details

StylePattern

public StylePattern(XMLElement elm,
                    List justConstructedPatterns)

Method Details

getAppliesToChildren

public boolean getAppliesToChildren()

getAppliesToEdge

public boolean getAppliesToEdge()

getAppliesToNode

public boolean getAppliesToNode()

getAppliesToNodeFont

public boolean getAppliesToNodeFont()

getAppliesToNodeIcon

public boolean getAppliesToNodeIcon()

getChildrenStylePattern

public StylePattern getChildrenStylePattern()
Get the value of ChildrenStylePattern.
Returns:
Value of ChildrenStylePattern.

getEdgeColor

public Color getEdgeColor()
Get the value of edgeColor.
Returns:
Value of edgeColor.

getEdgeStyle

public String getEdgeStyle()
Get the value of edgeStyle.
Returns:
Value of edgeStyle.

getEdgeWidth

public int getEdgeWidth()
Get the value of edgeWidth.
Returns:
Value of edgeWidth.

getFolded

public boolean getFolded()
Get the value of folded.
Returns:
Value of folded.

getName

public String getName()
Get the value of name.
Returns:
Value of name.

getNodeColor

public Color getNodeColor()
Get the value of nodeColor.
Returns:
Value of nodeColor.

getNodeFont

public Font getNodeFont()
Get the value of font.
Returns:
Value of font.

getNodeIcon

public MindIcon getNodeIcon()
Get the value of icon.
Returns:
Value of icon.

getNodeStyle

public String getNodeStyle()
Get the value of nodeStyle.
Returns:
Value of nodeStyle.

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.

getText

public String getText()
Get the value of text.
Returns:
Value of text.

loadPattern

protected void loadPattern(XMLElement pattern,
                           List justConstructedPatterns)

loadPatterns

public static List loadPatterns(File file)
            throws Exception

loadPatterns

public static List loadPatterns(Reader reader)
            throws Exception

setChildrenStylePattern

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

setEdgeColor

public void setEdgeColor(Color edgeColor)
Set the value of edgeColor.
Parameters:

setEdgeStyle

public void setEdgeStyle(String edgeStyle)
Set the value of edgeStyle.
Parameters:

setEdgeWidth

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

setFolded

public void setFolded(boolean v)
Set the value of folded.
Parameters:
v - Value to assign to folded.

setName

public void setName(String v)
Set the value of name.
Parameters:
v - Value to assign to name.

setNodeColor

public void setNodeColor(Color v)
Set the value of nodeColor.
Parameters:
v - Value to assign to nodeColor.

setNodeFont

public void setNodeFont(Font nodeFont)
Set the value of font.
Parameters:

setNodeIcon

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

setNodeStyle

public void setNodeStyle(String nodeStyle)
Set the value of nodeStyle.
Parameters:

setRecursive

public void setRecursive(boolean v)
Set the value of recursive.
Parameters:
v - Value to assign to recursive.

setText

public void setText(String v)
Set the value of text.
Parameters:
v - Value to assign to text.

toString

public String toString()