use of org.freeplane.features.link.ConnectorModel in project freeplane by freeplane.
the class MMapMouseListener method mousePressed.
public void mousePressed(final MouseEvent e) {
super.mousePressed(e);
if (e.isPopupTrigger())
return;
final MapView mapView = (MapView) e.getComponent();
final Object object = mapView.detectCollision(new Point(originX, originY));
if (object instanceof ConnectorModel) {
final ConnectorModel arrowLinkModel = (ConnectorModel) object;
final Shape shape = arrowLinkModel.getShape();
if (Shape.EDGE_LIKE.equals(shape) || Shape.LINE.equals(shape) && !arrowLinkModel.isSelfLink()) {
return;
}
draggedLink = arrowLinkModel;
draggedLinkOldStartPoint = draggedLink.getStartInclination();
draggedLinkOldEndPoint = draggedLink.getEndInclination();
draggedLink.setShowControlPoints(true);
mapView.repaintVisible();
}
}
use of org.freeplane.features.link.ConnectorModel in project freeplane by freeplane.
the class ConnectorProxy method setEndArrowImpl.
private void setEndArrowImpl(final ArrowType arrowType) {
final ConnectorModel connector = getConnector();
getLinkController().changeArrowsOfArrowLink(connector, connector.getStartArrow(), arrowType);
}
use of org.freeplane.features.link.ConnectorModel in project freeplane by freeplane.
the class ConnectorProxy method setStartArrowImpl.
private void setStartArrowImpl(final ArrowType arrowType) {
final ConnectorModel connector = getConnector();
getLinkController().changeArrowsOfArrowLink(connector, arrowType, connector.getEndArrow());
}
use of org.freeplane.features.link.ConnectorModel in project freeplane by freeplane.
the class ConnectorIterator method next.
public Proxy.Connector next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
final ConnectorModel current = next;
next = getNextConnectorModel();
return new ConnectorProxy(current, scriptContext);
}
use of org.freeplane.features.link.ConnectorModel in project freeplane by freeplane.
the class NodeProxy method addConnectorTo.
// Node: R/W
public Proxy.Connector addConnectorTo(final String targetNodeID) {
final MLinkController linkController = (MLinkController) LinkController.getController();
final ConnectorModel connectorModel = linkController.addConnector(getDelegate(), targetNodeID);
return new ConnectorProxy(connectorModel, getScriptContext());
}
Aggregations