Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342262

Summary: enhanced resize behavior for container shapes
Product: [Modeling] Graphiti Reporter: Henrik Rentz-Reichert <hrr>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: matthias.gorning, michael.wenz
Version: 0.8.0Flags: michael.wenz: juno+
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard: Juno M3 theme_round_offs

Description Henrik Rentz-Reichert CLA 2011-04-08 06:39:35 EDT
In the case of a container shape with child shapes it would be desirable to distinguish the resize handle which is used.
A common use case is to treat the nested shapes as if they were obstacles where the resize stops. The absolute coordinates of the nested shapes should stay invariant in this scenario.

To facilitate this the ResizeContext would have to provide this information.
For the adjustment of the relative coordinates of the nested shapes it would also be helpful to have the initial upper left corner coordinates of the container.
Comment 1 Michael Wenz CLA 2011-07-18 07:11:40 EDT
Would like to target for Juno
Comment 2 Matthias Gorning CLA 2011-10-21 08:05:08 EDT
First part is done:

commit e02b0d0139ac84b06424b1fef44200985ccceeb4
Author: mgorning <matthias.gorning@sap.com> 2011-10-21 14:01:04
Committer: mgorning <matthias.gorning@sap.com> 2011-10-21 14:01:04
Parent: c13737dbfa2bef30e8eb6f4f59676cf515b453d6 (Bug 342262 - enhanced resize behavior for container shapes / provide correct resize direction in the resize context)
Branches: origin/master, master
Comment 3 Matthias Gorning CLA 2011-10-21 08:20:13 EDT
You can get the initial upper left corner coordinates of the container with:

@Override
public void resizeShape(IResizeShapeContext context) {

	GraphicsAlgorithm ga = context.getShape().getGraphicsAlgorithm();
	ga.getX();
	ga.getY();
		
	...
		
}
Comment 4 Michael Wenz CLA 2012-04-11 10:39:02 EDT
Bookkeeping: Set target release
Comment 5 Michael Wenz CLA 2012-06-28 10:44:48 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)