GEF相対座標について

819 ワード


public class BaseReportFigure extends Figure {
//        figure           
	protected boolean useLocalCoordinates() {
		return true;
	}
}

	public Command getCommand(Request request) {
		Command command = super.getCommand(request);
		if (command!=null &&
				request.getType().equals(RequestConstants.REQ_CREATE))
		{
			Point location = ((CreateRequest)request).getLocation().getCopy();
//          Figure     
			getFigure().translateToRelative(location);
			getFigure().translateFromParent(location);
//			System.out.println(location);
			request.getExtendedData().put(RELATIVELOCATION, location);
		}
		return command;
	}