This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 233141
Collapse All | Expand All

(-)db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java (-1 / +1 lines)
Lines 180-186 Link Here
180
                    "nb.dataview.tablecell.edited.selected.foreground"); //NOI18N
180
                    "nb.dataview.tablecell.edited.selected.foreground"); //NOI18N
181
            selectedForeground = selectedFgFromMngr != null
181
            selectedForeground = selectedFgFromMngr != null
182
                    ? selectedFgFromMngr
182
                    ? selectedFgFromMngr
183
                    : Color.ORANGE;
183
                    : new Color(229, 148, 0);
184
            Color unselectedFgFromMngr = UIManager.getColor(
184
            Color unselectedFgFromMngr = UIManager.getColor(
185
                    "nb.dataview.tablecell.edited.unselected.foreground"); //NOI18N
185
                    "nb.dataview.tablecell.edited.unselected.foreground"); //NOI18N
186
            unselectedForeground = unselectedFgFromMngr != null
186
            unselectedForeground = unselectedFgFromMngr != null
(-)db.dataview/src/org/netbeans/modules/db/dataview/table/CellFocusCustomRenderer.java (-6 / +9 lines)
Lines 45-58 Link Here
45
import java.awt.Color;
45
import java.awt.Color;
46
import java.awt.Component;
46
import java.awt.Component;
47
import javax.swing.JTable;
47
import javax.swing.JTable;
48
import javax.swing.UIManager;
48
import javax.swing.table.DefaultTableCellRenderer;
49
import javax.swing.table.DefaultTableCellRenderer;
49
50
50
/**
51
 *
52
 * @author Shankari
53
 */
54
public class CellFocusCustomRenderer extends DefaultTableCellRenderer {
51
public class CellFocusCustomRenderer extends DefaultTableCellRenderer {
55
52
53
    private final static Color selectedCellBackgroundMgr = UIManager.getColor(
54
            "nb.dataview.tablecell.focused"); //NOI18N
55
    private final static Color selectedCellBackground = selectedCellBackgroundMgr != null
56
            ? selectedCellBackgroundMgr
57
            : new Color(204,204,255);
58
56
    public CellFocusCustomRenderer() {       
59
    public CellFocusCustomRenderer() {       
57
        setOpaque(true);
60
        setOpaque(true);
58
    }
61
    }
Lines 61-68 Link Here
61
    public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row, int column) {
64
    public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row, int column) {
62
        super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
65
        super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
63
        if (hasFocus) {
66
        if (hasFocus) {
64
            setBackground(new Color(204,204,255));
67
            setBackground(selectedCellBackground);
65
            setForeground(Color.BLACK);
68
            setForeground(table.getForeground());
66
        } else if (isSelected) {
69
        } else if (isSelected) {
67
            setBackground(table.getSelectionBackground());
70
            setBackground(table.getSelectionBackground());
68
            setForeground(table.getSelectionForeground());
71
            setForeground(table.getSelectionForeground());
(-)db.dataview/src/org/netbeans/modules/db/dataview/table/ResultSetCellRenderer.java (-4 lines)
Lines 202-211 Link Here
202
        Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
202
        Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
203
        c.setFont(new Font(c.getFont().getFamily(), Font.ITALIC, 9));
203
        c.setFont(new Font(c.getFont().getFamily(), Font.ITALIC, 9));
204
        ((JLabel) c).setToolTipText(value.toString());
204
        ((JLabel) c).setToolTipText(value.toString());
205
        if (!isSelected) {
206
            c.setForeground(Color.DARK_GRAY);
207
        }
208
209
        return c;
205
        return c;
210
    }
206
    }
211
}
207
}

Return to bug 233141