public abstract class NodeAdapter extends java.lang.Object implements MindMapNode
Modifier and Type | Field and Description |
---|---|
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 |
NODE_STYLES, STYLE_AS_PARENT, STYLE_BUBBLE, STYLE_COMBINED, STYLE_FORK
Modifier | Constructor and Description |
---|---|
protected |
NodeAdapter(FreeMindMain frame,
MindMap map) |
protected |
NodeAdapter(java.lang.Object userObject,
FreeMindMain frame,
MindMap map) |
Modifier and Type | Method and Description |
---|---|
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() |
static java.lang.String |
convertToEncodedContent(java.lang.String xmlText2) |
void |
createAttributeTableModel() |
void |
establishOwnFont() |
java.util.Collection |
getActivatedHooks()
After activation, this method returns the hooks of this node.
|
java.lang.String |
getAdditionalInfo()
Is only used to store encrypted content of an encrypted mind map node.
|
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()
After a map creation, all hooks are present via this method, but still
not activated.
|
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 |
hasExactlyOneVisibleChild() |
boolean |
hasFoldedParents() |
boolean |
hasFoldedStrictDescendant()
True iff one of node's strict descendants is folded.
|
boolean |
hasStyle() |
boolean |
hasVisibleChilds() |
void |
insert(javax.swing.tree.MutableTreeNode child,
int index) |
void |
invokeHook(NodeHook hook) |
boolean |
isBold() |
boolean |
isDescendantOf(MindMapNode pParentNode)
Returns whether the argument is parent or parent of one of the grandpa's
of this node.
|
boolean |
isDescendantOfOrEqual(MindMapNode pParentNode)
If the test node is identical or in the same family and elder as the
object. node.isChild..
|
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 |
removeAllHooks()
Removes all hooks from this 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() |
java.util.ListIterator |
sortedChildrenUnfolded() |
void |
toggleBold() |
void |
toggleItalic() |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isWriteable
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
protected NodeAdapter(FreeMindMain frame, MindMap map)
protected NodeAdapter(java.lang.Object userObject, FreeMindMain frame, MindMap map)
public void setMap(MindMap map)
public java.lang.String getText()
getText
in interface MindMapNode
public final void setText(java.lang.String text)
MindMapNode
setText
in interface MindMapNode
public final java.lang.String getXmlText()
getXmlText
in interface MindMapNode
public final void setXmlText(java.lang.String pXmlText)
MindMapNode
setXmlText
in interface MindMapNode
public final java.lang.String getXmlNoteText()
getXmlNoteText
in interface MindMapNode
public final java.lang.String getNoteText()
getNoteText
in interface MindMapNode
public final void setXmlNoteText(java.lang.String pXmlNoteText)
MindMapNode
setXmlNoteText
in interface MindMapNode
public final void setNoteText(java.lang.String pNoteText)
MindMapNode
setNoteText
in interface MindMapNode
public java.lang.String getPlainTextContent()
getPlainTextContent
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 FilterInfo getFilterInfo()
getFilterInfo
in interface MindMapNode
public FreeMindMain getFrame()
public java.util.Collection getViewers()
getViewers
in interface MindMapNode
public void addViewer(NodeView viewer)
addViewer
in interface MindMapNode
public void removeViewer(NodeView viewer)
removeViewer
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 boolean hasStyle()
hasStyle
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 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 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 MindMap getMap()
getMap
in interface MindMapNode
public void addIcon(MindIcon _icon, int position)
addIcon
in interface MindMapNode
public int removeIcon(int position)
removeIcon
in interface MindMapNode
public boolean hasFoldedStrictDescendant()
public boolean hasFoldedParents()
hasFoldedParents
in interface MindMapNode
public void setFolded(boolean folded)
setFolded
in interface MindMapNode
public MindMapNode shallowCopy()
shallowCopy
in interface MindMapNode
public java.lang.String toString()
toString
in interface MindMapNode
toString
in class java.lang.Object
public boolean isDescendantOf(MindMapNode pParentNode)
MindMapNode
isDescendantOf
in interface MindMapNode
public boolean isRoot()
isRoot
in interface MindMapNode
public boolean isDescendantOfOrEqual(MindMapNode pParentNode)
MindMapNode
isDescendantOfOrEqual
in interface MindMapNode
isDecendantOf
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 sortedChildrenUnfolded()
sortedChildrenUnfolded
in interface MindMapNode
public java.util.ListIterator childrenFolded()
childrenFolded
in interface MindMapNode
public java.util.List getChildren()
getChildren
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 boolean isLeft()
isLeft
in interface MindMapNode
public void setLeft(boolean isLeft)
setLeft
in interface MindMapNode
public boolean isNewChildLeft()
isNewChildLeft
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 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
public void invokeHook(NodeHook hook)
invokeHook
in interface MindMapNode
public java.util.List getHooks()
MindMapNode
getHooks
in interface MindMapNode
public java.util.Collection getActivatedHooks()
MindMapNode
getActivatedHooks
in interface MindMapNode
public void removeHook(PermanentNodeHook hook)
MindMapNode
removeHook
in interface MindMapNode
public void removeAllHooks()
MindMapNode
removeAllHooks
in interface MindMapNode
public java.util.SortedMap getToolTip()
getToolTip
in interface MindMapNode
public void setToolTip(java.lang.String key, java.lang.String string)
setToolTip
in interface MindMapNode
public 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 MindMapNode
saveInvisible
- 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.IOException
public static java.lang.String convertToEncodedContent(java.lang.String xmlText2)
public ModeController getModeController()
public int getShiftY()
getShiftY
in interface MindMapNode
public boolean hasExactlyOneVisibleChild()
hasExactlyOneVisibleChild
in interface MindMapNode
public boolean hasVisibleChilds()
hasVisibleChilds
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
public java.lang.String getAdditionalInfo()
MindMapNode
getAdditionalInfo
in interface MindMapNode
MindMapNode.setAdditionalInfo(String)
public void setStateIcon(java.lang.String key, javax.swing.ImageIcon icon)
setStateIcon
in interface MindMapNode
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 void setVGap(int gap)
setVGap
in interface MindMapNode
public boolean isVisible()
isVisible
in interface MindMapNode
public NodeAttributeTableModel getAttributes()
MindMapNode
getAttributes
in interface MindMapNode
public void createAttributeTableModel()
createAttributeTableModel
in interface MindMapNode
public int getAttributeTableLength()
getAttributeTableLength
in interface MindMapNode
public Attribute getAttribute(int pPosition)
getAttribute
in interface MindMapNode
pPosition
- the null based position.public java.util.List getAttributeKeyList()
getAttributeKeyList
in interface MindMapNode
public int getAttributePosition(java.lang.String pKey)
getAttributePosition
in interface MindMapNode
pKey
- the name of the attributepublic java.lang.String getAttribute(java.lang.String pKey)
MindMapNode
getAttribute
in interface MindMapNode
pKey
- is the name of the attributepublic void setAttribute(int pPosition, Attribute pAttribute)
MindMapNode
setAttribute
in interface MindMapNode
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface MindMapNode
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface MindMapNode
public javax.swing.event.EventListenerList getListeners()
getListeners
in interface MindMapNode
public void acceptViewVisitor(NodeViewVisitor visitor)
acceptViewVisitor
in interface MindMapNode