|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemind.modes.NodeAdapter
public abstract class 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. |
static int |
LEFT_POSITION
|
protected static java.util.logging.Logger |
logger
|
static int |
RIGHT_POSITION
|
protected java.util.TreeMap |
stateIcons
|
protected java.lang.String |
style
|
protected boolean |
underlined
|
static int |
UNKNOWN_POSITION
|
protected java.lang.Object |
userObject
|
static int |
VGAP
|
| Fields inherited from interface freemind.modes.MindMapNode |
|---|
NODE_STYLES, STYLE_AS_PARENT, STYLE_BUBBLE, STYLE_COMBINED, STYLE_FORK |
| Constructor Summary | |
|---|---|
protected |
NodeAdapter(FreeMindMain frame,
MindMap map)
|
protected |
NodeAdapter(java.lang.Object userObject,
FreeMindMain frame,
MindMap map)
|
| Method Summary | |
|---|---|
void |
acceptViewVisitor(NodeViewVisitor visitor)
|
PermanentNodeHook |
addHook(PermanentNodeHook hook)
Adds the hook to the list of hooks to my node. |
void |
addIcon(MindIcon _icon,
int position)
|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
addViewer(NodeView viewer)
|
int |
calcShiftY()
|
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 |
createAttributeTableModel()
|
void |
establishOwnFont()
|
java.util.Collection |
getActivatedHooks()
|
java.lang.String |
getAdditionalInfo()
|
boolean |
getAllowsChildren()
|
Attribute |
getAttribute(int pPosition)
|
java.lang.String |
getAttribute(java.lang.String pKey)
Searches for the first attribute with the given key. |
java.util.List |
getAttributeKeyList()
|
int |
getAttributePosition(java.lang.String pKey)
|
NodeAttributeTableModel |
getAttributes()
use getAttributeKeyList, getAttribute, isAttributeExisting and setAttribute instead, if you want to access the attributes like a dictionary. |
int |
getAttributeTableLength()
|
java.awt.Color |
getBackgroundColor()
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
|
int |
getChildCount()
|
int |
getChildPosition(MindMapNode childNode)
|
java.util.List |
getChildren()
|
MindMapCloud |
getCloud()
|
java.awt.Color |
getColor()
The Foreground/Font Color |
MindMapEdge |
getEdge()
|
FilterInfo |
getFilterInfo()
|
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()
|
javax.swing.event.EventListenerList |
getListeners()
|
MindMap |
getMap()
|
ModeController |
getModeController()
|
int |
getNodeLevel()
|
java.lang.String |
getNoteText()
|
java.lang.String |
getObjectId(ModeController controller)
|
javax.swing.tree.TreeNode |
getParent()
|
MindMapNode |
getParentNode()
|
javax.swing.tree.TreePath |
getPath()
Creates the TreePath recursively |
java.lang.String |
getPlainTextContent()
|
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.SortedMap |
getToolTip()
|
int |
getVGap()
|
java.util.Collection |
getViewers()
|
java.lang.String |
getXmlNoteText()
|
java.lang.String |
getXmlText()
|
boolean |
hasChildren()
|
boolean |
hasFoldedStrictDescendant()
True iff one of node's strict descendants is folded. |
boolean |
hasOneVisibleChild()
|
boolean |
hasStyle()
|
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()
|
boolean |
isLeft()
|
boolean |
isNewChildLeft()
|
boolean |
isRoot()
|
boolean |
isUnderlined()
|
boolean |
isVisible()
|
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 |
removeIcon(int position)
|
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
removeViewer(NodeView viewer)
|
XMLElement |
save(java.io.Writer writer,
MindMapLinkRegistry registry,
boolean saveInvisible,
boolean saveChildren)
|
void |
setAdditionalInfo(java.lang.String info)
This method can be used to store non-visual additions to a node. |
void |
setAttribute(int pPosition,
Attribute pAttribute)
Sets the attribute to the given value. |
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 |
setMap(MindMap map)
|
void |
setNoteText(java.lang.String pNoteText)
Sets both noteText and xmlNoteText. |
void |
setParent(MindMapNode newParent)
|
void |
setParent(javax.swing.tree.MutableTreeNode newParent)
|
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)
Sets both text and xmlText. |
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 |
setXmlNoteText(java.lang.String pXmlNoteText)
Sets both noteText and xmlNoteText. |
void |
setXmlText(java.lang.String pXmlText)
Sets both text and xmlText. |
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 |
| Methods inherited from interface freemind.modes.MindMapNode |
|---|
isWriteable |
| Field Detail |
|---|
public static final int HGAP
public static final int VGAP
public static final int LEFT_POSITION
public static final int RIGHT_POSITION
public static final int UNKNOWN_POSITION
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,
MindMap map)
protected NodeAdapter(java.lang.Object userObject,
FreeMindMain frame,
MindMap map)
| Method Detail |
|---|
public void setMap(MindMap map)
public java.lang.String getText()
getText in interface MindMapNodepublic final void setText(java.lang.String text)
MindMapNode
setText in interface MindMapNodepublic final java.lang.String getXmlText()
getXmlText in interface MindMapNodepublic final void setXmlText(java.lang.String pXmlText)
MindMapNode
setXmlText in interface MindMapNodepublic final java.lang.String getXmlNoteText()
getXmlNoteText in interface MindMapNodepublic final java.lang.String getNoteText()
getNoteText in interface MindMapNodepublic final void setXmlNoteText(java.lang.String pXmlNoteText)
MindMapNode
setXmlNoteText in interface MindMapNodepublic final void setNoteText(java.lang.String pNoteText)
MindMapNode
setNoteText in interface MindMapNodepublic java.lang.String getPlainTextContent()
getPlainTextContent 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 FilterInfo getFilterInfo()
getFilterInfo in interface MindMapNodepublic FreeMindMain getFrame()
public java.util.Collection getViewers()
getViewers in interface MindMapNodepublic void addViewer(NodeView viewer)
addViewer in interface MindMapNodepublic void removeViewer(NodeView viewer)
removeViewer 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 boolean hasStyle()
hasStyle 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 establishOwnFont()
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 MindMap getMap()
getMap in interface MindMapNode
public void addIcon(MindIcon _icon,
int position)
addIcon in interface MindMapNodepublic int removeIcon(int position)
removeIcon in interface MindMapNodepublic boolean hasFoldedStrictDescendant()
public void setFolded(boolean folded)
setFolded in interface MindMapNodepublic MindMapNode shallowCopy()
shallowCopy in interface MindMapNodepublic java.lang.String toString()
toString in interface MindMapNodetoString in class java.lang.Objectpublic 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.List getChildren()
getChildren 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 boolean isLeft()
isLeft in interface MindMapNodepublic void setLeft(boolean isLeft)
setLeft in interface MindMapNodepublic boolean isNewChildLeft()
isNewChildLeft 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 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 MindMapNodepublic 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.SortedMap getToolTip()
getToolTip in interface MindMapNode
public void setToolTip(java.lang.String key,
java.lang.String string)
setToolTip in interface MindMapNodepublic java.lang.String getObjectId(ModeController controller)
getObjectId in interface MindMapNode
public XMLElement save(java.io.Writer writer,
MindMapLinkRegistry registry,
boolean saveInvisible,
boolean saveChildren)
throws java.io.IOException
save in interface MindMapNodesaveInvisible - TODO: Seems not to be used. Remove or fill with live.saveChildren - if true, the save recurses to all of the nodes children.
java.io.IOExceptionpublic ModeController getModeController()
public int getShiftY()
getShiftY in interface MindMapNodepublic boolean hasOneVisibleChild()
hasOneVisibleChild 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 MindMapNodepublic java.lang.String getAdditionalInfo()
getAdditionalInfo in interface MindMapNode
public void setStateIcon(java.lang.String key,
javax.swing.ImageIcon icon)
setStateIcon in interface MindMapNodeicon - 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 void setVGap(int gap)
setVGap in interface MindMapNodepublic boolean isVisible()
isVisible in interface MindMapNodepublic NodeAttributeTableModel getAttributes()
MindMapNode
getAttributes in interface MindMapNodepublic void createAttributeTableModel()
createAttributeTableModel in interface MindMapNodepublic int getAttributeTableLength()
getAttributeTableLength in interface MindMapNodepublic Attribute getAttribute(int pPosition)
getAttribute in interface MindMapNodepPosition - the null based position.
public java.util.List getAttributeKeyList()
getAttributeKeyList in interface MindMapNodepublic int getAttributePosition(java.lang.String pKey)
getAttributePosition in interface MindMapNodepKey - the name of the attribute
public java.lang.String getAttribute(java.lang.String pKey)
MindMapNode
getAttribute in interface MindMapNodepKey - is the name of the attribute
public void setAttribute(int pPosition,
Attribute pAttribute)
MindMapNode
setAttribute in interface MindMapNodepublic void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener in interface MindMapNodepublic void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener in interface MindMapNodepublic javax.swing.event.EventListenerList getListeners()
getListeners in interface MindMapNodepublic void acceptViewVisitor(NodeViewVisitor visitor)
acceptViewVisitor in interface MindMapNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||