[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Newbie Question Regarding The Display of Model

Adding the following to the refreshVisuals method of the EditPart worked (suggestion made elsewhere in this newsgroup by Partik Shah - Thanks)!

((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(50, 50, -1, -1));

But I think the nodes are on top of each other now.... I'll have to work on that... Also, I need to figure what setting layout constraints is actually doing.


Aakash Chopra wrote:
Hello...

I've spent a ton of time looking at examples, documentation, etc. But nothing I have run into discusses what is minimally required to display something representative of a simple model (a 2 nodal model with a connection between the nodes). Although I'd eventually like edit the model, I'd just like something displayed at this point so that I know I'm on the right track.

Right now I've got, a model, the corresponding edit parts, and corresponding figures (with figures extending org.eclipse.draw2d.Label). The model is loaded, the corresponding edit parts get created by an EditPartFactory, the overridden createFigure method in each EditPart gets invoked, thus creating a corresponding figure, all figures are opaque, and no errors are displayed or logged.

I'm not really sure what's next. I think I'm on the cusp of having a model displayed, but just need a little push. Does anyone have any suggestions?

Thanks in Advance!

Aakash