|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemind.modes.LinkRegistryAdapter
public class LinkRegistryAdapter
Interface for the registry, which manages the ids of nodes and the existing links in a map. Thus, this interface is bound to a map model, because other maps have a different registry.
Nested Class Summary | |
---|---|
static interface |
LinkRegistryAdapter.ID_BasicState
State parent interface. |
class |
LinkRegistryAdapter.ID_BasicStateAdapter
State parent interface. |
static interface |
LinkRegistryAdapter.ID_Blank
This state interface expresses the state that a node is blank (i.e. without an id, normal state). |
class |
LinkRegistryAdapter.ID_BlankAdapter
This state interface expresses the state that a node is blank (i.e. without an id, normal state). |
static interface |
LinkRegistryAdapter.ID_Registered
This state interface expresses the state that a node has an ID. |
protected class |
LinkRegistryAdapter.ID_RegisteredAdapter
This state interface expresses the state that a node has an ID. |
static interface |
LinkRegistryAdapter.ID_UsedState
This state interface expresses the state that a node has an ID, but is abstract. |
protected class |
LinkRegistryAdapter.ID_UsedStateAdapter
This state interface expresses the state that a node has an ID, but is abstract. |
Field Summary | |
---|---|
protected java.util.HashMap |
IDToCutLinks
|
protected java.util.HashMap |
IDToLink
|
protected java.util.HashMap |
IDToLinks
|
protected java.util.HashMap |
IDToTarget
|
protected java.util.HashSet |
mLocallyLinkedIDs
|
protected static java.util.Random |
ran
|
protected java.util.HashMap |
TargetToID
|
Constructor Summary | |
---|---|
LinkRegistryAdapter()
|
Method Summary | |
---|---|
LinkRegistryAdapter.ID_Registered |
_registerLinkTarget(MindMapNode target)
The main method. |
LinkRegistryAdapter.ID_Registered |
_registerLinkTarget(MindMapNode target,
java.lang.String proposedID)
|
void |
clearCuttedNodeBuffer()
Clears the set of recent cutted nodes. |
void |
cutNode(MindMapNode target)
Removes links to all nodes beginning from target with its children. |
void |
deregisterLink(MindMapLink link)
|
void |
deregisterLinkTarget(MindMapNode target)
If there are still targets registered, they are removed, too. |
java.lang.String |
generateUniqueID(java.lang.String proposedID)
This can be used, if the id has to be known, before a node can be labled. |
java.lang.String |
generateUniqueLinkID(java.lang.String proposedID)
This can be used, if the id has to be known, before a link can be labled. |
java.util.Vector |
getAllLinks(MindMapNode node)
|
java.util.Vector |
getAllLinksFromMe(MindMapNode source)
|
java.util.Vector |
getAllLinksIntoMe(MindMapNode target)
|
java.util.Vector |
getAllSources(MindMapNode target)
Returns a Vector of Nodes that point to the given target node. |
java.util.Vector |
getCuttedNode(java.lang.String oldTargetID)
|
java.lang.String |
getLabel(MindMapNode target)
|
MindMapLink |
getLinkForID(java.lang.String ID)
Reverses the getUniqueID method: searches for a link with the id given as the argument. |
LinkRegistryAdapter.ID_BasicState |
getState(MindMapNode node)
|
MindMapNode |
getTargetForID(java.lang.String ID)
Reverses the getLabel method: searches for a node with the id given as the argument. |
boolean |
isTargetOfLocalHyperlinks(java.lang.String pTargetId)
|
void |
registerLink(MindMapLink link)
Method to keep track of the sources associated to a target node. |
void |
registerLinkTarget(MindMapNode pTarget)
|
java.lang.String |
registerLinkTarget(MindMapNode pTarget,
java.lang.String pProposedID)
The second variant of the main method. |
void |
registerLocalHyperlinkId(java.lang.String pTargetId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap TargetToID
protected java.util.HashMap IDToTarget
protected java.util.HashMap IDToLinks
protected java.util.HashMap IDToCutLinks
protected java.util.HashMap IDToLink
protected java.util.HashSet mLocallyLinkedIDs
protected static java.util.Random ran
Constructor Detail |
---|
public LinkRegistryAdapter()
Method Detail |
---|
public java.lang.String generateUniqueID(java.lang.String proposedID)
MindMapLinkRegistry
generateUniqueID
in interface MindMapLinkRegistry
public java.lang.String generateUniqueLinkID(java.lang.String proposedID)
MindMapLinkRegistry
generateUniqueLinkID
in interface MindMapLinkRegistry
public void registerLinkTarget(MindMapNode pTarget)
registerLinkTarget
in interface MindMapLinkRegistry
public java.lang.String registerLinkTarget(MindMapNode pTarget, java.lang.String pProposedID)
MindMapLinkRegistry
registerLinkTarget
in interface MindMapLinkRegistry
public LinkRegistryAdapter.ID_Registered _registerLinkTarget(MindMapNode target)
public LinkRegistryAdapter.ID_Registered _registerLinkTarget(MindMapNode target, java.lang.String proposedID)
public LinkRegistryAdapter.ID_BasicState getState(MindMapNode node)
public MindMapNode getTargetForID(java.lang.String ID)
MindMapLinkRegistry
getTargetForID
in interface MindMapLinkRegistry
public void deregisterLinkTarget(MindMapNode target) throws java.lang.IllegalArgumentException
deregisterLinkTarget
in interface MindMapLinkRegistry
java.lang.IllegalArgumentException
public void registerLink(MindMapLink link) throws java.lang.IllegalArgumentException
registerLink
in interface MindMapLinkRegistry
java.lang.IllegalArgumentException
public void deregisterLink(MindMapLink link)
deregisterLink
in interface MindMapLinkRegistry
public MindMapLink getLinkForID(java.lang.String ID)
MindMapLinkRegistry
getLinkForID
in interface MindMapLinkRegistry
public java.util.Vector getAllSources(MindMapNode target)
public java.util.Vector getAllLinks(MindMapNode node)
getAllLinks
in interface MindMapLinkRegistry
public java.util.Vector getAllLinksIntoMe(MindMapNode target)
getAllLinksIntoMe
in interface MindMapLinkRegistry
public java.util.Vector getAllLinksFromMe(MindMapNode source)
getAllLinksFromMe
in interface MindMapLinkRegistry
public java.lang.String getLabel(MindMapNode target)
getLabel
in interface MindMapLinkRegistry
public void cutNode(MindMapNode target)
MindMapLinkRegistry
cutNode
in interface MindMapLinkRegistry
public void clearCuttedNodeBuffer()
clearCuttedNodeBuffer
in interface MindMapLinkRegistry
public java.util.Vector getCuttedNode(java.lang.String oldTargetID)
getCuttedNode
in interface MindMapLinkRegistry
public void registerLocalHyperlinkId(java.lang.String pTargetId)
registerLocalHyperlinkId
in interface MindMapLinkRegistry
public boolean isTargetOfLocalHyperlinks(java.lang.String pTargetId)
isTargetOfLocalHyperlinks
in interface MindMapLinkRegistry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |