posted 15 years ago
Dear Guys,
Thank you for your help already.
I have now used your previous code and enlarged it so that I can use my own shapes rather than the ones provided. I need to do this as I will be querying number of the shapes when I link them to a JTable and then pass on information from this table. I need to be able to query the name of the shape and the number so that I can retrieve information from the JTable.
The problem is that to do this I have had to create a drawing method in the Shape class in this case "Generator" and have to pass the AffineTransform into the Generator's constructor.
This is causing problems when I try to move the object - it will not move.
The key issue seems to be the following line under the transformPath method in the ShapeDrawZoomPanel class.
path.transform(at);
I am using the containsPoint method in Shapes to check whether I have hit the object. I have set this very high as I just want to check the functionality of moving the object.
Any help would be much appreciated.
The Shapes class
The PathWrangler2 class
The ShapeDrawZoomPanel class
The main class ShapeDraw
Thanks.
The Apprentice