freemind.modes
public abstract class MapAdapter extends Object implements MindMap
Field Summary | |
---|---|
protected int | changesPerformedSinceLastSave denotes the amount of changes since the last save. |
protected boolean | readOnly |
Constructor Summary | |
---|---|
MapAdapter(FreeMindMain frame) |
Method Summary | |
---|---|
void | addTreeModelListener(TreeModelListener l) |
void | applyPattern(NodeAdapter node, StylePattern pattern) |
protected void | applyPattern(NodeAdapter node, StylePattern pattern, boolean visible) |
void | changeNode(MindMapNode node, String newText) |
Transferable | copy(MindMapNode node) |
Transferable | copy() |
Transferable | copySingle() |
Transferable | cut(MindMapNode node) |
Transferable | cut() |
void | destroy() |
void | displayNode(MindMapNode node, ArrayList NodesUnfoldedByDisplay) |
boolean | find(MindMapNode node, String what, boolean caseSensitive) |
boolean | findNext() |
String | getAsPlainText(List mindMapNodes) |
String | getAsRTF(List mindMapNodes) |
Color | getBackgroundColor() |
Object | getChild(Object parent, int index) |
int | getChildCount(Object parent) |
File | getFile()
Change this to always return null if your model doesn't support files. |
String | getFindFromText() |
String | getFindWhat() |
FreeMindMain | getFrame() |
int | getIndexOfChild(Object parent, Object child) |
String | getLink(NodeAdapter node) |
MindMapLinkRegistry | getLinkRegistry() |
protected int | getNumberOfChangesSinceLastSave() |
Object[] | getPathToRoot(TreeNode node) |
String | getRestoreable() |
Object | getRoot() |
protected String | getText(String textId) |
URL | getURL()
Return URL of the map (whether as local file or a web location) |
void | insertNodeInto(MindMapNode newChild, MindMapNode parent) |
void | insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
Use this method to add children because it will cause the appropriate event. |
void | insertNodeIntoNoEvent(MindMapNode newChild, MindMapNode parent) |
void | insertNodeIntoNoEvent(MindMapNode newChild, MindMapNode parent, boolean asSibling) |
boolean | isLeaf(Object node) |
boolean | isReadOnly() |
boolean | isSaved() |
abstract void | load(File file) |
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. |
protected void | nodeChanged(TreeNode node)
Invoke this method after you've changed how node is to be
represented in the tree. |
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. |
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. |
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. |
protected void | nodeStructureChanged(TreeNode node)
Invoke this method if you've totally changed the children of
node and its childrens children... |
void | paste(Transferable t, MindMapNode parent) |
void | paste(Transferable t, MindMapNode target, boolean asSibling, boolean isLeft) |
void | paste(MindMapNode node, MindMapNode parent) |
protected void | reload(TreeNode node)
Invoke this method if you've modified the TreeNodes upon which this
model depends. |
void | removeNodeFromParent(MutableTreeNode node)
Joerg: Message this to remove node from its parent. |
void | removeNodeFromParent(MutableTreeNode node, boolean notify) |
void | removeTreeModelListener(TreeModelListener l) |
abstract boolean | save(File file) |
void | setBackgroundColor(Color backgroundColor) |
protected void | setFile(File file) |
void | setFolded(MindMapNode node, boolean folded) |
void | setLink(NodeAdapter node, String link) |
protected void | setRoot(MindMapNode root) |
protected void | setSaved(boolean saved) |
void | splitNode(MindMapNode node, int caretPosition, String newText) |
String | tryToLock(File file)
Attempts to lock the map using semaphore file. |
void | valueForPathChanged(TreePath path, Object newValue) |
Returns: returns the new index.
node
(PENDING).Parameters: file
Returns: If the map is locked, return the name of the locking user, return null otherwise.
Throws: Exception