static Color getColorProperty ( IChemObject object , String key ) { Object value = object . getProperty ( key ) ; if ( value instanceof Color ) return ( Color ) value ; if ( value != null ) throw new IllegalArgumentException ( key + " property should be a java.awt.Color" ) ; return null ; }
Safely access a chem object color property for a chem object .