question: protected boolean syncEnclosed ( ) { try { OffsetGrabPoint gb0 = ( OffsetGrabPoint ) polyGrabPoints . get ( 0 ) ; OffsetGrabPoint ogb = ( OffsetGrabPoint ) polyGrabPoints . get ( polyGrabPoints . size ( ) - 1 ) ; if ( gb0 . getX ( ) == ogb . getX ( ) && gb0 . getY ( ) == ogb . getY ( ) ) { gb0 . addGrabPoint ( ogb ) ; ogb . addGrabPoint ( gb0 ) ; return true ; } } catch ( ClassCastException cce ) { } catch ( IndexOutOfBoundsException ioobe ) { } return false ; }
target:  Method connects the last point to the first point. Make sure they are both OffsetGrabPoints. Return true if the points cover the same pixel and if they were successfully joined.