Search in sources :

Example 1 with ConnectionLocator

use of org.eclipse.draw2d.ConnectionLocator in project archi by archimatetool.

the class AbstractDiagramConnectionFigure method setLabelLocator.

private void setLabelLocator(int position) {
    Locator locator = null;
    switch(position) {
        case IDiagramModelConnection.CONNECTION_TEXT_POSITION_SOURCE:
            locator = new ArchiConnectionEndpointLocator(this, false);
            break;
        case IDiagramModelConnection.CONNECTION_TEXT_POSITION_MIDDLE:
            locator = new ConnectionLocator(this, ConnectionLocator.MIDDLE);
            break;
        case IDiagramModelConnection.CONNECTION_TEXT_POSITION_TARGET:
            locator = new ArchiConnectionEndpointLocator(this, true);
            break;
    }
    setConstraint(getConnectionLabel(), locator);
}
Also used : Locator(org.eclipse.draw2d.Locator) ConnectionLocator(org.eclipse.draw2d.ConnectionLocator) ConnectionLocator(org.eclipse.draw2d.ConnectionLocator)

Aggregations

ConnectionLocator (org.eclipse.draw2d.ConnectionLocator)1 Locator (org.eclipse.draw2d.Locator)1