use of org.freeplane.features.link.MapLinks in project freeplane by freeplane.
the class MLinkController method insertMapLinksForClone.
public void insertMapLinksForClone(final NodeModel model) {
final MapModel map = model.getMap();
final MapLinks mapLinks = map.getExtension(MapLinks.class);
if (mapLinks != null) {
IActor actor = new IActor() {
@Override
public void undo() {
mapLinkChanger.deleteMapLinks(mapLinks, model, model);
}
@Override
public String getDescription() {
return "deleteMapLinks";
}
@Override
public void act() {
mapLinkChanger.insertMapLinks(mapLinks, model);
}
};
modeController.execute(actor, map);
}
}
use of org.freeplane.features.link.MapLinks in project freeplane by freeplane.
the class MLinkController method deleteMapLinksForClone.
public void deleteMapLinksForClone(final NodeModel model) {
final MapModel map = model.getMap();
final MapLinks mapLinks = map.getExtension(MapLinks.class);
if (mapLinks != null) {
IActor actor = new IActor() {
@Override
public void undo() {
mapLinkChanger.insertMapLinks(mapLinks, model);
}
@Override
public String getDescription() {
return "deleteMapLinks";
}
@Override
public void act() {
mapLinkChanger.deleteMapLinks(mapLinks, model, model);
}
};
modeController.execute(actor, map);
}
}
use of org.freeplane.features.link.MapLinks in project freeplane by freeplane.
the class ConnectorInListProxy method getConnectorSet.
List<NodeLinkModel> getConnectorSet() {
final MapLinks allLinks = MapLinks.getLinks(node.getMap());
final Set<NodeLinkModel> links = allLinks == null ? null : allLinks.get(node.getID());
return links == null ? Collections.<NodeLinkModel>emptyList() : Collections.unmodifiableList(new ArrayList<NodeLinkModel>(links));
}
Aggregations