I am working on my first GEF project, it is very similar to the shapes
example. I have these two shapes a Square and a Rectangle. Obviously
they are both very similar shapes so their code is virtually identical. I
use the Draw2D built in RectangleFigure object to draw them both. The
only difference that is worth mentioning is that in my model code the
square inherits from the rectangle but in the view code this is not the
case (they are separate each inheriting from the Figure class). (I also
have a Circle and Ellipse that follow the same structure but they both
work fine).
Here is my problem, I can drag a square from the palette onto the editor
fine, but when I try with the Rectangle I can't. The cursor changes to
the circle with a slash and the shape is not drawn. Anyone have any clue
why I can draw a square and not a rectangle?
I did some more work on this yesterday and actually ended up changing the
square inheriting from the rectangle property I mentioned before. I've
got the square working the way I want but I still cannot draw the
rectangle.
I managed to find out that my createFigure() function is not being called
when I select rectangle in the palette. Anyone have any ideas?