Problem with Local / absolute coordinates [message #167070] |
Sat, 05 February 2005 10:06  |
Eclipse User |
|
|
|
Originally posted by: no.mail.please
Hi !
I need to place a figure inside a container based on the coordinates of
another figure inside another container figure.
My problem is that I get absolutes coordinates from my model and so
cannot place the second figure correctly.
I would like to translate these absolute coordinates in local
coordinates relative to the parent figure, but I can't manage to do it
using translateFromParent.
How can I do it ?
TIA
--
Arnaud
the locations methods in my model classes look like that :
/**
* Set the Location of this bean.
* @param newLocation a non-null Point instance
* @throws IllegalArgumentException if the parameter is null
*/
public void setBeanLocation(Point newLocation) {
if (newLocation == null) {
throw new IllegalArgumentException();
}
location.setLocation(newLocation);
firePropertyChange(LOCATION_PROP, null, location);
}
public Point getBeanLocation() {
return location.getCopy();
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03841 seconds