freemind.modes
Interface MindMapNode

All Superinterfaces:
javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
All Known Implementing Classes:
NodeAdapter

public interface MindMapNode
extends javax.swing.tree.MutableTreeNode


Field Summary
static int AUTO
           
static java.lang.String STYLE_AS_PARENT
           
static java.lang.String STYLE_BUBBLE
           
static java.lang.String STYLE_COMBINED
           
static java.lang.String STYLE_FORK
           
 
Method Summary
 PermanentNodeHook addHook(PermanentNodeHook hook)
          Adds the hook to the list of hooks to my node.
 void addIcon(MindIcon icon)
           
 int calcShiftY()
           
 int calcVGap()
           
 java.util.ListIterator childrenFolded()
           
 java.util.ListIterator childrenUnfolded()
           
 java.util.Collection getActivatedHooks()
           
 java.lang.String getAdditionalInfo()
           
 java.awt.Color getBackgroundColor()
           
 int getChildPosition(MindMapNode childNode)
           
 MindMapCloud getCloud()
           
 java.awt.Color getColor()
           
 MindMapEdge getEdge()
           
 java.awt.Font getFont()
           
 java.lang.String getFontFamilyName()
           
 java.lang.String getFontSize()
           
 int getHGap()
           
 HistoryInformation getHistoryInformation()
           
 java.util.List getHooks()
           
 java.util.List getIcons()
          Is a vector of MindIcon s
 java.lang.String getLink()
           
 int getNodeLevel()
           
 java.lang.String getObjectId(ModeController controller)
           
 MindMapNode getParentNode()
           
 javax.swing.tree.TreePath getPath()
           
 MindMapNode getPreferredChild()
           
 int getShiftY()
           
 java.lang.String getShortText(ModeController controller)
          returns a short textual description of the text contained in the node.
 java.util.Map getStateIcons()
          State icons are icons that are not saved.
 java.lang.String getStyle()
           
 java.lang.String getText()
           
 java.util.Map getToolTip()
           
 int getVGap()
           
 NodeView getViewer()
           
 boolean hasChildren()
           
 void invokeHook(NodeHook hook)
           
 boolean isBold()
           
 boolean isDescendantOf(MindMapNode node)
           
 boolean isFolded()
           
 boolean isItalic()
           
 Tools.BooleanHolder isLeft()
           
 boolean isOneLeftSideOfRoot()
          Root is on the right side.
 boolean isRoot()
           
 boolean isUnderlined()
           
 void removeHook(PermanentNodeHook hook)
          Removes the hook from the activated hooks, calls shutdown method of the hook and removes the hook from allHook belonging to the node afterwards.
 int removeLastIcon()
           
 XMLElement save(java.io.Writer writer, MindMapLinkRegistry registry)
           
 void setAdditionalInfo(java.lang.String info)
          This method can be used to store non-visual additions to a node.
 void setBackgroundColor(java.awt.Color color)
           
 void setCloud(MindMapCloud cloud)
           
 void setColor(java.awt.Color color)
           
 void setFolded(boolean folded)
           
 void setFont(java.awt.Font font)
           
 void setFontSize(int fontSize)
           
 void setHGap(int i)
           
 void setHistoryInformation(HistoryInformation historyInformation)
           
 void setLeft(boolean isLeft)
           
 void setLink(java.lang.String link)
           
 void setPreferredChild(MindMapNode node)
           
 void setShiftY(int y)
           
 void setStateIcon(java.lang.String key, javax.swing.ImageIcon icon)
           
 void setStyle(java.lang.String style)
          currently the style may be one of MindMapNode.STYLE_BUBBLE or MindMapNode.STYLE_FORK.
 void setText(java.lang.String text)
           
 void setToolTip(java.lang.String key, java.lang.String tip)
           
 void setVGap(int i)
           
 void setViewer(NodeView viewer)
           
 MindMapNode shallowCopy()
           
 java.lang.String toString()
           
 
Methods inherited from interface javax.swing.tree.MutableTreeNode
insert, remove, remove, removeFromParent, setParent, setUserObject
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Field Detail

STYLE_BUBBLE

public static final java.lang.String STYLE_BUBBLE
See Also:
Constant Field Values

STYLE_FORK

public static final java.lang.String STYLE_FORK
See Also:
Constant Field Values

STYLE_COMBINED

public static final java.lang.String STYLE_COMBINED
See Also:
Constant Field Values

STYLE_AS_PARENT

public static final java.lang.String STYLE_AS_PARENT
See Also:
Constant Field Values

AUTO

public static final int AUTO
See Also:
Constant Field Values
Method Detail

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getObjectId

