Package org.freeplane.api
Interface Link
- All Superinterfaces:
- LinkRO
- All Known Subinterfaces:
- Proxy.Link
Node's link: 
node.link - read-write.
 To set links use the attributes of the Link and LinkRO object:
 
 // a normal href
 node.link.text = 'http://www.google.com'
 // create a link to the parent node
 node.link.node = node.parent
 // if you have a URI object
 node.link.uri = new URI('http://www.google.com')
 // file
 node.link.file = map.file
 - 
Method SummaryModifier and TypeMethodDescriptionbooleanremove()removes the link.booleanDeprecated.voidsets target to file.voidtarget is a node of the same map.voidtarget is a stringified URI.voidsets target to uri.
- 
Method Details- 
setTexttarget is a stringified URI. Removes any link if uri is null. To get a local link (i.e. to another node) target should be: "#" + nodeId or better use setNode(Node).- Throws:
- IllegalArgumentException- if target is not convertible into a- URI.
- Since:
- 1.2
 
- 
setUrisets target to uri. Removes any link if uri is null.- Since:
- 1.2
 
- 
setFilesets target to file. Removes any link if file is null.- Since:
- 1.2
 
- 
setNodetarget is a node of the same map. Shortcut for setTarget("#" + node.nodeId) Removes any link if node is null.- Throws:
- IllegalArgumentException- if node belongs to another map.
- Since:
- 1.2
 
- 
setDeprecated.since 1.2 - usesetText(String)instead.- Returns:
- true if target could be converted to an URI and false otherwise.
 
- 
removeboolean remove()removes the link. Same asnode.link.text = null.- Returns:
- trueif there was a link to remove.
- Since:
- 1.4
 
 
- 
setText(String)instead.