freemind.modes.mindmapmode
Class EncryptedMindMapNode

java.lang.Object
  extended byfreemind.modes.NodeAdapter
      extended byfreemind.modes.mindmapmode.MindMapNodeModel
          extended byfreemind.modes.mindmapmode.EncryptedMindMapNode
All Implemented Interfaces:
MindMapNode, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class EncryptedMindMapNode
extends MindMapNodeModel


Nested Class Summary
 class EncryptedMindMapNode.DesEncrypter
           
 
Field Summary
 
Fields inherited from class freemind.modes.NodeAdapter
backgroundColor, children, cloud, color, folded, font, HGAP, icons, logger, stateIcons, style, underlined, userObject, VGAP
 
Fields inherited from interface freemind.modes.MindMapNode
AUTO, STYLE_AS_PARENT, STYLE_BUBBLE, STYLE_COMBINED, STYLE_FORK
 
Constructor Summary
EncryptedMindMapNode(java.lang.Object userObject, FreeMindMain frame)
           
 
Method Summary
 boolean checkPassword(java.lang.StringBuffer givenPassword)
           
 java.util.ListIterator childrenFolded()
           
 java.util.ListIterator childrenUnfolded()
           
 boolean decrypt(java.lang.StringBuffer givenPassword)
           
 void encrypt()
           
 java.lang.String getAdditionalInfo()
           
 int getChildCount()
           
 boolean hasChildren()
           
 boolean isFolded()
           
 boolean isVisible()
           
 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 setFolded(boolean folded)
           
 void setPassword(java.lang.StringBuffer password)
           
 void setShuttingDown(boolean isShuttingDown)
          isShuttingDown is used to fold an encrypted node properly.
 void updateIcon()
           
 
Methods inherited from class freemind.modes.mindmapmode.MindMapNodeModel
basicCopy, collectColors, saveHTML_escapeUnicode, saveHTML_escapeUnicodeAndSpecialCharacters, saveHTML, saveRTF, saveTXT
 
Methods inherited from class freemind.modes.NodeAdapter
addHook, addIcon, calcShiftY, calcVGap, children, estabilishOwnFont, getActivatedHooks, getAllowsChildren, getBackgroundColor, getChildAt, getChildPosition, getCloud, getColor, getEdge, getFont, getFontFamilyName, getFontSize, getFrame, getHGap, getHistoryInformation, getHooks, getIcons, getIndex, getLink, getNodeLevel, getObjectId, getParent, getParentNode, getPath, getPreferredChild, getShiftY, getShortText, getStateIcons, getStyle, getText, getToolTip, getVGap, getViewer, hasFoldedStrictDescendant, insert, invokeHook, isBold, isDescendantOf, isItalic, isLeaf, isLeft, isOneLeftSideOfRoot, isRoot, isUnderlined, remove, remove, removeFromParent, removeHook, removeLastIcon, setBackgroundColor, setBold, setCloud, setColor, setEdge, setFont, setFontSize, setHGap, setHistoryInformation, setItalic, setLeft, setLink, setParent, setParent, setPreferredChild, setShiftY, setStateIcon, setStyle, setText, setToolTip, setUnderlined, setUserObject, setVGap, setViewer, shallowCopy, toggleBold, toggleItalic, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncryptedMindMapNode

public EncryptedMindMapNode(java.lang.Object userObject,
                            FreeMindMain frame)
Parameters:
userObject -
frame -
Method Detail

decrypt

public boolean decrypt(java.lang.StringBuffer givenPassword)
Parameters:
givenPassword -
Returns:
true, if the password was correct.

checkPassword

public boolean checkPassword(java.lang.StringBuffer givenPassword)
Parameters:
givenPassword -

encrypt

public void encrypt()

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Overrides:
getChildCount in class NodeAdapter

childrenFolded

public java.util.ListIterator childrenFolded()
Specified by:
childrenFolded in interface MindMapNode
Overrides:
childrenFolded in class NodeAdapter

childrenUnfolded

public java.util.ListIterator childrenUnfolded()
Specified by:
childrenUnfolded in interface MindMapNode
Overrides:
childrenUnfolded in class NodeAdapter

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in interface MindMapNode
Overrides:
hasChildren in class NodeAdapter

updateIcon

public void updateIcon()

setPassword

public void setPassword(java.lang.StringBuffer password)

isFolded

public boolean isFolded()
Specified by:
isFolded in interface MindMapNode
Overrides:
isFolded in class NodeAdapter

setFolded

public void setFolded(boolean folded)
Specified by:
setFolded in interface MindMapNode
Overrides:
setFolded in class NodeAdapter

setAdditionalInfo

public void setAdditionalInfo(java.lang.String info)
Description copied from interface: MindMapNode
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.

Specified by:
setAdditionalInfo in interface MindMapNode
Overrides:
setAdditionalInfo in class NodeAdapter

getAdditionalInfo

public java.lang.String getAdditionalInfo()
Specified by:
getAdditionalInfo in interface MindMapNode
Overrides:
getAdditionalInfo in class NodeAdapter

save

public XMLElement save(java.io.Writer writer,
                       MindMapLinkRegistry registry)
                throws java.io.IOException
Specified by:
save in interface MindMapNode
Overrides:
save in class NodeAdapter
Throws:
java.io.IOException

setShuttingDown

public void setShuttingDown(boolean isShuttingDown)
isShuttingDown is used to fold an encrypted node properly. If it is encrypted, it has no children. Thus, the formely existing children can't be removed. Thus, this flag postpones the childlessness of a node until it tree structure is updated.

Parameters:
isShuttingDown - The isShuttingDown to set.

isVisible

public boolean isVisible()
Returns:
Returns the isVisible.