Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsmarquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/233663/#msg_233663
"paint" with marquee around the whole object. How can I, if possible
make selection of the object if any side of the marquee intersects with
object?
thanks,
Alex]]>Aleksandr Kravets2007-04-27T21:54:57-00:00Re: marquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/233680/#msg_233680
Marquee selection tool behaviors, like the one you are asking about,
should be set up through #setMarqueeBehavior(int) method. You can chose
between 3 behavious defined as constants within the class. However, I
don't think that any of those behaviors would do for you. So, you'd have
to create your own marquee selection tool that would just be a copy-paste
of current MarqueeSelectionTool where you can define a new behavior and
add support for it most likely only in 2 methods:
#calculateNewSelection(Collection, Collection) and
#getAllChildren(EditPart, Set). Just look how other behaviors are defined
and supported.
Hope this helps.
Cheers,
Alex]]>Alex Boyko2007-04-28T20:37:42-00:00Re: marquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/233695/#msg_233695
I have another related question. My figure is setup from a containing
layer that serves as a parent for image and label layers. When I want to
select the figure, I need to select the parent layer that is bigger than
other layers and without border (which is not visible by default) it's
hard to do it. Will implementing my own marquee tool help me in defining
selectable areas as well or do I need another approach?
Alex Boyko wrote:
> Hi,
>
> Marquee selection tool behaviors, like the one you are asking about,
> should be set up through #setMarqueeBehavior(int) method. You can chose
> between 3 behavious defined as constants within the class. However, I
> don't think that any of those behaviors would do for you. So, you'd have
> to create your own marquee selection tool that would just be a
> copy-paste of current MarqueeSelectionTool where you can define a new
> behavior and add support for it most likely only in 2 methods:
> #calculateNewSelection(Collection, Collection) and
> #getAllChildren(EditPart, Set). Just look how other behaviors are
> defined and supported.
> Hope this helps.
>
> Cheers,
> Alex
>]]>Aleksandr Kravets2007-04-30T13:25:11-00:00Re: marquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/233711/#msg_233711
I think you can use current MarqueeSelectionTool if you create an editpart
for your image figure. This is unless you already creating editpart for
the image...
The other approach could be: use 1 editpart, the figure for which will be
the wrapper figure for image and label. The wrapper figure implements
HandleBounds and returns the bounds of the image figure. However, based on
the screen shots, I have a feeling that this is your current approach, so
try creating the editpart for the image figure. In fact you can even try
the following: create 1 editpart the figure for which will be image figure
and attach the label figure to it with a help of
org.eclipse.draw2d.Locator (take a look at its subclasses to see how it's
used). In other words, this is a suggestion to get rid of the wrapper
figure.
Hope this helps.
Cheers,
Alex]]>Alex Boyko2007-04-30T17:11:53-00:00Re: marquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/233719/#msg_233719
Alex Boyko wrote:
> Hi Alex,
>
> I think you can use current MarqueeSelectionTool if you create an
> editpart for your image figure. This is unless you already creating
> editpart for the image...
> The other approach could be: use 1 editpart, the figure for which will
> be the wrapper figure for image and label. The wrapper figure implements
> HandleBounds and returns the bounds of the image figure. However, based
> on the screen shots, I have a feeling that this is your current
> approach, so try creating the editpart for the image figure. In fact you
> can even try the following: create 1 editpart the figure for which will
> be image figure and attach the label figure to it with a help of
> org.eclipse.draw2d.Locator (take a look at its subclasses to see how
> it's used). In other words, this is a suggestion to get rid of the
> wrapper figure.
> Hope this helps.
>
> Cheers,
> Alex
>]]>Aleksandr Kravets2007-04-30T17:33:15-00:00Re: marquee selection tool
https://www.eclipse.org/forums/index.php/mv/msg/74808/239385/#msg_239385
Originally posted by: swanbrook66.gmail.com
Aleksandr Krvavets wrote:
> Right now when I want to select an object in the editor I need to
> "paint" with marquee around the whole object. How can I, if possible
> make selection of the object if any side of the marquee intersects with
> object?
>
> thanks,
> Alex
Hi,
I have the exact same requirement as mentioned above (would have
thought this would be a standard mode but it isn't for some reason). I
have created my own selection tool based on the MarqueeSelectionTool
which uses intersects instead of contains to determine whether to select
an editpart or not. However, I am now stuck. How do I get my GMF
application to actually use this selection tool?