Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How's this for an idea -Support for creating Draw2D objects in VE?
How's this for an idea -Support for creating Draw2D objects in VE? [message #18428] Thu, 12 February 2004 05:25 Go to next message
Sean Woodhouse is currently offline Sean WoodhouseFriend
Messages: 45
Registered: July 2009
Member
Hi All,

While attending one of the EclipseCon sessions on the VE it occurred to me
that it'd be really nice to be able to visually define Draw2D objects using
the VE. I'm working on an EMF/GEF based editor at the moment and it'd be
really nice to be able to create complex Draw2D objects to represent things
in my diagrams. At the moment, because it's still early days in our
development, I'm only using very simple primitives (although I do have drop
shadows working :-), but eventually I want to have very rich objects. I
think it'd also help to create a standard set of publicly available objects
to represent standard objects like those in UML diagrams.

I mentioned it to Joe Winchester and he seemed to grok what I was ranting
about.What do other people think? Is Draw2D support something you would all
want?

Cheers

Sean.
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #19079 is a reply to message #18428] Thu, 12 February 2004 17:03 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Sean ,

> While attending one of the EclipseCon sessions on the VE it occurred to me
> that it'd be really nice to be able to visually define Draw2D objects using
> the VE. I'm working on an EMF/GEF based editor at the moment and it'd be
> really nice to be able to create complex Draw2D objects to represent things
> in my diagrams. At the moment, because it's still early days in our
> development, I'm only using very simple primitives (although I do have drop
> shadows working :-), but eventually I want to have very rich objects. I
> think it'd also help to create a standard set of publicly available objects
> to represent standard objects like those in UML diagrams.
>
> I mentioned it to Joe Winchester and he seemed to grok what I was ranting
> about.What do other people think? Is Draw2D support something you would all
> want?

I love the word "grok". I have never heard it before, and just to see what you
were claiming I had done (in case is was something I should not be proud of), I
looked it up on the web. Apparently it is from the Robert Heinlein novel
"Stranger in a strange land" and is Martian for "to drink full" or "to become
totally absorbed in". In that case - yup, I totally love the idea.

Conceptually what I see is some draw2D stuff on the palette like images,
rectangles, line tools, etc... You'd drop and drag these around, and the code
generated would be archival .java that was able to re-create the objects.
There would be property editors for things like colors, location of image
classes, border thicknesses, etc...

Most of the use of draw2D that I am aware of is inside GEF, where what you are
doing is creating EditPart objects that sit between a set of domain data and
the glass. The glass is draw2D stuff and the edit part basically renders the
model in a set of figures, as well as listen to command requests that are sent
by tools (such as the mouse being moved, a key being pressed) and then
generates undoable commands to update the model. The EditPart also listens to
the model so it can refresh the visuals. For this kind of application a draw2D
GUI builder would not be that useful, because presumabely all the GUI builder
would do is generate static code that was able to re-create a picture. Is what
you are thinking of something like paintShopPro where you just draw a picture
from a set of objects, and the .psp file is able to serialize it as a set of
objects ? In this case however the destination result is just the resulting
image, and usually this is done in some kind of format like .gif or .jpeg or
even .wmf to allow transport between Windows apps that are all about figures.

So, apart from being a very cool thing to build with the VE and hopefully a lot
of fun, what is the end user scenario that you're shooting for where the tool
would add value to someone's experience ?

Best regards,

Joe Winchester
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #19090 is a reply to message #19079] Thu, 12 February 2004 22:57 Go to previous messageGo to next message
Sean Woodhouse is currently offline Sean WoodhouseFriend
Messages: 45
Registered: July 2009
Member
> Conceptually what I see is some draw2D stuff on the palette like images,
> rectangles, line tools, etc... You'd drop and drag these around, and the
code
> generated would be archival .java that was able to re-create the objects.
> There would be property editors for things like colors, location of image
> classes, border thicknesses, etc...

Yep, that's what I'm thinking

> Most of the use of draw2D that I am aware of is inside GEF, where what you
are
> doing is creating EditPart objects that sit between a set of domain data
and
> the glass. The glass is draw2D stuff and the edit part basically renders
the
> model in a set of figures, as well as listen to command requests that are
sent
> by tools (such as the mouse being moved, a key being pressed) and then
> generates undoable commands to update the model. The EditPart also
listens to
> the model so it can refresh the visuals.

Yep, that's how it all hangs together

> For this kind of application a draw2D
> GUI builder would not be that useful, because presumabely all the GUI
builder
> would do is generate static code that was able to re-create a picture. Is
what
> you are thinking of something like paintShopPro where you just draw a
picture
> from a set of objects, and the .psp file is able to serialize it as a set
of
> objects ?

