|
||||||||||
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 MindMapNode
public void setText(java.lang.String text)
setText
in interface MindMapNode
public java.lang.String getLink()
getLink
in interface MindMapNode
public java.lang.String getShortText(ModeController controller)
MindMapNode
getShortText
in interface MindMapNode
public void setLink(java.lang.String link)
setLink
in interface MindMapNode
public FreeMindMain getFrame()
public NodeView getViewer()
getViewer
in interface MindMapNode
public void setViewer(NodeView viewer)
setViewer
in interface MindMapNode
public javax.swing.tree.TreePath getPath()
getPath
in interface MindMapNode
public MindMapEdge getEdge()
getEdge
in interface MindMapNode
public void setEdge(MindMapEdge edge)
public MindMapCloud getCloud()
getCloud
in interface MindMapNode
public void setCloud(MindMapCloud cloud)
setCloud
in interface MindMapNode
public java.lang.String getStyle()
getStyle
in interface MindMapNode
public java.awt.Color getColor()
getColor
in interface MindMapNode
public void setStyle(java.lang.String style)
MindMapNode
setStyle
in interface MindMapNode
public void setColor(java.awt.Color color)
setColor
in interface MindMapNode
public java.awt.Color getBackgroundColor()
getBackgroundColor
in interface MindMapNode
public void setBackgroundColor(java.awt.Color color)
setBackgroundColor
in interface MindMapNode
public 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 MindMapNode
public MindMapNode getParentNode()
getParentNode
in interface MindMapNode
public void setFontSize(int fontSize)
setFontSize
in interface MindMapNode
public java.awt.Font getFont()
getFont
in interface MindMapNode
public java.lang.String getFontSize()
getFontSize
in interface MindMapNode
public java.lang.String getFontFamilyName()
getFontFamilyName
in interface MindMapNode
public boolean isBold()
isBold
in interface MindMapNode
public boolean isItalic()
isItalic
in interface MindMapNode
public boolean isUnderlined()
isUnderlined
in interface MindMapNode
public boolean isFolded()
isFolded
in interface MindMapNode
public java.util.List getIcons()
MindMapNode
getIcons
in interface MindMapNode
public void addIcon(MindIcon _icon)
addIcon
in interface MindMapNode
public int removeLastIcon()
removeLastIcon
in interface MindMapNode
public boolean hasFoldedStrictDescendant()
public void setFolded(boolean folded)
setFolded
in interface MindMapNode
protected MindMapNode basicCopy()
public MindMapNode shallowCopy()
shallowCopy
in interface MindMapNode
public java.lang.String toString()
toString
in interface MindMapNode
public boolean isDescendantOf(MindMapNode node)
isDescendantOf
in interface MindMapNode
public boolean isRoot()
isRoot
in interface MindMapNode
public boolean hasChildren()
hasChildren
in interface MindMapNode
public int getChildPosition(MindMapNode childNode)
getChildPosition
in interface MindMapNode
public java.util.ListIterator childrenUnfolded()
childrenUnfolded
in interface MindMapNode
public java.util.ListIterator childrenFolded()
childrenFolded
in interface MindMapNode
public java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode node)
getIndex
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getParent()
getParent
in interface javax.swing.tree.TreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
public Tools.BooleanHolder isLeft()
isLeft
in interface MindMapNode
public boolean isOneLeftSideOfRoot()
MindMapNode
isOneLeftSideOfRoot
in interface MindMapNode
public void setLeft(boolean isLeft)
setLeft
in interface MindMapNode
public void insert(javax.swing.tree.MutableTreeNode child, int index)
insert
in interface javax.swing.tree.MutableTreeNode
public void remove(int index)
remove
in interface javax.swing.tree.MutableTreeNode
public void remove(javax.swing.tree.MutableTreeNode node)
remove
in interface javax.swing.tree.MutableTreeNode
public MindMapNode getPreferredChild()
getPreferredChild
in interface MindMapNode
public void setPreferredChild(MindMapNode node)
setPreferredChild
in interface MindMapNode
public void removeFromParent()
removeFromParent
in interface javax.swing.tree.MutableTreeNode
public void setParent(javax.swing.tree.MutableTreeNode newParent)
setParent
in interface javax.swing.tree.MutableTreeNode
public void setParent(MindMapNode newParent)
public void setUserObject(java.lang.Object object)
setUserObject
in interface javax.swing.tree.MutableTreeNode
public int getNodeLevel()
getNodeLevel
in interface MindMapNode
public PermanentNodeHook addHook(PermanentNodeHook hook)
MindMapNode
addHook
in interface MindMapNode
hook
-
public void invokeHook(NodeHook hook)
invokeHook
in interface MindMapNode
public java.util.List getHooks()
getHooks
in interface MindMapNode
public java.util.Collection getActivatedHooks()
getActivatedHooks
in interface MindMapNode
public void removeHook(PermanentNodeHook hook)
MindMapNode
removeHook
in interface MindMapNode
public java.util.Map getToolTip()
getToolTip
in interface MindMapNode
public void setToolTip(java.lang.String key, java.lang.String string)
setToolTip
in interface MindMapNode
string
- 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 MindMapNode
java.io.IOException
public int getShiftY()
getShiftY
in interface MindMapNode
public int calcShiftY()
calcShiftY
in interface MindMapNode
public void setShiftY(int shiftY)
setShiftY
in interface MindMapNode
shiftY
- The shiftY to set.public void setAdditionalInfo(java.lang.String info)
MindMapNode
setAdditionalInfo
in interface MindMapNode
info
- public java.lang.String getAdditionalInfo()
getAdditionalInfo
in interface MindMapNode
public void setStateIcon(java.lang.String key, javax.swing.ImageIcon icon)
setStateIcon
in interface MindMapNode
key
- 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 MindMapNode
public HistoryInformation getHistoryInformation()
getHistoryInformation
in interface MindMapNode
public void setHistoryInformation(HistoryInformation historyInformation)
setHistoryInformation
in interface MindMapNode
public int getHGap()
getHGap
in interface MindMapNode
public void setHGap(int gap)
setHGap
in interface MindMapNode
public int getVGap()
getVGap
in interface MindMapNode
public int calcVGap()
calcVGap
in interface MindMapNode
public void setVGap(int gap)
setVGap
in interface MindMapNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |