Home » Modeling » Graphiti » Connection Selection Tolerance, Adjusting Connection Context, Automatic Layout
Connection Selection Tolerance, Adjusting Connection Context, Automatic Layout [message #911678] |
Wed, 12 September 2012 05:39 |
|
Polyline tolerance.
For me, clicking polyline consumes pretty much time. I want to give it some tolerance likes GEF does to let user can easily select connection. Can I do this on Graphiti?
Adjusting CreateConnectionContext
Figure 1
As you can see on Figure 1, Creation Connection feedback shows negative mouse pointer to users.
Because, table can reference only tables, not columns.
In common sense, we know that user is not trying to connect table to column.
But ICreateConnectionContext is automatically populated, and there is no chance to adjust context.
I tried some hack in isloated space(inside of CreateConnectionFeature) to walk around this problem, but there were several side effects.
ToolBehaviorProvider provides a way to adjust location info for direct editing, I think it would be great what if there is some adjust method like ToolBehaviorProvider#getLocationInfo.
Each creatation of connection may have different sense, So I suggest that locate adjust method onto create connection feature.
Automatic Call of layout feature
Figure 2
When I removed a column from a table, there will be an empty space.
I can manually call layout feature for resolve this problem,
But I think structural change of PEs should have to call layout feature automatically.
Thanks to great inventors and challengers.
|
|
|
Re: Connection Selection Tolerance, Adjusting Connection Context, Automatic Layout [message #911701 is a reply to message #911678] |
Wed, 12 September 2012 06:46 |
Christian Brand Messages: 36 Registered: July 2009 Location: Walldorf/Germany |
Member |
|
|
Jeeeyul Lee wrote on Wed, 12 September 2012 07:39Automatic Call of layout feature
Figure 2
When I removed a column from a table, there will be an empty space.
I can manually call layout feature for resolve this problem,
But I think structural change of PEs should have to call layout feature automatically.
Thanks to great inventors and challengers.
We discussed that topic of calling layout automatically in the first years of Graphiti development (years ago ). But if the framework should call the layout feature automatically, which layout feature should be called? That of the diagram? The one of the container? In our discussions we came to the point, that the framework cannot decide when and which layout feature to be called - with more technical exactness: framework decides about the layout context given to the feature provider.
Our recommendation is to call layoutPictogramElement(PictogramElement) - protected method in class AbstractFeature. No one knows better when to layout and what to layout than your tool - exactly: you, the tool designer/developer!
Best regards,
Christian
Christian Brand
SAP AG - Walldorf - Germany
[Updated on: Wed, 12 September 2012 06:59] Report message to a moderator
|
|
| | |
Re: Connection Selection Tolerance, Adjusting Connection Context, Automatic Layout [message #911710 is a reply to message #911678] |
Wed, 12 September 2012 07:10 |
Christian Brand Messages: 36 Registered: July 2009 Location: Walldorf/Germany |
Member |
|
|
Jeeeyul Lee wrote on Wed, 12 September 2012 07:39Adjusting CreateConnectionContext
Figure 1
As you can see on Figure 1, Creation Connection feedback shows negative mouse pointer to users.
Because, table can reference only tables, not columns.
In common sense, we know that user is not trying to connect table to column.
But ICreateConnectionContext is automatically populated, and there is no chance to adjust context.
I tried some hack in isloated space(inside of CreateConnectionFeature) to walk around this problem, but there were several side effects.
ToolBehaviorProvider provides a way to adjust location info for direct editing, I think it would be great what if there is some adjust method like ToolBehaviorProvider#getLocationInfo.
Each creatation of connection may have different sense, So I suggest that locate adjust method onto create connection feature.
Your case should be quite easy to realize. Just the two methods in your CreateConnectionFeature:
canCreate has to answer true if context's target is table or colum (isn't it a row?).
create has to do the stuff with the table - also the context's target is an inner column.
Christian Brand
SAP AG - Walldorf - Germany
|
|
| | |
Re: Connection Selection Tolerance, Adjusting Connection Context, Automatic Layout [message #911726 is a reply to message #911710] |
Wed, 12 September 2012 07:34 |
|
Quote:Your case should be quite easy to realize. Just the two methods in your CreateConnectionFeature:
canCreate has to answer true if context's target is table or colum (isn't it a row?).
create has to do the stuff with the table - also the context's target is an inner column.
I tried that, and it worked for result state.
But there were some side effects.
During user creating connection, wrong target & source feedback was provided:
* When connection started from column, feedback seems to uses column PE's chopbox anchor, not table.
* Target table may be highlighted when mouse is over. But column will be highlighted because it is active PE.
I can use transformed context for canCreate, canStartConnection, create, but I can't handle automatically populated feedback UI. so, I think transforming context should have to be part of graphiti.
|
|
| |
Goto Forum:
Current Time: Thu Sep 26 16:14:32 GMT 2024
Powered by FUDForum. Page generated in 0.06205 seconds
|