public static void setTableItemLook( TableItem item, Display disp ) { if ( !Const.getOS().startsWith( "Windows" ) ) { return; } Color background = GUIResource.getInstance().getColorBackground(); if ( background != null ) { item.setBackground( background ); } }
private void updateRowFromBaseStep( StepInterface baseStep, TableItem row ) { StepStatus stepStatus = new StepStatus( baseStep ); String[] fields = stepStatus.getTransLogFields(); updateCellsIfChanged( fields, row ); // Error lines should appear in red: if ( baseStep.getErrors() > 0 ) { row.setBackground( GUIResource.getInstance().getColorRed() ); } else { row.setBackground( GUIResource.getInstance().getColorWhite() ); } }
java.util.List<KeyOccurrence> todo = getTodoList( selectedLocale, messagesPackage, sourceFolder, true ); if ( todo.size() > 50 ) { item.setBackground( GUIResource.getInstance().getColorRed() ); } else if ( todo.size() > 25 ) { item.setBackground( GUIResource.getInstance().getColorOrange() ); } else if ( todo.size() > 10 ) { item.setBackground( GUIResource.getInstance().getColorYellow() ); } else if ( todo.size() > 5 ) { item.setBackground( GUIResource.getInstance().getColorBlue() ); } else if ( todo.size() > 0 ) { item.setBackground( GUIResource.getInstance().getColorGreen() );
item.setBackground( 3, GUIResource.getInstance().getColorLightGray() );
item.setBackground( unusedColor );
break; ti.setBackground( col );
col = red; ti.setBackground( col );
item.setBackground( resource.getColorLightPentaho() ); if ( indexSelected < 0 ) { indexSelected = i;
item.setBackground( GUIResource.getInstance().getColorRed() ); } else if ( status != null && LogStatus.STOP.equals( status ) ) { item.setBackground( GUIResource.getInstance().getColorYellow() );
item.setBackground( GUIResource.getInstance().getColorRed() ); } else if ( status != null && LogStatus.STOP.equals( status ) ) { item.setBackground( GUIResource.getInstance().getColorYellow() );
item.setBackground( bg );
item.setForeground( GUIResource.getInstance().getColorBlack() ); if ( !item.getBackground().equals( GUIResource.getInstance().getColorRed() ) ) { item.setBackground( i % 2 == 0 ? GUIResource.getInstance().getColorWhite()
item.setBackground( 2, GUIResource.getInstance().getColorLightGray() );
@Override public void setBackground(int columnIndex, Color color) { item.setBackground(columnIndex, color); }
@Override public void setBackground(int columnIndex, Color color) { item.setBackground(columnIndex, color); }
public void setBackground(int columnIndex, Color color) { item.setBackground(columnIndex, color); }
public void doUpdateItem(Widget widget, Object element, boolean fullMap) { if (color == null) return; if (widget instanceof TableItem) { TableItem item = (TableItem) widget; if (element instanceof String) { item.setBackground(color); } else item.setBackground(null); } super.doUpdateItem(widget, element, fullMap); } }
/** * Sets the background color of the Row 0 TableItem in column 1. */ void setCellBackground () { if (!instance.startup) { table1.getItem (0).setBackground (1, cellBackgroundColor); } /* Set the background color item's image to match the background color of the cell. */ Color color = cellBackgroundColor; if (color == null) color = table1.getItem (0).getBackground (1); TableItem item = colorAndFontTable.getItem(CELL_BACKGROUND_COLOR); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (colorImage(color)); }
/** * Sets the background color of TableItem [0]. */ void setItemBackground () { if (!instance.startup) { table1.getItem (0).setBackground (itemBackgroundColor); } /* Set the background color item's image to match the background color of the item. */ Color color = itemBackgroundColor; if (color == null) color = table1.getItem (0).getBackground (); TableItem item = colorAndFontTable.getItem(ITEM_BACKGROUND_COLOR); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (colorImage(color)); }
private void colorItems() { TableItem[] items = table.getItems(); for(int i = 0 ; i < items.length ; i++) { TableItem item = items[i]; Object object = item.getData(); if(!(object instanceof RulePreferenceData)) { return; } RulePreferenceData data = (RulePreferenceData)item.getData(); item.setBackground(new Color(Display.getDefault(),data.getBackgroundColor())); item.setForeground(new Color(Display.getDefault(),data.getForegroundColor())); } } }