/** * Create a new managed color by using the Red Green & Blue values. * * @param display * @param rgb */ public ManagedColor( Display display, RGB rgb ) { this.color = new Color( display, rgb ); this.systemColor = false; }
/** * Create a new managed color by using the Red Green & Blue values. * * @param display * @param r * Red composite * @param g * Green composite * @param b * Blue composite */ public ManagedColor( Display display, int r, int g, int b ) { this.color = new Color( display, r, g, b ); this.systemColor = false; }
public Color getColor( int red, int green, int blue ) { RGB rgb = new RGB( red, green, blue ); Color color = colorMap.get( rgb ); if ( color == null ) { color = new Color( display, rgb ); colorMap.put( rgb, color ); } return color; }
private Color getDisabledColor() { Device device = Display.getCurrent(); return new Color( device, 188, 188, 188 ); }
private Color getDisabledColor() { Device device = Display.getCurrent(); return new Color( device, 188, 188, 188 ); }
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 handleEvent( Event event ) { StyleRange style1 = new StyleRange(); style1.start = 0; style1.length = 4; style1.underline = false; helpLabel.setStyleRange( style1 ); helpLabel.setForeground( new Color( display, 0, 94, 170 ) ); } } );
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 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 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 getData() { fixedFontData = props.getFixedFont(); fixedFont = new Font( display, fixedFontData ); graphFontData = props.getGraphFont(); graphFont = new Font( display, graphFontData ); noteFontData = props.getNoteFont(); noteFont = new Font( display, noteFontData ); backgroundRGB = props.getBackgroundRGB(); if ( backgroundRGB == null ) { backgroundRGB = display.getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ).getRGB(); } background = new Color( display, backgroundRGB ); graphColorRGB = props.getGraphColorRGB(); graphColor = new Color( display, graphColorRGB ); tabColorRGB = props.getTabColorRGB(); tabColor = new Color( display, tabColorRGB ); }
public void handleEvent( Event event ) { StyleRange style1 = new StyleRange(); style1.start = 0; style1.length = 4; style1.underline = true; helpLabel.setStyleRange( style1 ); helpLabel.setForeground( new Color( display, 0, 0, 0 ) ); helpLabel.setCursor( new Cursor( display, SWT.CURSOR_HAND ) ); } } );
private void drawVersionWarning( GC gc, Display display ) { gc.setBackground( versionWarningBackgroundColor ); gc.setForeground( new Color( display, 65, 65, 65 ) ); // gc.fillRectangle(290, 231, 367, 49); // gc.drawRectangle(290, 231, 367, 49); gc.drawImage( exclamation_image, 304, 243 ); gc.setFont( devWarningFont ); gc.drawText( BaseMessages.getString( PKG, "SplashDialog.DevelopmentWarning" ), 335, 241, true ); }
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 e ) { ColorDialog cd = new ColorDialog( shell ); cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) ); cd.setRGB( wFontColor.getBackground().getRGB() ); RGB newColor = cd.open(); if ( newColor == null ) { return; } fontColor.dispose(); fontColor = new Color( shell.getDisplay(), newColor ); wFontColor.setBackground( fontColor ); 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(); } } } );
public void widgetSelected( SelectionEvent arg0 ) { ColorDialog cd = new ColorDialog( shell ); cd.setRGB( props.getTabColorRGB() ); RGB newbg = cd.open(); if ( newbg != null ) { tabColorRGB = newbg; tabColor.dispose(); tabColor = new Color( display, tabColorRGB ); wTabColor.setBackground( tabColor ); wTabColor.redraw(); } } } );