Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342262 - enhanced resize behavior for container shapes
Summary: enhanced resize behavior for container shapes
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Juno M3 theme_round_offs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 06:39 EDT by Henrik Rentz-Reichert CLA
Modified: 2012-06-28 10:44 EDT (History)
2 users (show)

See Also:
michael.wenz: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)