Snap JGoIconicNode to grid

JGoObject snaps relatively to center of bounding rectangle
How to snap JGoIconicNode relatively to center of icon ?

Moving an object causes the GoObject.handleMove method to be called. This is true whether or not your are snapping to a grid. If snapping to a grid, it just determines the closest grid point before calling handleMove.

handleMove is called with a spotNumber parameter. The spotNumber is determined by the GridSpot property of the JGoView and is JGoObject.TopLeft by default.
You could call JGoView.setGridSpot with a different spot location to determine what spot of the object moves to that location, for example
setGridSpot(JGoObject.Center). If that's not sufficient, you can override the handleMove method on your subclass of JGoIconicNode and add your own offsets to the move location to make the object snap to any location you want.
setRectangleSpotLocation(Rectangle rect, int spot, int x, int y, Rectangle result) was overriden
It seems work.