Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Can graphiti support diagrams with fixed layouts?
Can graphiti support diagrams with fixed layouts? [message #663050] Sat, 02 April 2011 18:56 Go to next message
Eclipse User
Originally posted by: wbeckwith.gmail.com

We have a custom gui editor, I'm thinking of trying to redo with
graphiti and it looks like graphiti can handle everything except I
haven't seen if it can handle diagrams where the layout of elements is
fixed. By fixed I mean the user can't place a pictogram element
wherever they want. They choose the element and we choose the position.
Also we use the draw2d equivalent of the Manhattan Router for drawing
connections between elements so that they don't overlap.

If graphiti can handle both situations then it looks like a great
candidate for handling our gui.

Wb
Re: Can graphiti support diagrams with fixed layouts? [message #663070 is a reply to message #663050] Sun, 03 April 2011 07:31 Go to previous messageGo to next message
Volker Wegert is currently offline Volker Wegert
Messages: 169
Registered: July 2009
Senior Member
Am 02.04.11 20:56, schrieb Wendell Beckwith:
> We have a custom gui editor,

Cool, so I'm not the only one doing crazy stuff ;-)

> I'm thinking of trying to redo with
> graphiti and it looks like graphiti can handle everything except I
> haven't seen if it can handle diagrams where the layout of elements is
> fixed.

That should be possible - you just have to override the canXXX methods
of the various features so that the user will not be able to move or
resize the elements in question.

> By fixed I mean the user can't place a pictogram element wherever
> they want. They choose the element and we choose the position.

The user has to choose a position to create the element, but whether you
stick to that proposition when actually placing the element is up to
you. Warning: Incomprehensible user interfaces ahead :-).

> Also we
> use the draw2d equivalent of the Manhattan Router for drawing
> connections between elements so that they don't overlap.

Don't know about that, sorry.

HTH
Volker

--
* Volker Wegert * http://www.volker-wegert.de/contact *
Re: Can graphiti support diagrams with fixed layouts? [message #663075 is a reply to message #663070] Sun, 03 April 2011 09:33 Go to previous messageGo to next message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
Wendell,

We have built several Graphiti editors where the layout is fully automated. So this is perfectly possible. You have to make sure that the FeatureProvider defines no features for everything that has to do with layout.

We have redefined the following methods to return null: getReconnectionFeature(), getMoveBendpointFeature(), getResizeShapeFeature(), getMoveAnchorFeature(), getAddBendpointFeature(), getMoveShapefeature(), getMoveConnectionDecoratorFeature().
This effectively ensures that the user cannot change anything in the layout.

Jos
Re: Can graphiti support diagrams with fixed layouts? [message #663261 is a reply to message #663050] Mon, 04 April 2011 13:13 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1595
Registered: July 2009
Location: Walldorf, Germany
Senior Member
The Manhattan routing question still seems to be open:
Graphiti provides ManhattanConnections that could be used for that purpose.
In order to make them non-overlapping, you would use a standard layouting
library, e.g. the one that is provided with GEF. There's an example how to
do that in the FAQ section of our Eclipse page (under documenation).

Michael


"Wendell Beckwith" wrote in message news:in7r30$5g0$1@news.eclipse.org...

We have a custom gui editor, I'm thinking of trying to redo with
graphiti and it looks like graphiti can handle everything except I
haven't seen if it can handle diagrams where the layout of elements is
fixed. By fixed I mean the user can't place a pictogram element
wherever they want. They choose the element and we choose the position.
Also we use the draw2d equivalent of the Manhattan Router for drawing
connections between elements so that they don't overlap.

If graphiti can handle both situations then it looks like a great
candidate for handling our gui.

Wb
Re: Can graphiti support diagrams with fixed layouts? [message #663640 is a reply to message #663075] Wed, 06 April 2011 01:21 Go to previous messageGo to next message
Eclipse User
Originally posted by: wbeckwith.gmail.com

Thanks Jos,

So simple yet hard to think of doing when new to the API.

Wb

On 4/3/2011 4:33 AM, Jos Warmer wrote:
> Wendell,
>
> We have built several Graphiti editors where the layout is fully
> automated. So this is perfectly possible. You have to make sure that the
> FeatureProvider defines no features for everything that has to do with
> layout.
> We have redefined the following methods to return null:
> getReconnectionFeature(), getMoveBendpointFeature(),
> getResizeShapeFeature(), getMoveAnchorFeature(),
> getAddBendpointFeature(), getMoveShapefeature(),
> getMoveConnectionDecoratorFeature(). This effectively ensures that the
> user cannot change anything in the layout.
>
> Jos
Re: Can graphiti support diagrams with fixed layouts? [message #663642 is a reply to message #663261] Wed, 06 April 2011 01:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: wbeckwith.gmail.com

Thanks for the reference, the only bad part seems to be that the
additional of a custom feature will expose this in the context menu,
according to the FAQ entry and this is not something we want users to
need to control/invoke.

Wb

On 4/4/2011 8:13 AM, Michael Wenz wrote:
> The Manhattan routing question still seems to be open:
> Graphiti provides ManhattanConnections that could be used for that
> purpose. In order to make them non-overlapping, you would use a standard
> layouting library, e.g. the one that is provided with GEF. There's an
> example how to do that in the FAQ section of our Eclipse page (under
> documenation).
>
> Michael
Re: Can graphiti support diagrams with fixed layouts? [message #663729 is a reply to message #663640] Wed, 06 April 2011 11:02 Go to previous messageGo to next message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
Simple indeed, but it took me some time to figure it out Smile.

Eclipse User wrote on Tue, 05 April 2011 21:21
Originally posted by: wbeckwith.gmail.com

Thanks Jos,

So simple yet hard to think of doing when new to the API.

Wb
...


Re: Can graphiti support diagrams with fixed layouts? [message #663781 is a reply to message #663642] Wed, 06 April 2011 13:24 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1595
Registered: July 2009
Location: Walldorf, Germany
Senior Member
That's only done by the default implementation in
DefaultToolBehaviorProvider.getContextMenu and can be changed by overriding.

Michael


"Wendell Beckwith" wrote in message news:ingf9o$ehr$1@news.eclipse.org...

Thanks for the reference, the only bad part seems to be that the
additional of a custom feature will expose this in the context menu,
according to the FAQ entry and this is not something we want users to
need to control/invoke.

Wb

On 4/4/2011 8:13 AM, Michael Wenz wrote:
> The Manhattan routing question still seems to be open:
> Graphiti provides ManhattanConnections that could be used for that
> purpose. In order to make them non-overlapping, you would use a standard
> layouting library, e.g. the one that is provided with GEF. There's an
> example how to do that in the FAQ section of our Eclipse page (under
> documenation).
>
> Michael
Previous Topic:Bulk addition of business objects
Next Topic:invisible rectangle
Goto Forum:
  


Current Time: Wed Sep 17 13:38:00 GMT 2014

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

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