use of com.archimatetool.model.IAccessRelationship in project archi by archimatetool.
the class AccessConnectionFigure method refreshVisuals.
@Override
public void refreshVisuals() {
// Access type
IAccessRelationship relation = (IAccessRelationship) getModelConnection().getArchimateRelationship();
switch(relation.getAccessType()) {
case IAccessRelationship.WRITE_ACCESS:
default:
setSourceDecoration(null);
// arrow at target endpoint
setTargetDecoration(fDecoratorTarget);
break;
case IAccessRelationship.READ_ACCESS:
// arrow at source endpoint
setSourceDecoration(fDecoratorSource);
setTargetDecoration(null);
break;
case IAccessRelationship.UNSPECIFIED_ACCESS:
// no arrows
setSourceDecoration(null);
setTargetDecoration(null);
break;
case IAccessRelationship.READ_WRITE_ACCESS:
// both arrows
setSourceDecoration(fDecoratorSource);
setTargetDecoration(fDecoratorTarget);
break;
}
// This last
super.refreshVisuals();
}
use of com.archimatetool.model.IAccessRelationship in project archi by archimatetool.
the class DiagramModelArchimateConnectionTests method testSetArchimateConcept.
@Test
public void testSetArchimateConcept() {
IAccessRelationship r = IArchimateFactory.eINSTANCE.createAccessRelationship();
connection.setArchimateConcept(r);
assertSame(r, connection.getArchimateConcept());
assertSame(r, connection.getArchimateRelationship());
}
Aggregations