Home » Eclipse Projects » GEF » Flow Anchors ? (Repost)
Flow Anchors ? (Repost) [message #90670] |
Fri, 15 August 2003 02:27  |
Eclipse User |
|
|
|
Originally posted by: brian.fernandes.codito.com
I aplogize for reposting, but my original Post did not appear on the web
interface for more than 12 hours...
----
I am using a flow layout for one of my edit parts, to which connections can
be made.
I would like to create anchors in a manner which is similar to adding edit
parts as children to the flow layout.
ie. When I create a connection, the possible anchors in the target (and in
the source) should be between already existing edit parts and anchors. When
I create an anchor, I'd like it to occupy space (just like an edit part) and
cause figures below it to move down. I think I'd like the anchors themselves
to behave like they were edit parts to be placed in the FlowLayout.
Any suggestions on how to implement this ? Do I have to modify the Anchor
itself - to incorporate additional logic to actually go thru existing
anchors in the figure and position itself accordingly... but how do I
allocate space for the anchor (cause the edit parts above and below it to
move apart slightly)
An idea that just popped into my head is to actually use a normal Chopbox
anchor and create dummy invisible editparts, which will be created in
accordance with the flowLayout.
Then I make the connections between these editparts...
Any suggestions ?
Thanks,
Brian.
|
|
| | |
Re: Flow Anchors ? (Repost) [message #90713 is a reply to message #90700] |
Mon, 18 August 2003 09:01   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
> My Connections End Points should be individually selectable and each
> endpoint should have properties (displayable with the property view) which
> affect the endpoints decoration.
Are you sure the connection endpoints are editable, or do your nodes have
terminals, which are editable, and can exist without the connection? How
are these objects you are talking about represented in the model?
> I also need the ability to create branching connections.
> ie. I want to be able to create a connection by clicking on an existing
> connection( for it to act as the source point for a new connection.) The
> connection should then branch from this point.
> I think this is possible by simply installing an apporpriate
> GRAPHICAL_NODE_ROLE for the Connection EditPart, right ?
> What ANCHOR should I use ?
It is possible to have connections to connections, although you end up with
a primary conneciton, and a branch off of the primary connection. Maybe
this is what you wany.
>
>
> Since there can be any number of branches, it wouldn't be a very good
> solution to store the properties of each endpoint within the connection
> properties.
>
> I'm still inclined to use Dummy Invisible Edit Parts as the end points of
> my connection. The commands will add and remove these edit parts as
> required. This also allows me to indirectly select the end points of a
The commands should be changing the model, not removing edit parts.
> connection, and set it's properties as well... this too isn't too clean,
> because if you click the endpoint, then you select the connection; but you
> have to specifically click the dummy edit part to get the properties of
> the end point.
IMO, if you can select something, you should be able to see it. I have no
idea what you are trying to build. Can you post pictures? Alternative
would be:
Don't allow selecting of endpoints, but display endpoint properties when the
*connection* itself is selected. This is possible
> This solution does seem like a hack ; is there any better way to do this ?
>
> I'd appreciate any corrections or suggestions.
>
> Thanks,
> Brian.
>
>
>
>
>
|
|
|
Re: Flow Anchors ? (Repost) [message #90727 is a reply to message #90713] |
Mon, 18 August 2003 12:21   |
Eclipse User |
|
|
|
Originally posted by: brian.fernandes.codito.com
>It is possible to have connections to connections, although you end up with
>a primary conneciton, and a branch off of the primary connection. Maybe
>this is what you wany.
Yes, that's seems perfectly fine right now.
So with connections to connections, the branches are actually different
connections altogether, right ? Is it as simple as implementing the
GRAPHICAL_NODE_ROLE for the Connection Edit Part ? What about the Anchor -
is there a special one I should be using for connections or will ChopBox
suffice ?
>Are you sure the connection endpoints are editable, or do your nodes have
>terminals, which are editable, and can exist without the connection? How
>are these objects you are talking about represented in the model?
Yes, the endpoints are editable themselves. My nodes do not have
pre-defined terminals. From my models point of view, there isn't an
equivalent of a terminal. You could think of the end point of the
connection as the terminal itself. One changable property would be the
connection decoration (switch between an arrow and no arrow for instance)
If the end point of the connection is present in my node (which has a flow
layout) I'd like the endpoint to behave as if it were an editPart in the
flow layout. ie. It's position would be claculated in a fashion similar to
inserting a normal editpart within the flow layout (governed by
FlowLayout#Layout() ). The end point would have a PreferredSize perhaps,
and the editparts below it would be moved lower.
This requirement gave me the idea of inserting a dummy edit part in the
flow layout (at the end point of the connection), but I'm not too happy
with the idea.
>The commands should be changing the model, not removing edit parts.
Of course; that is what I acutally meant to say. Sorry.
>IMO, if you can select something, you should be able to see it.
Yes, I don't think it will be necessary to select this part anymore (see
below)
>I have no idea what you are trying to build. Can you post pictures?
Alternative
>would be:
>Don't allow selecting of endpoints, but display endpoint properties when the
>*connection* itself is selected. This is possible
I'm home right now, but I'll try to send you a picture soon.
Initially, I had thought of it as being a SINGLE connection with branches.
If I do use multiple connections though, each connection will have only 2
endpoints. So I guess it would be trivial to include the properties of
both endpoints along with the properties of the connection itself.
There is one issue though - how would the user know which endpoints
properties he is editing ? I don't expect the users to know the source or
target terminals and I wouldn't want him to change a property just to see
if he's modifiying the right endpoint. - I'd have to maybe color them
differently, but that isn't too professional.
Or were you suggesting some other technique ?
Many thanks,
Brian.
|
|
| |
Goto Forum:
Current Time: Wed Apr 30 18:29:50 EDT 2025
Powered by FUDForum. Page generated in 0.09971 seconds
|