@VisibleForTesting boolean isDisplayingNullValue( TableItem item, int column ) throws KettleException { return GUIResource.getInstance().getColorBlue().equals( item.getForeground( column ) ); }
if ( GUIResource.getInstance().getColorBlue().equals( item.getForeground( j ) ) ) { data = null;
@Override public Color getForeground(int columnIndex) { return item.getForeground(columnIndex); }
@Override public Color getForeground(int columnIndex) { return item.getForeground(columnIndex); }
public Color getForeground(int columnIndex) { return item.getForeground(columnIndex); }
/** * * Returns the foreground color at the given column index in the receiver. * * @param index the column index * @return the foreground color * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.0 */ public Color getForeground (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); int count = Math.max (1, parent.columnCount); if (0 > index || index > count -1) return getForeground (); if (cellForeground == null || cellForeground [index] == null) return getForeground (); return cellForeground [index]; }
/** * * Returns the foreground color at the given column index in the receiver. * * @param index the column index * @return the foreground color * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.0 */ public Color getForeground (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count -1) return getForeground (); int pixel = cellForeground != null ? cellForeground [index] : -1; return pixel == -1 ? getForeground () : Color.win32_new (display, pixel); }
/** * * Returns the foreground color at the given column index in the receiver. * * @param index the column index * @return the foreground color * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public Color getForeground( int index ) { checkWidget(); if( !parent.checkData( this, parent.indexOf( this ) ) ) { error( SWT.ERROR_WIDGET_DISPOSED ); } Color result = getForeground(); if( hasData( index ) && data[ index ].foreground != null ) { result = data[ index ].foreground; } return result; }
/** * Sets the foreground color of the Row 0 TableItem in column 1. */ void setCellForeground () { if (!instance.startup) { table1.getItem (0).setForeground (1, cellForegroundColor); } /* Set the foreground color item's image to match the foreground color of the cell. */ Color color = cellForegroundColor; if (color == null) color = table1.getItem (0).getForeground (1); TableItem item = colorAndFontTable.getItem(CELL_FOREGROUND_COLOR); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (colorImage(color)); }
/** * Sets the foreground color of TableItem [0]. */ void setItemForeground () { if (!instance.startup) { table1.getItem (0).setForeground (itemForegroundColor); } /* Set the foreground color item's image to match the foreground color of the item. */ Color color = itemForegroundColor; if (color == null) color = table1.getItem (0).getForeground (); TableItem item = colorAndFontTable.getItem(ITEM_FOREGROUND_COLOR); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (colorImage(color)); }
Color foreground= item.getForeground(index); gc.setForeground(foreground);
Color foreground= item.getForeground(index); gc.setForeground(foreground);
gc.setBackground (selectionBackground); } else { fg = item.getForeground (columnIndex); gc.setBackground (item.getBackground (columnIndex)); userForeground = item.getForeground (columnIndex); gc.setBackground (selectionBackground); } else { gc.setForeground (userForeground != null ? userForeground : item.getForeground (columnIndex)); gc.setBackground (item.getBackground (columnIndex));
case ITEM_FOREGROUND_COLOR: { Color oldColor = itemForegroundColor; if (oldColor == null) oldColor = table1.getItem (0).getForeground (); colorDialog.setRGB(oldColor.getRGB()); RGB rgb = colorDialog.open(); case CELL_FOREGROUND_COLOR: { Color oldColor = cellForegroundColor; if (oldColor == null) oldColor = table1.getItem (0).getForeground (1); colorDialog.setRGB(oldColor.getRGB()); RGB rgb = colorDialog.open();
} else { gc.setBackground (item.getBackground (columnIndex)); gc.setForeground (item.getForeground (columnIndex)); } else { gc.setBackground (item.getBackground (columnIndex)); Color foreground = drawForeground != null ? Color.gtk_new (display, drawForeground) : item.getForeground (columnIndex); gc.setForeground (foreground);
} else { gc.setBackground (item.getBackground (columnIndex)); gc.setForeground (item.getForeground (columnIndex)); } else { gc.setBackground (item.getBackground (columnIndex)); Color foreground = drawForeground != null ? Color.gtk_new (display, drawForeground) : item.getForeground (columnIndex); gc.setForeground (foreground);
} else { gc.setBackground (item.getBackground (columnIndex)); gc.setForeground (item.getForeground (columnIndex)); } else { gc.setBackground (item.getBackground (columnIndex)); Color foreground = drawForeground != null ? Color.gtk_new (display, drawForeground) : item.getForeground (columnIndex); gc.setForeground (foreground);