public int getColorByLayer ( DwgObject entity ) { int colorByLayer = 0 ; int layer = entity . getLayerHandle ( ) ; for ( int j = 0 ; j < layerTable . size ( ) ; j ++ ) { Vector layerTableRecord = ( Vector ) layerTable . get ( j ) ; int lHandle = ( ( Integer ) layerTableRecord . get ( 0 ) ) . intValue ( ) ; if ( lHandle == layer ) { colorByLayer = ( ( Integer ) layerTableRecord . get ( 2 ) ) . intValue ( ) ; } } return colorByLayer ; }
Returns the color of the layer of a DWG object