@VisibleForTesting boolean isDisplayingNullValue( TableItem item, int column ) throws KettleException { return GUIResource.getInstance().getColorBlue().equals( item.getForeground( column ) ); }
TableItem item = table.getItem( i ); item.setForeground( GUIResource.getInstance().getColorBlack() ); if ( !item.getBackground().equals( GUIResource.getInstance().getColorRed() ) ) { item.setBackground( i % 2 == 0
/** Simplify testing for color equality */ public static boolean equals(Color c1, Color c2) { if (c1 == c2) { return true; } if (c1 == null || c2 == null) { return false; } return c1.equals(c2); }
/** * Sets the color to used to decorate input in the associated console. * * @param newColor the color to used to decorate input in the associated console. */ public void setColor(Color newColor) { Color old = color; if (old == null || !old.equals(newColor)) { color = newColor; console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor); } }
/** * Sets default color for tab label text */ public void setDefaultTextColor() { if (!this.textColor.equals(widgetForeground)) { this.textColor = widgetForeground; redraw(); } }
/** * Sets the color to used to decorate input in the associated console. * * @param newColor the color to used to decorate input in the associated console. */ public void setColor(Color newColor) { Color old = color; if (old == null || !old.equals(newColor)) { color = newColor; console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor); } }
/** * Sets the color of this stream. Use <code>null</code> to indicate * the default color. * * @param newColor color of this stream, or <code>null</code> */ public void setColor(Color newColor) { Color old = color; if (old == null || !old.equals(newColor)) { color = newColor; console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor); } }
@Override public boolean equals(Object o) { return super.equals(o) && color.equals(((SWTLane)o).color); }
/** * Sets color to be used for drawing tab label text. The caller is * responsible for managing the color's resources and disposing it * appropriately after setDefaultTextColor() is later invoked. * * @param textColor */ public void setTextColor(Color textColor) { if (textColor != null && !this.textColor.equals(textColor)) { this.textColor = textColor; redraw(); } }
@Override public void paintControl(PaintEvent arg0) { Color current_bg = textWidget.getBackground(); if (!current_bg.equals(existing_bg)) { existing_bg = current_bg; cBubble.redraw(); } } });
/** * Checks if is local item. * * @param item the item * @return true, if is local item */ // ******************************** protected boolean isLocalItem(TableTreeItem item) { return !item.getForeground().equals(editor.getFadeColor()); }
Color getInterpolatedColor(Color color1, Color color2, float color1Likeness) { if (color1.equals(color2)) return color1; if (color1Likeness == 1.0) return color1; if (color1Likeness == 0.0) return color2; return new Color(Display.getDefault(), getInterpolatedRGB(color1, color2, color1Likeness)); } }
@Override void setForeground( Color color ) { if( !foreground.equals( color ) ) { GCOperation operation = new SetProperty( SetProperty.FOREGROUND, color.getRGB() ); addGCOperation( operation ); } foreground = color; }
Color getInterpolatedColor(Color color1, Color color2, float color1Likeness) { if (color1.equals(color2)) return color1; if (color1Likeness == 1.0) return color1; if (color1Likeness == 0.0) return color2; return new Color(Display.getDefault(), getInterpolatedRGB(color1, color2, color1Likeness)); } }
@Override void setBackground( Color color ) { if( !background.equals( color ) ) { GCOperation operation = new SetProperty( SetProperty.BACKGROUND, color.getRGB() ); addGCOperation( operation ); } background = color; }
public void setScrollBarForegroundColor(Color newColor) { Color currForegroundColor = fScrollBarSettings.getForegroundColor(); if (currForegroundColor != null && currForegroundColor.equals(newColor)) { // No need to reset if the color is still the same. return; } fScrollBarSettings.setForegroundColor(newColor); this.fPainter.redrawScrollBars(); }
public void setScrollBarBackgroundColor(Color newColor) { Color currBackgroundColor = fScrollBarSettings.getBackgroundColor(); if (currBackgroundColor != null && currBackgroundColor.equals(newColor)) { // No need to reset if the color is still the same. return; } fScrollBarSettings.setBackgroundColor(newColor); this.fPainter.redrawScrollBars(); }
Color getInterpolatedColor(Color color1, Color color2, float color1Likeness) { if (color1.equals(color2)) return color1; if (color1Likeness == 1.0) return color1; if (color1Likeness == 0.0) return color2; return new Color(Display.getDefault(), getInterpolatedRGB(color1, color2, color1Likeness)); } }