void disposeColors() { for ( int i = 0; i < colors.length; i++ ) { colors[i].dispose(); } }
private void disposeColors( Collection<Color> colors ) { for ( Color color : colors ) { color.dispose(); } }
void disposeColors() { for ( int i = 0; i < colors.length; i++ ) { colors[i].dispose(); } }
void disposeColors() { for ( int i = 0; i < colors.length; i++ ) { colors[i].dispose(); } }
/** * Free the managed resource if it hasn't already been done and if this is not a system color * */ public void dispose() { // System color and already disposed off colors don't need to be disposed! if ( !systemColor && !color.isDisposed() ) { color.dispose(); } }
private Color getColor( int r, int g, int b ) { Color color = new Color( PropsUI.getDisplay(), new RGB( r, g, b ) ); int index = colors.indexOf( color ); if ( index < 0 ) { colors.add( color ); } else { color.dispose(); color = colors.get( index ); } return color; }
private Color getColor( int r, int g, int b ) { Color color = new Color( PropsUI.getDisplay(), new RGB( r, g, b ) ); int index = colors.indexOf( color ); if ( index < 0 ) { colors.add( color ); } else { color.dispose(); color = colors.get( index ); } return color; }
public void widgetSelected( SelectionEvent arg0 ) { tabColor.dispose(); tabColorRGB = new RGB( ConstUI.COLOR_TAB_RED, ConstUI.COLOR_TAB_GREEN, ConstUI.COLOR_TAB_BLUE ); tabColor = new Color( display, tabColorRGB ); wTabColor.setBackground( tabColor ); wTabColor.redraw(); } } );
public void dispose() { gc.dispose(); if ( transform != null && transform.isDisposed() == false ) { transform.dispose(); } for ( Color color : colors ) { color.dispose(); } for ( Font font : fonts ) { font.dispose(); } }
public void widgetSelected( SelectionEvent arg0 ) { background.dispose(); backgroundRGB = new RGB( ConstUI.COLOR_BACKGROUND_RED, ConstUI.COLOR_BACKGROUND_GREEN, ConstUI.COLOR_BACKGROUND_BLUE ); background = new Color( display, backgroundRGB ); wBGColor.setBackground( background ); wBGColor.redraw(); } } );
public void dispose() { gc.dispose(); if ( transform != null && transform.isDisposed() == false ) { transform.dispose(); } for ( Color color : colors ) { color.dispose(); } for ( Font font : fonts ) { font.dispose(); } }
public void widgetSelected( SelectionEvent arg0 ) { graphColor.dispose(); graphColorRGB = new RGB( ConstUI.COLOR_GRAPH_RED, ConstUI.COLOR_GRAPH_GREEN, ConstUI.COLOR_GRAPH_BLUE ); graphColor = new Color( display, graphColorRGB ); wGrColor.setBackground( graphColor ); wGrColor.redraw(); } } );
public void widgetSelected( SelectionEvent e ) { ColorDialog cd = new ColorDialog( shell ); cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) ); cd.setRGB( wBorderColor.getBackground().getRGB() ); RGB newColor = cd.open(); if ( newColor == null ) { return; } borderColor.dispose(); borderColor = new Color( shell.getDisplay(), newColor ); wBorderColor.setBackground( borderColor ); } } );
public void widgetSelected( SelectionEvent e ) { ColorDialog cd = new ColorDialog( shell ); cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) ); cd.setRGB( wBackGroundColor.getBackground().getRGB() ); RGB newColor = cd.open(); if ( newColor == null ) { return; } bgColor.dispose(); bgColor = new Color( shell.getDisplay(), newColor ); wBackGroundColor.setBackground( bgColor ); refreshTextNote(); } } );
public void widgetSelected( SelectionEvent arg0 ) { ColorDialog cd = new ColorDialog( shell ); cd.setRGB( props.getBackgroundRGB() ); RGB newbg = cd.open(); if ( newbg != null ) { backgroundRGB = newbg; background.dispose(); background = new Color( display, backgroundRGB ); wBGColor.setBackground( background ); wBGColor.redraw(); } } } );
public void widgetSelected( SelectionEvent arg0 ) { ColorDialog cd = new ColorDialog( shell ); cd.setRGB( props.getGraphColorRGB() ); RGB newbg = cd.open(); if ( newbg != null ) { graphColorRGB = newbg; graphColor.dispose(); graphColor = new Color( display, graphColorRGB ); wGrColor.setBackground( graphColor ); wGrColor.redraw(); } } } );