No, I'm thinking more along the lines of your first idea

> In this case however the destination result is just the resulting
> image, and usually this is done in some kind of format like .gif or .jpeg
or
> even .wmf to allow transport between Windows apps that are all about
figures.
>
> So, apart from being a very cool thing to build with the VE and hopefully
a lot
> of fun, what is the end user scenario that you're shooting for where the
tool
> would add value to someone's experience ?

Ok, the end user is a GEF developer who wants to be able to visually create
Figure classes for their GEF applications. I want it to create classes for
me like the following:

public class EndNodeFigure extends Figure
{

Ellipse innerEllipse = null;
Ellipse outerEllipse = null;

public EndNodeFigure()
{
super();

innerEllipse = new Ellipse();
outerEllipse = new Ellipse();

innerEllipse.setSize(18,18);
outerEllipse.setSize(26,26);

innerEllipse.setBackgroundColor(ColorConstants.black);
outerEllipse.setLineWidth(2);

Point location = new Point(4, 4);
innerEllipse.setLocation(location);

this.add(outerEllipse);
this.add(innerEllipse);

connectionAnchor = new EllipseAnchor(this);

}

public Rectangle getBounds()
{
return outerEllipse.getBounds();
}
}

That's a pretty simple example, but you get the picture.

Cheers

Sean.
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #19102 is a reply to message #19090] Fri, 13 February 2004 10:50 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Sean,

OK, so the idea is to be able to visually compose a figure rather than a diagram
of figures. By analogy it's like a creating a custom JPanel with no actual
application logic that aggregates a bunch of components, rather than the
senacior creating an application with a bunch of panels and lots of listener
logic dealing with the underlying domain. The productivity gain would be that
the palette would show you what kind of stuff you could do, and you'd get nice
help with doing layouts, positioning, and all the touch feely feedback that
makes WYSIWG tools a good idea.

Apart from being useful, this would also be a very nice project to do to help
document the VE because it would flesh out the API and the extension points.
The big question for me is how to get this started and how to get it finished.
Maybe someone needs to build a "Hello World" proof of concept, but then most of
the VE comitters are currently snowed under with other VE line items, so after
this maybe folks like you (and others) could add the meat to the project once
you got a feel for what was going on we'd bounce the code back and forth.
However, this is probably a discussion that should take place on the vep mailing
list as well as this newsgroup, and we should discuss it on the mailing list
with the other VE comitters and Dave Orme (the VE project lead) to try and set
some direction to this and see where it fits into the VE project charter.

Best regards,

Joe Winchester
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #580898 is a reply to message #18428] Thu, 12 February 2004 17:03 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Sean ,

> While attending one of the EclipseCon sessions on the VE it occurred to me
> that it'd be really nice to be able to visually define Draw2D objects using
> the VE. I'm working on an EMF/GEF based editor at the moment and it'd be
> really nice to be able to create complex Draw2D objects to represent things
> in my diagrams. At the moment, because it's still early days in our
> development, I'm only using very simple primitives (although I do have drop
> shadows working :-), but eventually I want to have very rich objects. I
> think it'd also help to create a standard set of publicly available objects
> to represent standard objects like those in UML diagrams.
>
> I mentioned it to Joe Winchester and he seemed to grok what I was ranting
> about.What do other people think? Is Draw2D support something you would all
> want?

I love the word "grok". I have never heard it before, and just to see what you
were claiming I had done (in case is was something I should not be proud of), I
looked it up on the web. Apparently it is from the Robert Heinlein novel
"Stranger in a strange land" and is Martian for "to drink full" or "to become
totally absorbed in". In that case - yup, I totally love the idea.

Conceptually what I see is some draw2D stuff on the palette like images,
rectangles, line tools, etc... You'd drop and drag these around, and the code
generated would be archival .java that was able to re-create the objects.
There would be property editors for things like colors, location of image
classes, border thicknesses, etc...

Most of the use of draw2D that I am aware of is inside GEF, where what you are
doing is creating EditPart objects that sit between a set of domain data and
the glass. The glass is draw2D stuff and the edit part basically renders the
model in a set of figures, as well as listen to command requests that are sent
by tools (such as the mouse being moved, a key being pressed) and then
generates undoable commands to update the model. The EditPart also listens to
the model so it can refresh the visuals. For this kind of application a draw2D
GUI builder would not be that useful, because presumabely all the GUI builder
would do is generate static code that was able to re-create a picture. Is what
you are thinking of something like paintShopPro where you just draw a picture
from a set of objects, and the .psp file is able to serialize it as a set of
objects ? In this case however the destination result is just the resulting
image, and usually this is done in some kind of format like .gif or .jpeg or
even .wmf to allow transport between Windows apps that are all about figures.

