Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] toggling connection labels

Please open an enhancement request to track this. This sounds like a pretty nice feature to have in the core framework.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Wednesday, June 08, 2011 7:04 PM
To: Sapphire project
Subject: Re: [sapphire-dev] toggling connection labels

 

Oh ok.  So for now I'll just put some UI state into my sapphire model which is not ideal right now but just fine until the support is added to diagram editor later.  Thanks for response.

On Wed, Jun 8, 2011 at 6:44 PM, Shenxue Zhou <shenxue.zhou@xxxxxxxxxx> wrote:

Greg,

 

It's a great idea to support turning of/off connection labels.

 

There is a way to get SapphireDiagramEditor instance through diagram action handlers. It's done through DiagramRenderingContext class. I'm actually in the process of cleaning up diagram action handlers so that they'll use DiagramRenderingContext when it needs SapphireDiagramEditor.

 

I'm not sure you can turn off connection labels through SapphireDiagramEditor alone. The connection label is added through the class SapphireAddConnectionFeature. The best way might be we provide a global diagram action to toggle connection label, very similar to the grid toggle action. The connection label state will be kept in SapphireDiagramEditor.

 

Inside GEF, all the connection labels are added to the canvas through a separate layer. If Graphiti's connection labels use that mechanism, we should be able to do it through SapphireDiagramEditor. Otherwise, we'd need to find another way.

 

Shenxue

 


From: Greg Amerson [mailto:gregory.amerson@xxxxxxxxxxx]
Sent: Wednesday, June 08, 2011 5:24 PM
To: Sapphire project
Subject: [sapphire-dev] toggling connection labels

Hey guys,

 

So I'm trying to wire up a global context menu action for toggling the displaying of the diagram connection labels.  In my particular diagram, if there are a lot of nodes the connection labels can make it look messy.  One way I could do this is to put something into the model for UI state but I don't want to do that, so I'm trying to keep it on the UI/Diagram Editor side of things.  However, diagram action handlers are not passed the SapphireDiagramEditor instance, so I'm quite sure what is the best way to accomplish it.  Would love any suggestions.

--

Greg Amerson (@greg_amerson)

Liferay, Inc. (#liferay)


_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev




--

Greg Amerson (@greg_amerson)

Liferay, Inc. (#liferay)


Back to the top