Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Square But Not Rectangle Problem
Square But Not Rectangle Problem [message #244278] Mon, 14 July 2008 16:25 Go to next message
Michael Swearingen is currently offline Michael Swearingen
Messages: 26
Registered: July 2009
Junior Member
Hello Everyone,

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?

Thanks,
MS
Re: Square But Not Rectangle Problem [message #244320 is a reply to message #244278] Tue, 15 July 2008 14:26 Go to previous message
Michael Swearingen is currently offline Michael Swearingen
Messages: 26
Registered: July 2009
Junior Member
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?
Previous Topic:Action set of GEF application do not work in a multipage editor
Next Topic:Rotation and Transparency
Goto Forum:
  


Current Time: Tue Sep 16 17:51:29 GMT 2014

Powered by FUDForum. Page generated in 0.02023 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software