Skip to main content



      Home
Home » Eclipse Projects » GEF » some classes as samples to contribute
some classes as samples to contribute [message #44296] Thu, 21 November 2002 08:38 Go to next message
Eclipse UserFriend
hi all,

i'm following this newsgroup for a while. i want to contribute some source
code. but since, these codes are not good enough, or, are not designed to be
a part of gef, i post them here. it's just like samples to guide people for:

- parts that have children parts, where you can move, add, remove, or
reparent.


five file follows:
- ExclusiveXYLayoutEditPolicy, this class is a general purpose xylayout,
which has the ability to deny,
- ExclusiveContainerEditPolicy, this class is a general purpose container,
which has the ability to deny,
- BasicModel, well basic thing, which can have children,
- ControlModel, something to model a simple control, like button, rectangle
or whatever, for a label model ie you need to extend it
- NodeModel, this is something you can use as a model for parts that will
have connections, or don't use it. there are a lot of stuff in logic
also....
- SetConstraintCommand, this is one of the commands, which is location &
size stuff...
- some other general purpose commands

i removed package declerations so you need to arrange by your self, and
there might be some app specific checks inside, like InputPortModel, just
comment out them....

hope they're useful

ozgur


  • Attachment: contrib.zip
    (Size: 8.45KB, Downloaded 156 times)
Re: some classes as samples to contribute [message #44329 is a reply to message #44296] Thu, 21 November 2002 08:56 Go to previous message
Eclipse UserFriend
a brief explanation how to use:

1 - use controlmodel as is, or extend it,
2 - create a class factory that creates editpart for your model,
3 - install edit policies, three of them, (ExclusiveXYLayoutEditPolicy,
ExclusiveContainerEditPolicy, BasicComponentEditPolicy.java)

Exclusive* has different constructors, let me explain:(box model is a class
extends controlmodel)

installEditPolicy(EditPolicy.CONTAINER_ROLE, new
ExclusiveContainerEditPolicy(BoxModel.class));
installEditPolicy(EditPolicy.LAYOUT_ROLE, new
ExclusiveXYLayoutEditPolicy(BoxModel.class));

this edit parts accepts interactions only with this type, you can pass
classes as array, or create an instance of policy and call addMember, or
simple pass boolean true to let everything



"Ozgur Kurt" <ozgurkurt@hotmail.com> wrote in message
news:arilg0$28n$1@rogue.oti.com...
> hi all,
>
> i'm following this newsgroup for a while. i want to contribute some source
> code. but since, these codes are not good enough, or, are not designed to
be
> a part of gef, i post them here. it's just like samples to guide people
for:
>
> - parts that have children parts, where you can move, add, remove, or
> reparent.
>
>
> five file follows:
> - ExclusiveXYLayoutEditPolicy, this class is a general purpose xylayout,
> which has the ability to deny,
> - ExclusiveContainerEditPolicy, this class is a general purpose
container,
> which has the ability to deny,
> - BasicModel, well basic thing, which can have children,
> - ControlModel, something to model a simple control, like button,
rectangle
> or whatever, for a label model ie you need to extend it
> - NodeModel, this is something you can use as a model for parts that will
> have connections, or don't use it. there are a lot of stuff in logic
> also....
> - SetConstraintCommand, this is one of the commands, which is location &
> size stuff...
> - some other general purpose commands
>
> i removed package declerations so you need to arrange by your self, and
> there might be some app specific checks inside, like InputPortModel, just
> comment out them....
>
> hope they're useful
>
> ozgur
>
>
>
Previous Topic:Will future GEF "2.1" support customizable key bindings?
Next Topic:some question about connections....
Goto Forum:
  


Current Time: Sat Jul 12 11:41:57 EDT 2025

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

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

Back to the top