addTreeModelListener
public void addTreeModelListener(TreeModelListener l)
copy
public Transferable copy()
- copy in interface MindMap
cut
public final Transferable cut()
- cut in interface MindMap
getAsRTF
public String getAsRTF(List mindMapNodes)
- getAsRTF in interface MindMap
getChild
public Object getChild(Object parent,
int index)
getChildCount
public int getChildCount(Object parent)
getFile
public File getFile()
Change this to always return null if your model doesn't support files.
- getFile in interface MindMap
getIndexOfChild
public int getIndexOfChild(Object parent,
Object child)
getNumberOfChangesSinceLastSave
protected int getNumberOfChangesSinceLastSave()
getRoot
public Object getRoot()
getText
protected String getText(String textId)
getURL
public URL getURL()
throws MalformedURLException
Return URL of the map (whether as local file or a web location)
- getURL in interface MindMap
insertNodeInto
public void insertNodeInto(MutableTreeNode newChild,
MutableTreeNode parent,
int index)
Use this method to add children because it will cause the appropriate event.
insertNodeIntoNoEvent
public void insertNodeIntoNoEvent(MindMapNode newChild,
MindMapNode parent,
boolean asSibling)
isLeaf
public boolean isLeaf(Object node)
isSaved
public boolean isSaved()
load
public abstract void load(File file)
throws FileNotFoundException,
IOException,
XMLParseException
moveNodeTo
public int moveNodeTo(MindMapNode newChild,
MindMapNode parent,
int index,
int direction)
The direction is used if side left and right are present. then the next suitable place on the same side#
is searched. if there is no such place, then the side is changed.
nodeChanged
protected void nodeChanged(TreeNode node)
Invoke this method after you've changed how node is to be
represented in the tree.
nodeStructureChanged
protected void nodeStructureChanged(TreeNode node)
Invoke this method if you've totally changed the children of
node and its childrens children... This will post a
treeStructureChanged event.
nodesChanged
protected void nodesChanged(TreeNode node,
int[] childIndices)
Invoke this method after you've changed how the children identified by
childIndicies are to be represented in the tree.
nodesWereInserted
protected void nodesWereInserted(TreeNode node,
int[] childIndices)
Invoke this method after you've inserted some TreeNodes into
node. childIndices should be the index of the new elements and
must be sorted in ascending order.
nodesWereRemoved
protected void nodesWereRemoved(TreeNode parent,
int[] childIndices,
Object[] removedChildren)
Invoke this method after you've removed some TreeNodes from
node. childIndices should be the index of the removed elements and
must be sorted in ascending order. And removedChildren should be
the array of the children objects that were removed.
paste
public void paste(Transferable t,
MindMapNode target,
boolean asSibling,
boolean isLeft)
- paste in interface MindMap
reload
protected void reload(TreeNode node)
Invoke this method if you've modified the TreeNodes upon which this
model depends. The model will notify all of its listeners that the
model has changed below the node node
(PENDING).
removeNodeFromParent
public void removeNodeFromParent(MutableTreeNode node)
Joerg: Message this to remove node from its parent. This will message
nodesWereRemoved to create the appropriate event. This is the
preferred way to remove a node as it handles the event creation
for you.
removeNodeFromParent
public void removeNodeFromParent(MutableTreeNode node,
boolean notify)
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener l)
save
public abstract boolean save(File file)
setFile
protected void setFile(File file)
setLink
public void setLink(NodeAdapter node,
String link)
setSaved
protected void setSaved(boolean saved)
tryToLock
public String tryToLock(File file)
throws Exception
Attempts to lock the map using semaphore file.
- If the map is locked, return the name of the locking user, return null
otherwise.
valueForPathChanged
public void valueForPathChanged(TreePath path,
Object newValue)