freemind.modes

Class NodeAdapter

public abstract class NodeAdapter extends Object implements MindMapNode

This class represents a single Node of a Tree. It contains direct handles to its parent and children and to its view.
Field Summary
protected Listchildren
protected MindMapCloudcloud
parameters of an eventually associated cloud
protected Colorcolor
protected booleanfolded
protected Fontfont
protected Vectoricons
stores the icons associated with this node.
protected Stringstyle
protected booleanunderlined
protected ObjectuserObject
Constructor Summary
protected NodeAdapter(FreeMindMain frame)
protected NodeAdapter(Object userObject, FreeMindMain frame)
Method Summary
voidaddIcon(MindIcon _icon)
protected MindMapNodebasicCopy()
Enumerationchildren()
AFAIK there is no way to get an enumeration out of a linked list.
ListIteratorchildrenFolded()
ListIteratorchildrenUnfolded()
voidestabilishOwnFont()
booleangetAllowsChildren()
TreeNodegetChildAt(int childIndex)
intgetChildCount()
intgetChildPosition(MindMapNode childNode)
MindMapCloudgetCloud()
ColorgetColor()
The Foreground/Font Color
MindMapEdgegetEdge()
FontgetFont()
StringgetFontFamilyName()
StringgetFontSize()
FreeMindMaingetFrame()
VectorgetIcons()
intgetIndex(TreeNode node)
StringgetLink()
intgetNodeLevel()
TreeNodegetParent()
MindMapNodegetParentNode()
TreePathgetPath()
Creates the TreePath recursively
MindMapNodegetPreferredChild()
StringgetStyle()
A Node-Style like MindMapNode.STYLE_FORK or MindMapNode.STYLE_BUBBLE
NodeViewgetViewer()
booleanhasChildren()
booleanhasFoldedStrictDescendant()
True iff one of node's strict descendants is folded.
voidinsert(MutableTreeNode child, int index)
booleanisBold()
booleanisDescendantOf(MindMapNode node)
Returns whether the argument is parent or parent of one of the grandpa's of this node. (transitive)
booleanisFolded()
booleanisItalic()
booleanisLeaf()
Tools.BooleanHolderisLeft()
booleanisRoot()
booleanisUnderlined()
voidremove(int index)
voidremove(MutableTreeNode node)
voidremoveFromParent()
intremoveLastIcon()
voidsetBold(boolean bold)
voidsetCloud(MindMapCloud cloud)
voidsetColor(Color color)
voidsetEdge(MindMapEdge edge)
voidsetFolded(boolean folded)
voidsetFont(Font font)
voidsetFontSize(int fontSize)
voidsetItalic(boolean italic)
voidsetLeft(boolean isLeft)
voidsetLink(String link)
voidsetParent(MutableTreeNode newParent)
voidsetParent(MindMapNode newParent)
voidsetPreferredChild(MindMapNode node)
voidsetStyle(String style)
voidsetUnderlined(boolean underlined)
voidsetUserObject(Object object)
voidsetViewer(NodeView viewer)
MindMapNodeshallowCopy()
voidtoggleBold()
voidtoggleItalic()
StringtoString()

Field Detail

children

protected List children

cloud

protected MindMapCloud cloud
parameters of an eventually associated cloud

color

protected Color color

folded

protected boolean folded

font

protected Font font

icons

protected Vector icons
stores the icons associated with this node.

style

protected String style

underlined

protected boolean underlined

userObject

protected Object userObject

Constructor Detail

NodeAdapter

protected NodeAdapter(FreeMindMain frame)

NodeAdapter

protected NodeAdapter(Object userObject, FreeMindMain frame)

Method Detail

addIcon

public void addIcon(MindIcon _icon)

basicCopy

protected MindMapNode basicCopy()

children

public Enumeration children()
AFAIK there is no way to get an enumeration out of a linked list. So this exception must be thrown, or we can't implement TreeNode anymore (maybe we shouldn't?)

childrenFolded

public ListIterator childrenFolded()

childrenUnfolded

public ListIterator childrenUnfolded()

estabilishOwnFont

public void estabilishOwnFont()

getAllowsChildren

public boolean getAllowsChildren()

getChildAt

public TreeNode getChildAt(int childIndex)

getChildCount

public int getChildCount()

getChildPosition

public int getChildPosition(MindMapNode childNode)

getCloud

public MindMapCloud getCloud()

getColor

public Color getColor()
The Foreground/Font Color

getEdge

public MindMapEdge getEdge()

getFont

public Font getFont()

getFontFamilyName

public String getFontFamilyName()

getFontSize

public String getFontSize()

getFrame

public FreeMindMain getFrame()

getIcons

public Vector getIcons()

getIndex

public int getIndex(TreeNode node)

getLink

public String getLink()

getNodeLevel

public int getNodeLevel()

getParent

public TreeNode getParent()

getParentNode

public MindMapNode getParentNode()

getPath

public TreePath getPath()
Creates the TreePath recursively

getPreferredChild

public MindMapNode getPreferredChild()

getStyle

public String getStyle()
A Node-Style like MindMapNode.STYLE_FORK or MindMapNode.STYLE_BUBBLE

getViewer

public NodeView getViewer()

hasChildren

public boolean hasChildren()

hasFoldedStrictDescendant

public boolean hasFoldedStrictDescendant()
True iff one of node's strict descendants is folded. A node N is not its strict descendant - the fact that node itself is folded is not sufficient to return true.

insert

public void insert(MutableTreeNode child, int index)

isBold

public boolean isBold()

isDescendantOf

public boolean isDescendantOf(MindMapNode node)
Returns whether the argument is parent or parent of one of the grandpa's of this node. (transitive)

isFolded

public boolean isFolded()

isItalic

public boolean isItalic()

isLeaf

public boolean isLeaf()

isLeft

public Tools.BooleanHolder isLeft()

isRoot

public boolean isRoot()

isUnderlined

public boolean isUnderlined()

remove

public void remove(int index)

remove

public void remove(MutableTreeNode node)

removeFromParent

public void removeFromParent()

removeLastIcon

public int removeLastIcon()

setBold

public void setBold(boolean bold)

setCloud

public void setCloud(MindMapCloud cloud)

setColor

public void setColor(Color color)

setEdge

public void setEdge(MindMapEdge edge)

setFolded

public void setFolded(boolean folded)

setFont

public void setFont(Font font)

setFontSize

public void setFontSize(int fontSize)

setItalic

public void setItalic(boolean italic)

setLeft

public void setLeft(boolean isLeft)

setLink

public void setLink(String link)

setParent

public void setParent(MutableTreeNode newParent)

setParent

public void setParent(MindMapNode newParent)

setPreferredChild

public void setPreferredChild(MindMapNode node)

setStyle

public void setStyle(String style)

setUnderlined

public void setUnderlined(boolean underlined)

setUserObject

public void setUserObject(Object object)

setViewer

public void setViewer(NodeView viewer)

shallowCopy

public MindMapNode shallowCopy()

toggleBold

public void toggleBold()

toggleItalic

public void toggleItalic()

toString

public String toString()