public BooleanProperty isPolygonProperty ( ) { if ( this . isPolygon == null ) { this . isPolygon = new ReadOnlyBooleanWrapper ( this , MathFXAttributeNames . IS_POLYGON , false ) ; this . isPolygon . bind ( Bindings . createBooleanBinding ( ( ) -> { boolean first = true ; boolean lastIsClose = false ; for ( final PathElementType type : innerTypesProperty ( ) ) { lastIsClose = false ; if ( first ) { if ( type != PathElementType . MOVE_TO ) { return false ; } first = false ; } else if ( type == PathElementType . MOVE_TO ) { return false ; } else if ( type == PathElementType . CLOSE ) { lastIsClose = true ; } } return lastIsClose ; } , innerTypesProperty ( ) ) ) ; } return this . isPolygon ; }
Replies the isPolygon property .