return;
}
- boolean drawBackground = true;
-
if (isSelected()) {
gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START);
gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
} else {
- if (table.isEnabled()) {
- drawBackground = false;
- } else {
- gc.setBackground(getDisplay().getSystemColor(
- SWT.COLOR_WIDGET_BACKGROUND));
- }
+ gc.setBackground(getDisplay().getSystemColor(
+ SWT.COLOR_WIDGET_BACKGROUND));
gc.setForeground(table.getForeground());
}
- if (drawBackground && isSelected()) {
- gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
- getBounds().width, getBounds().height, true);
- } else if (drawBackground) {
- gc.fillRectangle(getBounds().x, getBounds().y + 1,
- getBounds().width, getBounds().height);
- }
-
-// if (table.getLinesVisible()) {
-// if (isCellSelected()) {
-// gc.setForeground(ColorResources.TABLE_LINE);
-// } else {
-// gc.setForeground(ColorResources.TABLE_LINE);
-// }
-// gc.drawLine(getBounds().x, getBounds().y + getBounds().height,
-// getBounds().x + getBounds().width - 1, getBounds().y
-// + getBounds().height);
-// gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y,
-// getBounds().x + getBounds().width - 1, getBounds().y
-// + getBounds().height);
-// }
-
}
}
gc.setForeground(table.getForeground());
}
-// if (drawBackground && isSelected()) {
-// gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
-// getBounds().width, getBounds().height, true);
-// } else if (drawBackground) {
-// gc.fillRectangle(getBounds().x, getBounds().y + 1,
-// getBounds().width, getBounds().height);
-// }
+ if (drawBackground && isSelected()) {
+ gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
+ getBounds().width, getBounds().height, true);
+ } else if (drawBackground) {
+ gc.fillRectangle(getBounds().x, getBounds().y + 1,
+ getBounds().width, getBounds().height);
+ }
if (table.getLinesVisible()) {
if (isCellSelected()) {