/** * Set the foreground color. * * @param color the new foreground color */ public void setSelectionForeground(Color color) { Color oldVal = this.getSelectionForeground(); setAttribute(SELECTOR_SELECTED, CSSProperty.COLOR, CSSStyleSheet.getAttribute(color)); propertyChangeSupport.firePropertyChange("selectionForeground", oldVal, this.getSelectionForeground()); }
/** * {@inheritDoc} */ public SComponent getTableCellRendererComponent(STable table, Object value, boolean isSelected, int row, int column) { if (isSelected) { super.setForeground(table.getSelectionForeground()); super.setBackground(table.getSelectionBackground()); } else { super.setForeground(table.getForeground()); WingsUtil.alternateEvenOddBackground(this, table, isSelected, row); } if (value instanceof IValueConnector) { Object connectorValue = ((IValueConnector) value).getConnectorValue(); setSelected((connectorValue != null && ((Boolean) connectorValue) .booleanValue())); } else { setSelected((value != null && ((Boolean) value).booleanValue())); } if (table.isCellEditable(row, column)) { setEnabled(true); } else { setEnabled(false); } return this; }
boolean isSelected, int row, int column) { if (isSelected) { super.setForeground(table.getSelectionForeground()); super.setBackground(table.getSelectionBackground()); } else {