So, apart from being a very cool thing to build with the VE and hopefully a lot
of fun, what is the end user scenario that you're shooting for where the tool
would add value to someone's experience ?

Best regards,

Joe Winchester
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #580943 is a reply to message #19079] Thu, 12 February 2004 22:57 Go to previous message
Sean Woodhouse is currently offline Sean WoodhouseFriend
Messages: 45
Registered: July 2009
Member
> Conceptually what I see is some draw2D stuff on the palette like images,
> rectangles, line tools, etc... You'd drop and drag these around, and the
code
> generated would be archival .java that was able to re-create the objects.
> There would be property editors for things like colors, location of image
> classes, border thicknesses, etc...

Yep, that's what I'm thinking

> Most of the use of draw2D that I am aware of is inside GEF, where what you
are
> doing is creating EditPart objects that sit between a set of domain data
and
> the glass. The glass is draw2D stuff and the edit part basically renders
the
> model in a set of figures, as well as listen to command requests that are
sent
> by tools (such as the mouse being moved, a key being pressed) and then
> generates undoable commands to update the model. The EditPart also
listens to
> the model so it can refresh the visuals.

Yep, that's how it all hangs together

> For this kind of application a draw2D
> GUI builder would not be that useful, because presumabely all the GUI
builder
> would do is generate static code that was able to re-create a picture. Is
what
> you are thinking of something like paintShopPro where you just draw a
picture
> from a set of objects, and the .psp file is able to serialize it as a set
of
> objects ?

No, I'm thinking more along the lines of your first idea

> In this case however the destination result is just the resulting
> image, and usually this is done in some kind of format like .gif or .jpeg
or
> even .wmf to allow transport between Windows apps that are all about
figures.
>
> So, apart from being a very cool thing to build with the VE and hopefully
a lot
> of fun, what is the end user scenario that you're shooting for where the
tool
> would add value to someone's experience ?

Ok, the end user is a GEF developer who wants to be able to visually create
Figure classes for their GEF applications. I want it to create classes for
me like the following:

public class EndNodeFigure extends Figure
{

Ellipse innerEllipse = null;
Ellipse outerEllipse = null;

public EndNodeFigure()
{
super();

innerEllipse = new Ellipse();
outerEllipse = new Ellipse();

innerEllipse.setSize(18,18);
outerEllipse.setSize(26,26);

innerEllipse.setBackgroundColor(ColorConstants.black);
outerEllipse.setLineWidth(2);

Point location = new Point(4, 4);
innerEllipse.setLocation(location);

this.add(outerEllipse);
this.add(innerEllipse);

connectionAnchor = new EllipseAnchor(this);

}

public Rectangle getBounds()
{
return outerEllipse.getBounds();
}
}

That's a pretty simple example, but you get the picture.

Cheers

Sean.
Re: How's this for an idea -Support for creating Draw2D objects in VE? [message #581020 is a reply to message #19090] Fri, 13 February 2004 10:50 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Sean,

OK, so the idea is to be able to visually compose a figure rather than a diagram
of figures. By analogy it's like a creating a custom JPanel with no actual
application logic that aggregates a bunch of components, rather than the
senacior creating an application with a bunch of panels and lots of listener
logic dealing with the underlying domain. The productivity gain would be that
the palette would show you what kind of stuff you could do, and you'd get nice
help with doing layouts, positioning, and all the touch feely feedback that
makes WYSIWG tools a good idea.

Apart from being useful, this would also be a very nice project to do to help
document the VE because it would flesh out the API and the extension points.
The big question for me is how to get this started and how to get it finished.
Maybe someone needs to build a "Hello World" proof of concept, but then most of
the VE comitters are currently snowed under with other VE line items, so after
this maybe folks like you (and others) could add the meat to the project once
you got a feel for what was going on we'd bounce the code back and forth.
However, this is probably a discussion that should take place on the vep mailing
list as well as this newsgroup, and we should discuss it on the mailing list
with the other VE comitters and Dave Orme (the VE project lead) to try and set
some direction to this and see where it fits into the VE project charter.

Best regards,

Joe Winchester
Previous Topic:Visual Cafe Compatibility
Next Topic:Update VE via Update Manager
Goto Forum:
  


Current Time: Fri Dec 27 08:25:52 GMT 2024

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

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

Back to the top