public int addPoint ( double x , double y ) { int pointIndex ; if ( this . pointCoordinates == null ) { this . pointCoordinates = new double [ ] { x , y } ; this . partIndexes = null ; pointIndex = 0 ; } else { double [ ] pts = new double [ this . pointCoordinates . length + 2 ] ; System . arraycopy ( this . pointCoordinates , 0 , pts , 0 , this . pointCoordinates . length ) ; pointIndex = pts . length - 2 ; pts [ pointIndex ] = x ; pts [ pointIndex + 1 ] = y ; this . pointCoordinates = pts ; pts = null ; pointIndex /= 2 ; } fireShapeChanged ( ) ; fireElementChanged ( ) ; return pointIndex ; }
Add the specified point at the end of the last group .