Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2012-10-19 19:56:52 +0000
committerVivian Kong2012-10-19 19:56:52 +0000
commit02e5e8245e27bd33c481181078c923eaa7ae0542 (patch)
tree412843788710268aab8b6b9c666017b8b0ad24a1
parentfbe2900185547360ef0421a0a4371300824844bf (diff)
downloadorg.eclipse.ptp-ptp_4_2.tar.gz
org.eclipse.ptp-ptp_4_2.tar.xz
org.eclipse.ptp-ptp_4_2.zip
Bug 392486 - Remote Printing page does not work with high contrast modeptp_4_2
-rw-r--r--rdt/org.eclipse.ptp.rdt.editor/src/org/eclipse/ptp/internal/rdt/editor/preferences/HeaderFooterFieldEditor.java32
1 files changed, 19 insertions, 13 deletions
diff --git a/rdt/org.eclipse.ptp.rdt.editor/src/org/eclipse/ptp/internal/rdt/editor/preferences/HeaderFooterFieldEditor.java b/rdt/org.eclipse.ptp.rdt.editor/src/org/eclipse/ptp/internal/rdt/editor/preferences/HeaderFooterFieldEditor.java
index a9038b2be..e1ef90d37 100644
--- a/rdt/org.eclipse.ptp.rdt.editor/src/org/eclipse/ptp/internal/rdt/editor/preferences/HeaderFooterFieldEditor.java
+++ b/rdt/org.eclipse.ptp.rdt.editor/src/org/eclipse/ptp/internal/rdt/editor/preferences/HeaderFooterFieldEditor.java
@@ -9,7 +9,6 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.ptp.internal.rdt.editor.preferences;
import org.eclipse.jface.preference.FieldEditor;
@@ -24,9 +23,8 @@ import org.eclipse.swt.widgets.Text;
/**
* A field editor for a header and footer on a page.
- *
* @author batthish
- */
+ */
public class HeaderFooterFieldEditor extends FieldEditor {
private Composite _composite;
@@ -40,7 +38,6 @@ public class HeaderFooterFieldEditor extends FieldEditor {
/**
* The constructor
- *
* @param parent the parent composite
*/
public HeaderFooterFieldEditor(Composite parent) {
@@ -58,7 +55,7 @@ public class HeaderFooterFieldEditor extends FieldEditor {
GridData gd = (GridData) _composite.getLayoutData();
gd.horizontalSpan = columns - 1;
gd = (GridData) _spacer.getLayoutData();
- gd.horizontalSpan = columns ;
+ gd.horizontalSpan = columns;
}
}
@@ -111,41 +108,50 @@ public class HeaderFooterFieldEditor extends FieldEditor {
Composite page = new Composite(_composite, SWT.BORDER);
gl = new GridLayout(3, true);
page.setLayout(gl);
- page.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ Boolean highContrast = Display.getDefault().getHighContrast();
+ if (!highContrast)
+ page.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 3;
page.setLayoutData(gd);
hLeft = new Text(page, SWT.BORDER | SWT.LEFT);
hLeft.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- hLeft.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ hLeft.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(hLeft);
hCenter = new Text(page, SWT.BORDER | SWT.CENTER);
hCenter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- hCenter.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ hCenter.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(hCenter);
hRight = new Text(page, SWT.BORDER | SWT.RIGHT);
hRight.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- hRight.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ hRight.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(hRight);
spacer = new Label(page, SWT.NONE);
gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 3;
- spacer.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ spacer.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
spacer.setLayoutData(gd);
fLeft = new Text(page, SWT.BORDER | SWT.LEFT);
fLeft.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fLeft.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ fLeft.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(fLeft);
fCenter = new Text(page, SWT.BORDER | SWT.CENTER);
fCenter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fCenter.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ fCenter.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(fCenter);
fRight = new Text(page, SWT.BORDER | SWT.RIGHT);
fRight.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fRight.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ if (!highContrast)
+ fRight.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
new HeaderFooterContentProposalAdapter(fRight);
}

Back to the top