Highlight the lines/connections [message #854277] |
Mon, 23 April 2012 21:00  |
Eclipse User |
|
|
|
Hello GMF Experts!
In my diagram editor, I'm trying to add a feature that when a user hovers the mouse on a connecting line between Figure A to Figure B, it highlights both the connecting line and the borders for Figures A and B. (Basically, I was just thinking of changing the line border to "NEON GREEN" to indicate a highlighted figure)
How do I do this in GMF? Is there an example that I can follow for this feature?
Is this done by adding a new Edit Policy?
Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854760 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854767 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854773 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854778 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854784 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854791 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #854799 is a reply to message #854277] |
Tue, 24 April 2012 08:06   |
Eclipse User |
|
|
|
Hello,
You should use the SelectionEditPolicy (org.eclipse.gef.editpolicies)
and override method showSelection().
This policy corresponds to the role EditPolicy.SELECTION_FEEDBACK_ROLE.
You can change it in the createDefaultEditPolicies() of your edge edit part.
Regards,
Laurent
On 23/04/2012 23:00, Che Bumagat wrote:
> Hello GMF Experts!
>
> In my diagram editor, I'm trying to add a feature that when a user
> hovers the mouse on a connecting line between Figure A to Figure B, it
> highlights both the connecting line and the borders for Figures A and B.
> (Basically, I was just thinking of changing the line border to "NEON
> GREEN" to indicate a highlighted figure)
>
> How do I do this in GMF? Is there an example that I can follow for this
> feature?
> Is this done by adding a new Edit Policy?
> Thanks again and appreciate the help in advance!
|
|
|
Re: Highlight the lines/connections [message #855071 is a reply to message #854760] |
Tue, 24 April 2012 13:51   |
Eclipse User |
|
|
|
Hi,
Thanks for the reply. I tried that implementation and it enabled me to change the Figure properties (i.e. border colors etc) but only when I select the actual link or connection in the diagram.
Is there a way to do this just by hovering the mouse over my target Edit Part (i.e. connections). I tried implementing the MouseMotionListener.mouseHover() in my EditPolicy but that didn't help me.
As always, appreciat the help!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03781 seconds