public void paint ( Paintable paintable , Object group , MapContext context ) { FeatureTransaction featureTransaction = ( FeatureTransaction ) paintable ; Feature [ ] features = featureTransaction . getNewFeatures ( ) ; if ( features == null ) { return ; } context . getVectorContext ( ) . drawGroup ( mapWidget . getGroup ( RenderGroup . VECTOR ) , featureTransaction ) ; for ( int i = 0 ; i < features . length ; i ++ ) { Geometry geometry = mapWidget . getMapModel ( ) . getMapView ( ) . getWorldViewTransformer ( ) . worldToPan ( features [ i ] . getGeometry ( ) ) ; context . getVectorContext ( ) . drawGroup ( featureTransaction , features [ i ] ) ; if ( geometry instanceof Point ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( Point ) geometry , context . getVectorContext ( ) ) ; } else if ( geometry instanceof MultiPoint ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( MultiPoint ) geometry , context . getVectorContext ( ) ) ; } else if ( geometry instanceof LineString ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( LineString ) geometry , context . getVectorContext ( ) ) ; } else if ( geometry instanceof MultiLineString ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( MultiLineString ) geometry , context . getVectorContext ( ) ) ; } else if ( geometry instanceof Polygon ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( Polygon ) geometry , context . getVectorContext ( ) ) ; } else if ( geometry instanceof MultiPolygon ) { paint ( features [ i ] , "featureTransaction.feature" + i , ( MultiPolygon ) geometry , context . getVectorContext ( ) ) ; } } }
The actual painting function .