/** * Use this method to get SWT colors. A ColorRegistry is used to manage * the RGB->Color mapping. * <p> * Note: Don't dispose the returned color. It is disposed automatically * when the plugin is stopped. * * @param rgb * the rgb color data * @return The SWT Color */ public Color getColor( RGB rgb ) { if ( !colorRegistry.hasValueFor( rgb.toString() ) ) { colorRegistry.put( rgb.toString(), rgb ); } return colorRegistry.get( rgb.toString() ); }
/** * Use this method to get SWT colors. A ColorRegistry is used to manage * the RGB->Color mapping. * <p> * Note: Don't dispose the returned color. It is disposed automatically * when the plugin is stopped. * * @param rgb * the rgb color data * @return The SWT Color */ public Color getColor( RGB rgb ) { if ( !colorRegistry.hasValueFor( rgb.toString() ) ) { colorRegistry.put( rgb.toString(), rgb ); } return colorRegistry.get( rgb.toString() ); }