Hide individual resize handles? [message #640389] |
Sun, 21 November 2010 15:10 |
Volker Wegert Messages: 182 Registered: July 2009 |
Senior Member |
|
|
Hello,
I've seen that the method canResizeShape of the resize feature is called with
width, height, x and y set to -1 to determine whether to show the resize
handles. If the method returns false, the GFNonResizableEditPolicy is used and
thus all resizing handles are disabled. I've got some shapes that can be
resized horizontally, but require a fixed height. Is there a way to disable
only the top and bottom resize handles? I know that I can prevent the actual
resizing later on, but the current situation isn't optimal from the user's
point of view: the visual appearance of the element pretends to be resizable
in any direction, and you have to actually try and grab it just to be shown
that it can't be resized...
Thanks
Volker
--
* Volker Wegert * http://www.volker-wegert.de/contact *
I used to drive a Heisenbergmobil, but everytime I looked at the speedometer,
I got lost.
|
|
|
|
Re: Hide individual resize handles? [message #641503 is a reply to message #640509] |
Thu, 25 November 2010 17:31 |
Henrik Rentz-Reichert Messages: 261 Registered: July 2009 |
Senior Member |
|
|
Hi Matthias,
in another thread opened by me Tim Kaiser replied "I think it makes
sense to not show the resize handles if resize is not enabled."
I wouldn't show selection handles either in this case.
But the orange rectangle (without handles) could be shown.
Changing the primary/secondary selection colors is not really satisfactory.
I think it would make sense to change in
org.eclipse.graphiti.ui.internal.util.draw2d.GFHandleHelper. createShapeHandles(GraphicalEditPart,
IConfigurationProvider, int, boolean)
the line
list.add(new GFSurroundingHandle(owner, cp, supportedResizeDirections,
movable));
to
list.add(new GFSurroundingHandle(owner, cp, PositionConstants.NSEW,
movable));
To have the surrounding handle in any case.
Does that make sense to you?
Another suggestion is for the case that e.g. only horizontal resize is
allowed. Then I would only draw the eastern and western handles since
the corner handles usually allow to resize in both directions (I noticed
though that the cursor is changing in accordance to the resize
configuration).
And finally: it would be nice if not only color and style of the
surrounding handle could be change but also the line width.
Henrik
Am 22.11.2010 12:43, schrieb Matthias Gorning:
> I think it makes sense to not show the resize handles if resize is not
>> enabled.
|
|
|
|
|
|
Re: Hide individual resize handles? [message #644462 is a reply to message #644449] |
Sat, 11 December 2010 16:57 |
Volker Wegert Messages: 182 Registered: July 2009 |
Senior Member |
|
|
Volker Wegert <mail@volker-wegert.de> writes:
> Matthias Gorning <matthias.gorning@sap.com> writes:
>> yes, we can pass the ResizeShapeContext as a
>> parameter to the method getResizeConfiguration(). Please, open a bugzilla.
>
> Done, 332360.
....ouch. There's a subsequent problem: I've got some figures that can't be
resized at all. If I switch off both horizontal and vertical resizing, the
editor no longer hightlights the element when it is selected. Applying the
change proposed by Henrik Rentz-Reichert in this thread (change
GFHandleHelper.createShapeHandles: replace new GFSurroundingHandle(owner, cp,
supportedResizeDirections with new GFSurroundingHandle(owner, cp,
PositionConstants.NSEW) fixes this. I'll add this to the bug.
Volker
--
* Volker Wegert * http://www.volker-wegert.de/contact *
"Ein Gerücht geht so schnell um die Welt, da hat sich die Wahrheit noch nicht
einmal die Schnürsenkel gebunden." (Hans Joachim Rauschenbach)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03258 seconds