private void applyColor ( final Symbol symbol ) { final RGB color = org.eclipse.scada.vi.ui.draw2d.primitives.Helper.makeColor ( symbol.getBackgroundColor () ); if ( color != null ) { this.canvas.setBackground ( this.manager.createColor ( color ) ); } }
private void applyColor ( final Symbol symbol ) { final RGB color = org.eclipse.scada.vi.ui.draw2d.primitives.Helper.makeColor ( symbol.getBackgroundColor () ); if ( color != null ) { this.canvas.setBackground ( this.manager.createColor ( color ) ); } }
/** * Creates the color for the specified key using the provided RGB object. * The color object will be returned and also put into the registry. When * the class is disposed, the color will be disposed with it. * * @param key * the unique color key * @param rgb * the RGB object * @return the allocated color object */ public Color createColor(String key, RGB rgb) { Color c = getResourceManager().createColor(rgb); Color prevC = colorRegistry.get(key); if (prevC != null && !prevC.isDisposed()) getResourceManager().destroyColor(prevC.getRGB()); colorRegistry.put(key, c); return c; }
/** * Creates the color for the specified key using the provided RGB object. * The color object will be returned and also put into the registry. When * the class is disposed, the color will be disposed with it. * * @param key * the unique color key * @param rgb * the RGB object * @return the allocated color object */ public Color createColor(String key, RGB rgb) { Color c = getResourceManager().createColor(rgb); Color prevC = colorRegistry.get(key); if (prevC != null && !prevC.isDisposed()) getResourceManager().destroyColor(prevC.getRGB()); colorRegistry.put(key, c); return c; }
IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { boldStyle = new TextStyle(boldFont, null, null); grayColor = resourceManager.createColor(ColorUtil.blend(table.getBackground().getRGB(), table.getForeground().getRGB())); } else {