|
Lines 1-5
Link Here
|
| 1 |
/****************************************************************************** |
1 |
/****************************************************************************** |
| 2 |
* Copyright (c) 2002, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2002, 2009 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 30-35
Link Here
|
| 30 |
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder; |
30 |
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder; |
| 31 |
import org.eclipse.swt.SWT; |
31 |
import org.eclipse.swt.SWT; |
| 32 |
import org.eclipse.swt.graphics.Path; |
32 |
import org.eclipse.swt.graphics.Path; |
|
|
33 |
import org.eclipse.swt.widgets.Display; |
| 33 |
|
34 |
|
| 34 |
/** |
35 |
/** |
| 35 |
* Base class that most shape figures should extend from to gain default connection anchor behavior. |
36 |
* Base class that most shape figures should extend from to gain default connection anchor behavior. |
|
Lines 353-358
Link Here
|
| 353 |
* @since 1.2 |
354 |
* @since 1.2 |
| 354 |
*/ |
355 |
*/ |
| 355 |
public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) { |
356 |
public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) { |
|
|
357 |
if (Display.getDefault().getHighContrast()) { |
| 358 |
setBackgroundColor(null); |
| 359 |
return; |
| 360 |
} |
| 356 |
boolean doRepaint = false; |
361 |
boolean doRepaint = false; |
| 357 |
if (gradientColor1 != this.gradientColor1 && gradientColor1 > -1) { |
362 |
if (gradientColor1 != this.gradientColor1 && gradientColor1 > -1) { |
| 358 |
this.gradientColor1 = gradientColor1; |
363 |
this.gradientColor1 = gradientColor1; |
|
Lines 378-384
Link Here
|
| 378 |
* @since 1.2 |
383 |
* @since 1.2 |
| 379 |
*/ |
384 |
*/ |
| 380 |
public boolean isUsingGradient() { |
385 |
public boolean isUsingGradient() { |
| 381 |
return isUsingGradient && gradientColor1 > -1 && gradientColor2 > -1; |
386 |
if (Display.getDefault().getHighContrast()) { |
|
|
387 |
return false; |
| 388 |
} else { |
| 389 |
return isUsingGradient && gradientColor1 > -1 && gradientColor2 > -1; |
| 390 |
} |
| 382 |
} |
391 |
} |
| 383 |
|
392 |
|
| 384 |
/** |
393 |
/** |