|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LinkManager
This interface must be implemented by plugins that wish to add new links types between any NodeContainer. When user drags a new link between two nodes, all LinkManager plugins are called (method canLink) until one can perform linking. Then, createLink method is called. Then link must be created, and its mgrId attribute must be correctly set to current LinkManager plugin ID. When user wants to delete a selected link, deleteLink is called. Serialization and unserialization of link is performed by associated LinkManager. Its goal is to save / restore all specific properties or objects stored in that link.
com.alveole.studio.linkmanager.
Method Summary | |
---|---|
boolean |
canLink(ProjectContext context,
NodeContainer node1,
NodeContainer node2)
Check wether this plugin is responsible for creating a link of this type. |
NodeLink |
copyLink(ProjectContext context,
NodeLink original,
NodeContainer node1,
NodeContainer node2)
Copies a link (when user selects some nodes and links and click copy popup menu, and paste). |
void |
createLink(ProjectContext context,
NodeContainer node1,
NodeContainer node2)
Create a link. |
void |
deleteLink(ProjectContext context,
NodeLink link)
Delete a link. |
void |
editLink(ProjectContext context,
NodeLink link,
boolean shortView)
Edit and modify a link. |
void |
serialize(NodeLink link,
org.w3c.dom.Element element)
Serialize this link specific part. |
void |
unserialize(NodeLink link,
org.w3c.dom.Element element)
Unserialize (if it is possible for this plugin) this serialized link specific part. |
Method Detail |
---|
boolean canLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
context
- The project context.node1
- The first node.node2
- The target node.
void createLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
context
- The project context.node1
- The original node.node2
- The target node.NodeLink copyLink(ProjectContext context, NodeLink original, NodeContainer node1, NodeContainer node2)
context
- The project context.original
- The origin node for this link.node1
- The copy of the origin node.node2
- The copy of the target node.
void editLink(ProjectContext context, NodeLink link, boolean shortView)
context
- The current project context.link
- The node link to be edited.shortView
- true if link is simply selected, false if link has been dbl-clicked.void deleteLink(ProjectContext context, NodeLink link)
context
- The current project context.link
- The link to be deleted.Project
void unserialize(NodeLink link, org.w3c.dom.Element element)
link
- The node link.element
- The DOM element in which specific properties from link should be stored.void serialize(NodeLink link, org.w3c.dom.Element element)
link
- The link to customize given the serialized data.element
- The specific DOM element that stores properties.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |