Best practice for own Shapes? [message #757486] |
Fri, 18 November 2011 15:48 |
Christian B Messages: 68 Registered: August 2011 |
Member |
|
|
Hi,
Say we have this example, a ContainerShape which has two Anchors and three child shapes.
For now if i want Access to a child or an anchor I use following code:
shapeA1 = containerA.getChildren().get(0);
shapeA2 = containerA.getChildren().get(1);
shapeA3 = containerA.getChildren().get(2);
anchorA1 = containerA.getAnchors()containerShape.get(0);
anchorA2 = containerA.getAnchors()containerShape.get(1);
But what i would like to have is a extra class for the ContainerA with methods
shapeA1 = containerA.getShapeA1();
shapeA2 = containerA.getShapeA2();
shapeA3 = containerA.getShapeA3();
anchorA1 = containerA.getAnchorA1();
anchorA2 = containerA.getAnchorA2()
So the question is, what is the best practice for adding own shapes?
Do I have to extend the peCreateService, so I can implement a method like peCreateService.createContainerA()?
thx for your help!
[Updated on: Fri, 18 November 2011 15:50] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02180 seconds