Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213529] |
Thu, 06 April 2006 19:13  |
Eclipse User |
|
|
|
Originally posted by: none.none.org
Hi, As soon as a I click on my connection tool, and move the cursor over
the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
would expect. However, when I'm over one of my nodes, I would expect the
cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
help with?
I think this is the relevant info:
My diagram edit part installs policies with the following key to policy
mappings:
EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
My node edit parts install polices for the following key to policy mappings:
EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
(Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
getReconnectSourceCommand, getReconnectSourceCommand)
EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
Regards
-AC
|
|
|
|
|
|
Re: Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213673 is a reply to message #213529] |
Sat, 08 April 2006 15:15  |
Eclipse User |
|
|
|
Originally posted by: none.none.org
Looks like the Edit Policy I had mapped to the
EditPolicy.GRAPHICAL_NODE_ROLE key should've been extending
GraphicalNodeEditPolicy rather than GraphicalEditPolicy.
By doing so, stuff like changes to the cursor to
SharedCursors.CURSOR_PLUG (along with the more important, ensuing,
ability to create a connection) comes for free.
I'll have to investigate exactly what's happening in
GraphicalNodeEditPolicy.
-AC
Aakash Chopra wrote:
> Hi, As soon as a I click on my connection tool, and move the cursor over
> the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
> would expect. However, when I'm over one of my nodes, I would expect the
> cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
>
> I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
> help with?
>
> I think this is the relevant info:
>
> My diagram edit part installs policies with the following key to policy
> mappings:
>
> EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
> EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
>
> My node edit parts install polices for the following key to policy
> mappings:
>
> EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
> (Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
> getReconnectSourceCommand, getReconnectSourceCommand)
> EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
>
>
> Regards
> -AC
|
|
|
Powered by
FUDForum. Page generated in 0.05292 seconds