|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfreemind.modes.NodeAdapter
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 java.awt.Color |
backgroundColor
|
protected java.util.List |
children
|
protected MindMapCloud |
cloud
parameters of an eventually associated cloud |
protected java.awt.Color |
color
|
protected boolean |
folded
|
protected java.awt.Font |
font
|
static int |
HGAP
|
protected java.util.Vector |
icons
stores the icons associated with this node. |
protected static java.util.logging.Logger |
logger
|
protected java.util.TreeMap |
stateIcons
|
protected java.lang.String |
style
|
protected boolean |
underlined
|
protected java.lang.Object |
userObject
|
static int |
VGAP
|
| Fields inherited from interface freemind.modes.MindMapNode |
AUTO, STYLE_AS_PARENT, STYLE_BUBBLE, STYLE_COMBINED, STYLE_FORK |
| Constructor Summary | |
protected |
NodeAdapter(FreeMindMain frame)
|
protected |
NodeAdapter(java.lang.Object userObject,
FreeMindMain frame)
|
| Method Summary | |
PermanentNodeHook |
addHook(PermanentNodeHook hook)
Adds the hook to the list of hooks to my node. |
void |
addIcon(MindIcon _icon)
|
protected MindMapNode |
basicCopy()
|
int |
calcShiftY()
|
int |
calcVGap()
|
java.util.Enumeration |
children()
AFAIK there is no way to get an enumeration out of a linked list. |
java.util.ListIterator |
childrenFolded()
|
java.util.ListIterator |
childrenUnfolded()
|
void |
estabilishOwnFont()
|
java.util.Collection |
getActivatedHooks()
|
java.lang.String |
getAdditionalInfo()
|
boolean |
getAllowsChildren()
|
java.awt.Color |
getBackgroundColor()
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
|
int |
getChildCount()
|
int |
getChildPosition(MindMapNode childNode)
|
MindMapCloud |
getCloud()
|
java.awt.Color |
getColor()
The Foreground/Font Color |
MindMapEdge |
getEdge()
|
java.awt.Font |
getFont()
|
java.lang.String |
getFontFamilyName()
|
java.lang.String |
getFontSize()
|
FreeMindMain |
getFrame()
|
int |
getHGap()
|
HistoryInformation |
getHistoryInformation()
|
java.util.List |
getHooks()
|
java.util.List |
getIcons()
Is a vector of MindIcon s |
int |
getIndex(javax.swing.tree.TreeNode node)
|
java.lang.String |
getLink()
|
int |
getNodeLevel()
|
java.lang.String |
getObjectId(ModeController controller)
|
javax.swing.tree.TreeNode |
getParent()
|
MindMapNode |
getParentNode()
|
javax.swing.tree.TreePath |
getPath()
Creates the TreePath recursively |
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()
A Node-Style like MindMapNode.STYLE_FORK or MindMapNode.STYLE_BUBBLE |
java.lang.String |
getText()
|
java.util.Map |
getToolTip()
|
int |
getVGap()
|
NodeView |
getViewer()
|
boolean |
hasChildren()
|
boolean |
hasFoldedStrictDescendant()
True iff one of node's strict descendants is folded. |
void |
insert(javax.swing.tree.MutableTreeNode child,
int index)
|
void |
invokeHook(NodeHook hook)
|
boolean |
isBold()
|
boolean |
isDescendantOf(MindMapNode node)
Returns whether the argument is parent or parent of one of the grandpa's of this node. |
boolean |
isFolded()
|
boolean |
isItalic()
|
boolean |
isLeaf()
|
Tools.BooleanHolder |
isLeft()
|
boolean |
isOneLeftSideOfRoot()
Root is on the right side. |
boolean |
isRoot()
|
boolean |
isUnderlined()
|
void |
remove(int index)
|
void |
remove(javax.swing.tree.MutableTreeNode node)
|
void |
removeFromParent()
|
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 |
setBold(boolean bold)
|
void |
setCloud(MindMapCloud cloud)
|
void |
setColor(java.awt.Color color)
|
void |
setEdge(MindMapEdge edge)
|
void |
setFolded(boolean folded)
|
void |
setFont(java.awt.Font font)
|
void |
setFontSize(int fontSize)
|
void |
setHGap(int gap)
|
void |
setHistoryInformation(HistoryInformation historyInformation)
|
void |
setItalic(boolean italic)
|
void |
setLeft(boolean isLeft)
|
void |
setLink(java.lang.String link)
|
void |
setParent(MindMapNode newParent)
|
void |
setParent(javax.swing.tree.MutableTreeNode newParent)
|
void |
setPreferredChild(MindMapNode node)
|
void |
setShiftY(int shiftY)
|
void |
setStateIcon(java.lang.String key,
javax.swing.ImageIcon icon)
This method must be synchronized as the TreeMap isn't. |
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 string)
|
void |
setUnderlined(boolean underlined)
|
void |
setUserObject(java.lang.Object object)
|
void |
setVGap(int gap)
|
void |
setViewer(NodeView viewer)
|
MindMapNode |
shallowCopy()
|
void |
toggleBold()
|
void |
toggleItalic()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HGAP
public static final int VGAP
protected java.lang.Object userObject
protected java.lang.String style
protected java.util.Vector icons
protected java.util.TreeMap stateIcons
protected MindMapCloud cloud
protected java.awt.Color color
protected java.awt.Color backgroundColor
protected boolean folded
protected java.util.List children
protected java.awt.Font font
protected boolean underlined
protected static java.util.logging.Logger logger
| Constructor Detail |
protected NodeAdapter(FreeMindMain frame)
protected NodeAdapter(java.lang.Object userObject,
FreeMindMain frame)
| Method Detail |
public java.lang.String getText()
getText in interface MindMapNodepublic void setText(java.lang.String text)
setText in interface MindMapNodepublic java.lang.String getLink()
getLink in interface MindMapNodepublic java.lang.String getShortText(ModeController controller)
MindMapNode
getShortText in interface MindMapNodepublic void setLink(java.lang.String link)
setLink in interface MindMapNodepublic FreeMindMain getFrame()
public NodeView getViewer()
getViewer in interface MindMapNodepublic void setViewer(NodeView viewer)
setViewer in interface MindMapNodepublic javax.swing.tree.TreePath getPath()
getPath in interface MindMapNodepublic MindMapEdge getEdge()
getEdge in interface MindMapNodepublic void setEdge(MindMapEdge edge)
public MindMapCloud getCloud()
getCloud in interface MindMapNodepublic void setCloud(MindMapCloud cloud)
setCloud in interface MindMapNodepublic java.lang.String getStyle()
getStyle in interface MindMapNodepublic java.awt.Color getColor()
getColor in interface MindMapNodepublic void setStyle(java.lang.String style)
MindMapNode
setStyle in interface MindMapNodepublic void setColor(java.awt.Color color)
setColor in interface MindMapNodepublic java.awt.Color getBackgroundColor()
getBackgroundColor in interface MindMapNodepublic void setBackgroundColor(java.awt.Color color)
setBackgroundColor in interface MindMapNodepublic void estabilishOwnFont()
public void setBold(boolean bold)
public void toggleBold()
public void setItalic(boolean italic)
public void toggleItalic()
public void setUnderlined(boolean underlined)
public void setFont(java.awt.Font font)
setFont in interface MindMapNodepublic MindMapNode getParentNode()
getParentNode in interface MindMapNodepublic void setFontSize(int fontSize)
setFontSize in interface MindMapNodepublic java.awt.Font getFont()
getFont in interface MindMapNodepublic java.lang.String getFontSize()
getFontSize in interface MindMapNodepublic java.lang.String getFontFamilyName()
getFontFamilyName in interface MindMapNodepublic boolean isBold()
isBold in interface MindMapNodepublic boolean isItalic()
isItalic in interface MindMapNodepublic boolean isUnderlined()
isUnderlined in interface MindMapNodepublic boolean isFolded()
isFolded in interface MindMapNodepublic java.util.List getIcons()
MindMapNode
getIcons in interface MindMapNodepublic void addIcon(MindIcon _icon)
addIcon in interface MindMapNodepublic int removeLastIcon()
removeLastIcon in interface MindMapNodepublic boolean hasFoldedStrictDescendant()
public void setFolded(boolean folded)
setFolded in interface MindMapNodeprotected MindMapNode basicCopy()
public MindMapNode shallowCopy()
shallowCopy in interface MindMapNodepublic java.lang.String toString()
toString in interface MindMapNodepublic boolean isDescendantOf(MindMapNode node)
isDescendantOf in interface MindMapNodepublic boolean isRoot()
isRoot in interface MindMapNodepublic boolean hasChildren()
hasChildren in interface MindMapNodepublic int getChildPosition(MindMapNode childNode)
getChildPosition in interface MindMapNodepublic java.util.ListIterator childrenUnfolded()
childrenUnfolded in interface MindMapNodepublic java.util.ListIterator childrenFolded()
childrenFolded in interface MindMapNodepublic java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt in interface javax.swing.tree.TreeNodepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodepublic int getIndex(javax.swing.tree.TreeNode node)
getIndex in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getParent()
getParent in interface javax.swing.tree.TreeNodepublic boolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodepublic Tools.BooleanHolder isLeft()
isLeft in interface MindMapNodepublic boolean isOneLeftSideOfRoot()
MindMapNode
isOneLeftSideOfRoot in interface MindMapNodepublic void setLeft(boolean isLeft)
setLeft in interface MindMapNode
public void insert(javax.swing.tree.MutableTreeNode child,
int index)
insert in interface javax.swing.tree.MutableTreeNodepublic void remove(int index)
remove in interface javax.swing.tree.MutableTreeNodepublic void remove(javax.swing.tree.MutableTreeNode node)
remove in interface javax.swing.tree.MutableTreeNodepublic MindMapNode getPreferredChild()
getPreferredChild in interface MindMapNodepublic void setPreferredChild(MindMapNode node)
setPreferredChild in interface MindMapNodepublic void removeFromParent()
removeFromParent in interface javax.swing.tree.MutableTreeNodepublic void setParent(javax.swing.tree.MutableTreeNode newParent)
setParent in interface javax.swing.tree.MutableTreeNodepublic void setParent(MindMapNode newParent)
public void setUserObject(java.lang.Object object)
setUserObject in interface javax.swing.tree.MutableTreeNodepublic int getNodeLevel()
getNodeLevel in interface MindMapNodepublic PermanentNodeHook addHook(PermanentNodeHook hook)
MindMapNode
addHook in interface MindMapNodehook -
public void invokeHook(NodeHook hook)
invokeHook in interface MindMapNodepublic java.util.List getHooks()
getHooks in interface MindMapNodepublic java.util.Collection getActivatedHooks()
getActivatedHooks in interface MindMapNodepublic void removeHook(PermanentNodeHook hook)
MindMapNode
removeHook in interface MindMapNodepublic java.util.Map getToolTip()
getToolTip in interface MindMapNode
public void setToolTip(java.lang.String key,
java.lang.String string)
setToolTip in interface MindMapNodestring - public java.lang.String getObjectId(ModeController controller)
getObjectId in interface MindMapNode
public XMLElement save(java.io.Writer writer,
MindMapLinkRegistry registry)
throws java.io.IOException
save in interface MindMapNodejava.io.IOExceptionpublic int getShiftY()
getShiftY in interface MindMapNodepublic int calcShiftY()
calcShiftY in interface MindMapNodepublic void setShiftY(int shiftY)
setShiftY in interface MindMapNodeshiftY - The shiftY to set.public void setAdditionalInfo(java.lang.String info)
MindMapNode
setAdditionalInfo in interface MindMapNodeinfo - public java.lang.String getAdditionalInfo()
getAdditionalInfo in interface MindMapNode
public void setStateIcon(java.lang.String key,
javax.swing.ImageIcon icon)
setStateIcon in interface MindMapNodekey - icon - use null to remove the state icon. Then it is not
required, that the key already exists.public java.util.Map getStateIcons()
MindMapNode
getStateIcons in interface MindMapNodepublic HistoryInformation getHistoryInformation()
getHistoryInformation in interface MindMapNodepublic void setHistoryInformation(HistoryInformation historyInformation)
setHistoryInformation in interface MindMapNodepublic int getHGap()
getHGap in interface MindMapNodepublic void setHGap(int gap)
setHGap in interface MindMapNodepublic int getVGap()
getVGap in interface MindMapNodepublic int calcVGap()
calcVGap in interface MindMapNodepublic void setVGap(int gap)
setVGap in interface MindMapNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||