use of com.archimatetool.model.IBounds in project archi by archimatetool.
the class DiagramModelObject method basicSetBounds.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetBounds(IBounds newBounds, NotificationChain msgs) {
IBounds oldBounds = bounds;
bounds = newBounds;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, IArchimatePackage.DIAGRAM_MODEL_OBJECT__BOUNDS, oldBounds, newBounds);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of com.archimatetool.model.IBounds in project archi by archimatetool.
the class ArchimateFactoryTests method testCreateBounds.
@Test
public void testCreateBounds() {
IBounds bounds = IArchimateFactory.eINSTANCE.createBounds(1, 2, 3, 4);
assertNotNull(bounds);
assertEquals(1, bounds.getX());
assertEquals(2, bounds.getY());
assertEquals(3, bounds.getWidth());
assertEquals(4, bounds.getHeight());
}
use of com.archimatetool.model.IBounds in project archi by archimatetool.
the class DiagramModelObjectTests method testGetCopy.
@Override
@Test
public void testGetCopy() {
super.testGetCopy();
IDiagramModelConnection conn = IArchimateFactory.eINSTANCE.createDiagramModelConnection();
conn.connect(object, object);
object.addConnection(conn);
assertTrue(object.getSourceConnections().contains(conn));
assertTrue(object.getTargetConnections().contains(conn));
IBounds bounds = IArchimateFactory.eINSTANCE.createBounds(2, 4, 6, 8);
object.setBounds(bounds);
IDiagramModelObject copy = (IDiagramModelObject) object.getCopy();
assertNotSame(object, copy);
assertTrue(copy.getSourceConnections().isEmpty());
assertTrue(copy.getTargetConnections().isEmpty());
assertNotSame(bounds, copy.getBounds());
assertEquals(bounds.getX(), copy.getBounds().getX());
assertEquals(bounds.getY(), copy.getBounds().getY());
assertEquals(bounds.getWidth(), copy.getBounds().getWidth());
assertEquals(bounds.getHeight(), copy.getBounds().getHeight());
}
Aggregations