Skip to main content



      Home
Home » Eclipse Projects » GEF » How to implement the Model in GEF
How to implement the Model in GEF [message #60069] Thu, 30 January 2003 08:26 Go to next message
Eclipse UserFriend
Originally posted by: m.spork.DELETE_THIS_SPAMBLOCKqut.edu.au

Hi,

I'm trying to get my head around the Model aspect of GEF and using the
logic example to help. It appears that all model classes should have a
common parent. This seems to make sense as a lot of the code todo with
PropertyChange Listeners is common to all elements of a model. So in
the Logic example we have LogicElement as the top level model class.

In the second level of the inheritence hierachy the model seems to
split along two lines - in graph terminology LogicSubParts are "nodes"
(with inputs and outputs) and Wires are the "arcs" with target and
source nodes.

So far so good?

Here's where I get confused - LogicDiagram is a subclass of
LogicSubPart. Ok - I can understand that some aspects of LogicSubParts
implementation is relevant to LogicDiagram - namely the size and
location properties. But can a LogicDiagram have inputs and outputs
like a node? IOW - is it possible to recursively embed one
LogicDiagram in another?

I know this is only example code - just wondering if the inheritence
hierachy here makes complete sense. I want to make sure I understand
how models are meant to work in GEF before I move on to understanding
EditParts.

Thanks

Murray
Re: How to implement the Model in GEF [message #60092 is a reply to message #60069] Thu, 30 January 2003 10:05 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

GEF makes no requirements on the model, how it is implemented, or how it
notifies changes. You are free to use anything that makes sense to your
application. PropertyChange was used because most java programmers are
familiar with it, and the purpose of the example is to learn GEF, not the
model.

"Murray Spork" <m.spork@DELETE_THIS_SPAMBLOCKqut.edu.au> wrote in message
news:4i7i3vo4j1quoin8j4rs71sn9s1kjkkb3j@4ax.com...
>
> Hi,
>
> I'm trying to get my head around the Model aspect of GEF and using the
> logic example to help. It appears that all model classes should have a
> common parent. This seems to make sense as a lot of the code todo with
> PropertyChange Listeners is common to all elements of a model. So in
> the Logic example we have LogicElement as the top level model class.
>
> In the second level of the inheritence hierachy the model seems to
> split along two lines - in graph terminology LogicSubParts are "nodes"
> (with inputs and outputs) and Wires are the "arcs" with target and
> source nodes.
>
> So far so good?
>
> Here's where I get confused - LogicDiagram is a subclass of
> LogicSubPart. Ok - I can understand that some aspects of LogicSubParts
> implementation is relevant to LogicDiagram - namely the size and
> location properties. But can a LogicDiagram have inputs and outputs
> like a node? IOW - is it possible to recursively embed one
> LogicDiagram in another?
>
> I know this is only example code - just wondering if the inheritence
> hierachy here makes complete sense. I want to make sure I understand
> how models are meant to work in GEF before I move on to understanding
> EditParts.
>
> Thanks
>
> Murray
Previous Topic:A word about examples and GEF
Next Topic:How can install the example project of GEF?
Goto Forum:
  


Current Time: Fri May 02 04:46:39 EDT 2025

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

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

Back to the top