public java.lang.String getObjectId(ModeController controller)
Returns:
returns the unique id of the node. It is generated using the LinkRegistry.

childrenFolded

public java.util.ListIterator childrenFolded()
Returns:
returns a ListIterator of all children of the node if the node is unfolded. EMPTY_LIST_ITERATOR otherwise.

childrenUnfolded

public java.util.ListIterator childrenUnfolded()
Returns:
returns a ListIterator of all (and not only the unfolded ones!!) children of the node.

hasChildren

public boolean hasChildren()

getChildPosition

public int getChildPosition(MindMapNode childNode)
Returns:
-1 if the argument childNode is not a child.

getPreferredChild

public MindMapNode getPreferredChild()

setPreferredChild

public void setPreferredChild(MindMapNode node)

getNodeLevel

public int getNodeLevel()

getLink

public java.lang.String getLink()

getShortText

public java.lang.String getShortText(ModeController controller)
returns a short textual description of the text contained in the node. Html is filtered out.


getEdge

public MindMapEdge getEdge()

getColor

public java.awt.Color getColor()

getStyle

public java.lang.String getStyle()

setStyle

public void setStyle(java.lang.String style)
currently the style may be one of MindMapNode.STYLE_BUBBLE or MindMapNode.STYLE_FORK.


getParentNode

public MindMapNode getParentNode()

isBold

public boolean isBold()

isItalic

public boolean isItalic()

isUnderlined

public boolean isUnderlined()

getFont

public java.awt.Font getFont()

getFontSize

public java.lang.String getFontSize()

getFontFamilyName

public java.lang.String getFontFamilyName()

getViewer

public NodeView getViewer()

setViewer

public void setViewer(NodeView viewer)

toString

public java.lang.String toString()

getPath

public javax.swing.tree.TreePath getPath()

isDescendantOf

public boolean isDescendantOf(MindMapNode node)

isRoot

public boolean isRoot()

isFolded

public boolean isFolded()

isLeft

public Tools.BooleanHolder isLeft()

isOneLeftSideOfRoot

public boolean isOneLeftSideOfRoot()
Root is on the right side.

Returns:

setLeft

public void setLeft(boolean isLeft)

setFolded

public void setFolded(boolean folded)

setFont

public void setFont(java.awt.Font font)

setShiftY

public void setShiftY(int y)

getShiftY

public int getShiftY()

calcShiftY

public int calcShiftY()

setVGap

public void setVGap(int i)

getVGap

public int getVGap()

calcVGap

public int calcVGap()

setHGap

public void setHGap(int i)

getHGap

public int getHGap()

setLink

public void setLink(java.lang.String link)

setFontSize

public void setFontSize(int fontSize)

setColor

public void setColor(java.awt.Color color)

getIcons

public java.util.List getIcons()
Is a vector of MindIcon s


addIcon

public void addIcon(MindIcon icon)

removeLastIcon

public int removeLastIcon()

getCloud

public MindMapCloud getCloud()

setCloud

public void setCloud(MindMapCloud cloud)

getBackgroundColor

public java.awt.Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)

getHooks

public java.util.List getHooks()

getActivatedHooks

public java.util.Collection getActivatedHooks()

addHook

public PermanentNodeHook addHook(PermanentNodeHook hook)
Adds the hook to the list of hooks to my node. Does not invoke the hook!

Parameters:
hook -
Returns:
returns the input parameter hook

invokeHook

public void invokeHook(NodeHook hook)

removeHook

public void removeHook(PermanentNodeHook hook)
Removes the hook from the activated hooks, calls shutdown method of the hook and removes the hook from allHook belonging to the node afterwards.


setToolTip

public void setToolTip(java.lang.String key,
                       java.lang.String tip)

getToolTip

public java.util.Map getToolTip()

setAdditionalInfo

public void setAdditionalInfo(java.lang.String info)
This method can be used to store non-visual additions to a node. Currently, it is used for encrypted nodes to store the encrypted content.

Parameters:
info -

getAdditionalInfo

public java.lang.String getAdditionalInfo()

shallowCopy

public MindMapNode shallowCopy()

save

public XMLElement save(java.io.Writer writer,
                       MindMapLinkRegistry registry)
                throws java.io.IOException
Throws:
java.io.IOException

getStateIcons

public java.util.Map getStateIcons()
State icons are icons that are not saved. They indicate that this node is special.

Returns:

setStateIcon

public void setStateIcon(java.lang.String key,
                         javax.swing.ImageIcon icon)
Parameters:
key -
icon - use null to remove the state icon. Then it is not required, that the key already exists.

getHistoryInformation

public HistoryInformation getHistoryInformation()

setHistoryInformation

public void setHistoryInformation(HistoryInformation historyInformation)