Replace static usage that are not valid in RAP
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/AbstractLabeledBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/AbstractLabeledBorder.java
index 1c3d36f..7073fba 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/AbstractLabeledBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/AbstractLabeledBorder.java
@@ -26,7 +26,7 @@
private Dimension textExtents;
private String label;
private Insets insets;
- private Color textColor = ColorConstants.black;
+ private Color textColor ;
private Font font;
/**
@@ -36,6 +36,7 @@
* @since 2.0
*/
public AbstractLabeledBorder() {
+ textColor = ColorConstants.black();
String className = getClass().getName();
setLabel(className.substring(className.lastIndexOf('.') + 1,
className.length()));
@@ -49,6 +50,7 @@
* @since 2.0
*/
public AbstractLabeledBorder(String s) {
+ textColor = ColorConstants.black();
setLabel(s);
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ArrowButton.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ArrowButton.java
index cb1c6c3..fb8913d 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ArrowButton.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ArrowButton.java
@@ -54,8 +54,8 @@
protected void createTriangle() {
Triangle tri = new Triangle();
tri.setOutline(true);
- tri.setBackgroundColor(ColorConstants.listForeground);
- tri.setForegroundColor(ColorConstants.listForeground);
+ tri.setBackgroundColor(ColorConstants.listForeground());
+ tri.setForegroundColor(ColorConstants.listForeground());
tri.setBorder(new MarginBorder(new Insets(2)));
setContents(tri);
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Button.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Button.java
index fa87c8b..af7d2fd 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Button.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Button.java
@@ -71,7 +71,7 @@
*/
protected void init() {
super.init();
- setBackgroundColor(ColorConstants.button);
+ setBackgroundColor(ColorConstants.button());
}
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ButtonBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ButtonBorder.java
index 235e98a..8cb873f 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ButtonBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ButtonBorder.java
@@ -31,27 +31,27 @@
*
* @see SCHEMES#BUTTON
*/
- public static final Border BUTTON = new ButtonBorder(SCHEMES.BUTTON);
+ public static final Border BUTTON() { return new ButtonBorder(SCHEMES.BUTTON());}
/**
* Inverted hightlight colors from BUTTON.
*
* @see SCHEMES#BUTTON_CONTRAST
*/
- public static final Border BUTTON_CONTRAST = new ButtonBorder(
- SCHEMES.BUTTON_CONTRAST);
+ public static final Border BUTTON_CONTRAST() { return new ButtonBorder(
+ SCHEMES.BUTTON_CONTRAST());}
/**
* Used for scrollbar buttons.
*
* @see SCHEMES#BUTTON_SCROLLBAR
*/
- public static final Border BUTTON_SCROLLBAR = new ButtonBorder(
- SCHEMES.BUTTON_SCROLLBAR);
+ public static final Border BUTTON_SCROLLBAR() { return new ButtonBorder(
+ SCHEMES.BUTTON_SCROLLBAR());}
/**
* Used for toolbar buttons.
*
* @see SCHEMES#TOOLBAR
*/
- public static final Border TOOLBAR = new ButtonBorder(SCHEMES.TOOLBAR);
+ public static final Border TOOLBAR() { return new ButtonBorder(SCHEMES.TOOLBAR());}
/**
* Provides for a scheme to represent the borders of clickable figures like
@@ -183,29 +183,29 @@
/**
* Interface defining commonly used schemes for the ButtonBorder.
*/
- public static interface SCHEMES {
+ public static class SCHEMES {
/**
* Contrast button scheme
*/
- ButtonScheme BUTTON_CONTRAST = new ButtonScheme(new Color[] { button,
- buttonLightest }, DARKEST_DARKER);
+ public static ButtonScheme BUTTON_CONTRAST() { return new ButtonScheme(new Color[] { ColorConstants.button(),
+ ColorConstants.buttonLightest() }, DARKEST_DARKER());}
/**
* Regular button scheme
*/
- ButtonScheme BUTTON = new ButtonScheme(new Color[] { buttonLightest },
- DARKEST_DARKER);
+ public static ButtonScheme BUTTON() { return new ButtonScheme(new Color[] { ColorConstants.buttonLightest() },
+ DARKEST_DARKER());}
/**
* Toolbar button scheme
*/
- ButtonScheme TOOLBAR = new ButtonScheme(new Color[] { buttonLightest },
- new Color[] { buttonDarker });
+ public static ButtonScheme TOOLBAR() { return new ButtonScheme(new Color[] { ColorConstants.buttonLightest() },
+ new Color[] { ColorConstants.buttonDarker() });}
/**
* Scrollbar button scheme
*/
- ButtonScheme BUTTON_SCROLLBAR = new ButtonScheme(new Color[] { button,
- buttonLightest }, DARKEST_DARKER, new Color[] { buttonDarker },
- new Color[] { buttonDarker });
+ public static ButtonScheme BUTTON_SCROLLBAR() { return new ButtonScheme(new Color[] { ColorConstants.button(),
+ ColorConstants.buttonLightest() }, DARKEST_DARKER(), new Color[] { ColorConstants.buttonDarker() },
+ new Color[] { ColorConstants.buttonDarker() });}
}
/**
@@ -215,7 +215,7 @@
* @since 2.0
*/
public ButtonBorder() {
- setScheme(SCHEMES.BUTTON);
+ setScheme(SCHEMES.BUTTON());
}
/**
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Clickable.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Clickable.java
index 9b0e8e9..8e0b711 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Clickable.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Clickable.java
@@ -309,8 +309,8 @@
protected void paintBorder(Graphics graphics) {
super.paintBorder(graphics);
if (hasFocus()) {
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
Rectangle area = getClientArea();
if (isStyle(STYLE_BUTTON))
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ColorConstants.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ColorConstants.java
index 5048642..f8e376d 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ColorConstants.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ColorConstants.java
@@ -18,155 +18,187 @@
/**
* A collection of color-related constants.
*/
-public interface ColorConstants {
+//[RAP AM] remove statics
+public class ColorConstants {
- class SystemColorFactory {
- private static Color getColor(final int which) {
- Display display = Display.getCurrent();
- if (display != null)
- return display.getSystemColor(which);
- display = Display.getDefault();
- final Color result[] = new Color[1];
- display.syncExec(new Runnable() {
- public void run() {
- synchronized (result) {
- result[0] = Display.getCurrent().getSystemColor(which);
- }
- }
- });
- synchronized (result) {
- return result[0];
- }
- }
- }
+ static class SystemColorFactory {
+ private static Color getColor(final int which) {
+ Display display = Display.getCurrent();
+ if (display != null)
+ return display.getSystemColor(which);
+ display = Display.getDefault();
+ final Color result[] = new Color[1];
+ display.syncExec(new Runnable() {
+ public void run() {
+ synchronized (result) {
+ result[0] = Display.getCurrent().getSystemColor(which);
+ }
+ }
+ });
+ synchronized (result) {
+ return result[0];
+ }
+ }
+ }
- /**
- * @see SWT#COLOR_WIDGET_HIGHLIGHT_SHADOW
- */
- Color buttonLightest = SystemColorFactory
- .getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW);
- /**
- * @see SWT#COLOR_WIDGET_BACKGROUND
- */
- Color button = SystemColorFactory.getColor(SWT.COLOR_WIDGET_BACKGROUND);
- /**
- * @see SWT#COLOR_WIDGET_NORMAL_SHADOW
- */
- Color buttonDarker = SystemColorFactory
- .getColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- /**
- * @see SWT#COLOR_WIDGET_DARK_SHADOW
- */
- Color buttonDarkest = SystemColorFactory
- .getColor(SWT.COLOR_WIDGET_DARK_SHADOW);
+ /**
+ * @see SWT#COLOR_WIDGET_HIGHLIGHT_SHADOW
+ */
+ public static Color buttonLightest() { return SystemColorFactory
+ .getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW);
+ }
+ /**
+ * @see SWT#COLOR_WIDGET_BACKGROUND
+ */
+ public static Color button() { return SystemColorFactory.getColor(SWT.COLOR_WIDGET_BACKGROUND);}
+ /**
+ * @see SWT#COLOR_WIDGET_NORMAL_SHADOW
+ */
+ public static Color buttonDarker() { return SystemColorFactory
+ .getColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
+ }
+ /**
+ * @see SWT#COLOR_WIDGET_DARK_SHADOW
+ */
+ public static Color buttonDarkest() { return SystemColorFactory
+ .getColor(SWT.COLOR_WIDGET_DARK_SHADOW);
+ }
- /**
- * @see SWT#COLOR_LIST_BACKGROUND
- */
- Color listBackground = SystemColorFactory
- .getColor(SWT.COLOR_LIST_BACKGROUND);
- /**
- * @see SWT#COLOR_LIST_FOREGROUND
- */
- Color listForeground = SystemColorFactory
- .getColor(SWT.COLOR_LIST_FOREGROUND);
+ /**
+ * @see SWT#COLOR_LIST_BACKGROUND
+ */
+ public static Color listBackground() { return SystemColorFactory
+ .getColor(SWT.COLOR_LIST_BACKGROUND);
+ }
+ /**
+ * @see SWT#COLOR_LIST_FOREGROUND
+ */
+ public static Color listForeground() { return SystemColorFactory
+ .getColor(SWT.COLOR_LIST_FOREGROUND);
+ }
- /**
- * @see SWT#COLOR_WIDGET_BACKGROUND
- */
- Color menuBackground = SystemColorFactory
- .getColor(SWT.COLOR_WIDGET_BACKGROUND);
- /**
- * @see SWT#COLOR_WIDGET_FOREGROUND
- */
- Color menuForeground = SystemColorFactory
- .getColor(SWT.COLOR_WIDGET_FOREGROUND);
- /**
- * @see SWT#COLOR_LIST_SELECTION
- */
- Color menuBackgroundSelected = SystemColorFactory
- .getColor(SWT.COLOR_LIST_SELECTION);
- /**
- * @see SWT#COLOR_LIST_SELECTION_TEXT
- */
- Color menuForegroundSelected = SystemColorFactory
- .getColor(SWT.COLOR_LIST_SELECTION_TEXT);
+ /**
+ * @see SWT#COLOR_WIDGET_BACKGROUND
+ */
+ public static Color menuBackground() { return SystemColorFactory
+ .getColor(SWT.COLOR_WIDGET_BACKGROUND);
+ }
+ /**
+ * @see SWT#COLOR_WIDGET_FOREGROUND
+ */
+ public static Color menuForeground() { return SystemColorFactory
+ .getColor(SWT.COLOR_WIDGET_FOREGROUND);
+ }
+ /**
+ * @see SWT#COLOR_LIST_SELECTION
+ */
+ public static Color menuBackgroundSelected() { return SystemColorFactory
+ .getColor(SWT.COLOR_LIST_SELECTION);
+ }
+ /**
+ * @see SWT#COLOR_LIST_SELECTION_TEXT
+ */
+ public static Color menuForegroundSelected() { return SystemColorFactory
+ .getColor(SWT.COLOR_LIST_SELECTION_TEXT);
+ }
- /**
- * @see SWT#COLOR_TITLE_BACKGROUND
- */
- Color titleBackground = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_BACKGROUND);
- /**
- * @see SWT#COLOR_TITLE_BACKGROUND_GRADIENT
- */
- Color titleGradient = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
- /**
- * @see SWT#COLOR_TITLE_FOREGROUND
- */
- Color titleForeground = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_FOREGROUND);
- /**
- * @see SWT#COLOR_TITLE_INACTIVE_FOREGROUND
- */
- Color titleInactiveForeground = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND);
- /**
- * @see SWT#COLOR_TITLE_INACTIVE_BACKGROUND
- */
- Color titleInactiveBackground = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND);
- /**
- * @see SWT#COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT
- */
- Color titleInactiveGradient = SystemColorFactory
- .getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT);
+ /**
+ * @see SWT#COLOR_TITLE_BACKGROUND
+ */
+ public static Color titleBackground() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_BACKGROUND);
+ }
+ /**
+ * @see SWT#COLOR_TITLE_BACKGROUND_GRADIENT
+ */
+ public static Color titleGradient() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
+ }
+ /**
+ * @see SWT#COLOR_TITLE_FOREGROUND
+ */
+ public static Color titleForeground() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_FOREGROUND);
+ }
+ /**
+ * @see SWT#COLOR_TITLE_INACTIVE_FOREGROUND
+ */
+ public static Color titleInactiveForeground() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND);
+ }
+ /**
+ * @see SWT#COLOR_TITLE_INACTIVE_BACKGROUND
+ */
+ public static Color titleInactiveBackground() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND);
+ }
+ /**
+ * @see SWT#COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT
+ */
+ public static Color titleInactiveGradient() { return SystemColorFactory
+ .getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT);
+ }
- /**
- * @see SWT#COLOR_INFO_FOREGROUND
- */
- Color tooltipForeground = SystemColorFactory
- .getColor(SWT.COLOR_INFO_FOREGROUND);
- /**
- * @see SWT#COLOR_INFO_BACKGROUND
- */
- Color tooltipBackground = SystemColorFactory
- .getColor(SWT.COLOR_INFO_BACKGROUND);
+ /**
+ * @see SWT#COLOR_INFO_FOREGROUND
+ */
+ public static Color tooltipForeground() { return SystemColorFactory
+ .getColor(SWT.COLOR_INFO_FOREGROUND);
+ }
+ /**
+ * @see SWT#COLOR_INFO_BACKGROUND
+ */
+ public static Color tooltipBackground() { return SystemColorFactory
+ .getColor(SWT.COLOR_INFO_BACKGROUND);
+ }
- /*
- * Misc. colors
- */
- //[RAP AM] remove statics
- /** One of the pre-defined colors */
- Color white = ColorUtil.getColor(255);//new Color(null, 255, 255, 255);
- /** One of the pre-defined colors */
- Color lightGray = ColorUtil.getColor(192);//new Color(null, 192, 192, 192);
- /** One of the pre-defined colors */
- Color gray = ColorUtil.getColor(128);//new Color(null, 128, 128, 128);
- /** One of the pre-defined colors */
- Color darkGray = ColorUtil.getColor(64);//new Color(null, 64, 64, 64);
- /** One of the pre-defined colors */
- Color black = ColorUtil.getColor(0);//new Color(null, 0, 0, 0);
- /** One of the pre-defined colors */
- Color red = ColorUtil.getColor(255,0,0);//new Color(null, 255, 0, 0);
- /** One of the pre-defined colors */
- Color orange = ColorUtil.getColor(255,196,0);//new Color(null, 255, 196, 0);
- /** One of the pre-defined colors */
- Color yellow = ColorUtil.getColor(255,255,0);//new Color(null, 255, 255, 0);
- /** One of the pre-defined colors */
- Color green = ColorUtil.getColor(0,255,0);//new Color(null, 0, 255, 0);
- /** One of the pre-defined colors */
- Color lightGreen = ColorUtil.getColor(96,255,96);//new Color(null, 96, 255, 96);
- /** One of the pre-defined colors */
- Color darkGreen = ColorUtil.getColor(0,127,0);//new Color(null, 0, 127, 0);
- /** One of the pre-defined colors */
- Color cyan = ColorUtil.getColor(0,255,255);//new Color(null, 0, 255, 255);
- /** One of the pre-defined colors */
- Color lightBlue = ColorUtil.getColor(127,127,255);//new Color(null, 127, 127, 255);
- /** One of the pre-defined colors */
- Color blue = ColorUtil.getColor(0,0,255);//new Color(null, 0, 0, 255);
- /** One of the pre-defined colors */
- Color darkBlue = ColorUtil.getColor(0,0,127);//new Color(null, 0, 0, 127);
+ /*
+ * Misc. colors
+ */
+ /** One of the pre-defined colors */
+ public static Color white() { return ColorUtil.getColor(255);//new Color(null, 255, 255, 255);
+ }
+ /** One of the pre-defined colors */
+ public static Color lightGray() { return ColorUtil.getColor(192);//new Color(null, 192, 192, 192);
+ }
+ /** One of the pre-defined colors */
+ public static Color gray() { return ColorUtil.getColor(128);//new Color(null, 128, 128, 128);
+ }
+ /** One of the pre-defined colors */
+ public static Color darkGray() { return ColorUtil.getColor(64);//new Color(null, 64, 64, 64);
+ }
+ /** One of the pre-defined colors */
+ public static Color black() { return ColorUtil.getColor(0);//new Color(null, 0, 0, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color red() { return ColorUtil.getColor(255,0,0);//new Color(null, 255, 0, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color orange() { return ColorUtil.getColor(255,196,0);//new Color(null, 255, 196, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color yellow() { return ColorUtil.getColor(255,255,0);//new Color(null, 255, 255, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color green() { return ColorUtil.getColor(0,255,0);//new Color(null, 0, 255, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color lightGreen() { return ColorUtil.getColor(96,255,96);//new Color(null, 96, 255, 96);
+ }
+ /** One of the pre-defined colors */
+ public static Color darkGreen() { return ColorUtil.getColor(0,127,0);//new Color(null, 0, 127, 0);
+ }
+ /** One of the pre-defined colors */
+ public static Color cyan() { return ColorUtil.getColor(0,255,255);//new Color(null, 0, 255, 255);
+ }
+ /** One of the pre-defined colors */
+ public static Color lightBlue() { return ColorUtil.getColor(127,127,255);//new Color(null, 127, 127, 255);
+ }
+ /** One of the pre-defined colors */
+ public static Color blue() { return ColorUtil.getColor(0,0,255);//new Color(null, 0, 0, 255);
+ }
+ /** One of the pre-defined colors */
+ public static Color darkBlue() { return ColorUtil.getColor(0,0,127);//new Color(null, 0, 0, 127);
+ }
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FocusBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FocusBorder.java
index d9ad5ff..089907d 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FocusBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FocusBorder.java
@@ -46,8 +46,8 @@
tempRect.setBounds(getPaintRectangle(figure, insets));
tempRect.width--;
tempRect.height--;
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(tempRect);
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FrameBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FrameBorder.java
index a5f2296..53e0f34 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FrameBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FrameBorder.java
@@ -23,11 +23,11 @@
* The border scheme that determines the border highlight and shadow colors,
* as well as the border width (3).
*/
- protected static final SchemeBorder.Scheme SCHEME_FRAME = new SchemeBorder.Scheme(
- new Color[] { ColorConstants.button, ColorConstants.buttonLightest,
- ColorConstants.button }, new Color[] {
- ColorConstants.buttonDarkest, ColorConstants.buttonDarker,
- ColorConstants.button });
+ protected final SchemeBorder.Scheme SCHEME_FRAME = new SchemeBorder.Scheme(
+ new Color[] { ColorConstants.button(), ColorConstants.buttonLightest(),
+ ColorConstants.button() }, new Color[] {
+ ColorConstants.buttonDarkest(), ColorConstants.buttonDarker(),
+ ColorConstants.button() });
{
createBorders();
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Label.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Label.java
index 7def645..774e0c6 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Label.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Label.java
@@ -507,10 +507,10 @@
graphics.drawImage(icon, getIconLocation());
if (!isEnabled()) {
graphics.translate(1, 1);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawText(getSubStringText(), getTextLocation());
graphics.translate(-1, -1);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
}
graphics.drawText(getSubStringText(), getTextLocation());
graphics.translate(-bounds.x, -bounds.y);
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PolylineDecoration.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PolylineDecoration.java
index 9818429..68d3505 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PolylineDecoration.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PolylineDecoration.java
@@ -40,7 +40,7 @@
* @since 2.0
*/
public PolylineDecoration() {
- setBackgroundColor(ColorConstants.black);
+ setBackgroundColor(ColorConstants.black());
setScale(7, 3);
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
index d745f15..c2164c5 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
@@ -111,7 +111,7 @@
*/
protected void preparePrintSource() {
oldBGColor = getPrintSource().getLocalBackgroundColor();
- getPrintSource().setBackgroundColor(ColorConstants.white);
+ getPrintSource().setBackgroundColor(ColorConstants.white());
}
/**
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SchemeBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SchemeBorder.java
index 0a1592c..008cf59 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SchemeBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SchemeBorder.java
@@ -11,7 +11,6 @@
package org.eclipse.draw2d;
import org.eclipse.swt.graphics.Color;
-
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Rectangle;
@@ -21,16 +20,18 @@
* purpose is to carry border specific information. SchemeBorder renders the
* border based on the information given by the <i>Scheme</i> set to it.
*/
-public class SchemeBorder extends AbstractBorder implements ColorConstants {
+public class SchemeBorder extends AbstractBorder {
/** The {@link SchemeBorder.Scheme} associated with this SchemeBorder **/
protected Scheme scheme = null;
/** Arrays of Colors, used for shadow or highlight effects **/
- protected static final Color DARKEST_DARKER[] = new Color[] {
- buttonDarkest, buttonDarker }, LIGHTER_DARKER[] = new Color[] {
- buttonLightest, buttonDarker }, DARKER_LIGHTER[] = new Color[] {
- buttonDarker, buttonLightest };
+ protected static final Color[] DARKEST_DARKER() { return new Color[] {
+ ColorConstants.buttonDarkest(), ColorConstants.buttonDarker() };}
+ protected static final Color[] LIGHTER_DARKER() { return new Color[] {
+ ColorConstants.buttonLightest(), ColorConstants.buttonDarker() };}
+ protected static final Color[] DARKER_LIGHTER() { return new Color[] {
+ ColorConstants.buttonDarker(), ColorConstants.buttonLightest() };}
/**
* Holds a set of information about a border, which can be changed to create
@@ -179,20 +180,25 @@
* schemes can be given as input to the {@link SchemeBorder SchemeBorder} to
* generate appropriate borders.
*/
- public static interface SCHEMES {
+ public static class SCHEMES {
/** Schemes used for shadow and highlight effects **/
- Scheme BUTTON_CONTRAST = new Scheme(new Color[] { button,
- buttonLightest }, DARKEST_DARKER), BUTTON_RAISED = new Scheme(
- new Color[] { buttonLightest }, DARKEST_DARKER),
- BUTTON_PRESSED = new Scheme(DARKEST_DARKER,
- new Color[] { buttonLightest }), RAISED = new Scheme(
- new Color[] { buttonLightest },
- new Color[] { buttonDarkest }), LOWERED = new Scheme(
- new Color[] { buttonDarkest },
- new Color[] { buttonLightest }), RIDGED = new Scheme(
- LIGHTER_DARKER, DARKER_LIGHTER), ETCHED = new Scheme(
- DARKER_LIGHTER, LIGHTER_DARKER);
+ public static Scheme BUTTON_CONTRAST() { return new Scheme(new Color[] { ColorConstants.button(),
+ ColorConstants.buttonLightest() }, DARKEST_DARKER());}
+ public static Scheme BUTTON_RAISED() { return new Scheme(
+ new Color[] { ColorConstants.buttonLightest() }, DARKEST_DARKER());}
+ public static Scheme BUTTON_PRESSED() { return new Scheme(DARKEST_DARKER(),
+ new Color[] { ColorConstants.buttonLightest() });}
+ public static Scheme RAISED() { return new Scheme(
+ new Color[] { ColorConstants.buttonLightest() },
+ new Color[] { ColorConstants.buttonDarkest() });}
+ public static Scheme LOWERED() { return new Scheme(
+ new Color[] { ColorConstants.buttonDarkest() },
+ new Color[] { ColorConstants.buttonLightest() });}
+ public static Scheme RIDGED() { return new Scheme(
+ LIGHTER_DARKER(), DARKER_LIGHTER());}
+ public static Scheme ETCHED() { return new Scheme(
+ DARKER_LIGHTER(), LIGHTER_DARKER());}
}
/**
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScrollBar.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScrollBar.java
index bee3ff0..0491be3 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScrollBar.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScrollBar.java
@@ -33,7 +33,7 @@
protected static final int MAX_FLAG = ORIENTATION_FLAG;
private static final Color COLOR_TRACK = FigureUtilities.mixColors(
- ColorConstants.white, ColorConstants.button);
+ ColorConstants.white(), ColorConstants.button());
private RangeModel rangeModel = null;
private IFigure thumb;
@@ -78,7 +78,7 @@
protected Clickable createDefaultUpButton() {
Button buttonUp = new ArrowButton();
buttonUp.setBorder(new ButtonBorder(
- ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
+ ButtonBorder.SCHEMES.BUTTON_SCROLLBAR()));
return buttonUp;
}
@@ -91,7 +91,7 @@
protected Clickable createDefaultDownButton() {
Button buttonDown = new ArrowButton();
buttonDown.setBorder(new ButtonBorder(
- ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
+ ButtonBorder.SCHEMES.BUTTON_SCROLLBAR()));
return buttonDown;
}
@@ -120,7 +120,7 @@
clickable.addChangeListener(new ChangeListener() {
public void handleStateChanged(ChangeEvent evt) {
if (clickable.getModel().isArmed())
- clickable.setBackgroundColor(ColorConstants.black);
+ clickable.setBackgroundColor(ColorConstants.black());
else
clickable.setBackgroundColor(COLOR_TRACK);
}
@@ -138,9 +138,9 @@
protected IFigure createDefaultThumb() {
Panel thumb = new Panel();
thumb.setMinimumSize(new Dimension(6, 6));
- thumb.setBackgroundColor(ColorConstants.button);
+ thumb.setBackgroundColor(ColorConstants.button());
- thumb.setBorder(new SchemeBorder(SchemeBorder.SCHEMES.BUTTON_CONTRAST));
+ thumb.setBorder(new SchemeBorder(SchemeBorder.SCHEMES.BUTTON_CONTRAST()));
return thumb;
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Shape.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Shape.java
index 2031839..80dec37 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Shape.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/Shape.java
@@ -124,8 +124,8 @@
if (!isEnabled()) {
graphics.translate(1, 1);
- graphics.setBackgroundColor(ColorConstants.buttonLightest);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setBackgroundColor(ColorConstants.buttonLightest());
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
if (fill) {
paintFill(graphics);
@@ -135,8 +135,8 @@
paintOutline(graphics);
}
- graphics.setBackgroundColor(ColorConstants.buttonDarker);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setBackgroundColor(ColorConstants.buttonDarker());
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
graphics.translate(-1, -1);
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleLoweredBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleLoweredBorder.java
index c989b87..955019e 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleLoweredBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleLoweredBorder.java
@@ -18,9 +18,9 @@
public final class SimpleLoweredBorder extends SchemeBorder {
private static final Scheme DOUBLE = new Scheme(
- new Color[] { ColorConstants.buttonDarkest,
- ColorConstants.buttonDarker },
- new Color[] { ColorConstants.buttonLightest, ColorConstants.button });
+ new Color[] { ColorConstants.buttonDarkest(),
+ ColorConstants.buttonDarker() },
+ new Color[] { ColorConstants.buttonLightest(), ColorConstants.button() });
/**
* Constructs a SimpleLoweredBorder with the predefined button-pressed
@@ -29,7 +29,7 @@
* @since 2.0
*/
public SimpleLoweredBorder() {
- super(SCHEMES.BUTTON_PRESSED);
+ super(SCHEMES.BUTTON_PRESSED());
}
/**
@@ -43,7 +43,7 @@
* @since 2.0
*/
public SimpleLoweredBorder(int width) {
- super(width == 2 ? DOUBLE : SCHEMES.BUTTON_PRESSED);
+ super(width == 2 ? DOUBLE : SCHEMES.BUTTON_PRESSED());
}
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleRaisedBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleRaisedBorder.java
index 27bca02..163ace4 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleRaisedBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/SimpleRaisedBorder.java
@@ -18,9 +18,9 @@
public class SimpleRaisedBorder extends SchemeBorder {
private static final Scheme DOUBLE = new Scheme(new Color[] {
- ColorConstants.buttonLightest, ColorConstants.button },
- new Color[] { ColorConstants.buttonDarkest,
- ColorConstants.buttonDarker });
+ ColorConstants.buttonLightest(), ColorConstants.button() },
+ new Color[] { ColorConstants.buttonDarkest(),
+ ColorConstants.buttonDarker() });
/**
* Constructs a SimpleRaisedBorder with the predefined
@@ -29,7 +29,7 @@
* @since 2.0
*/
public SimpleRaisedBorder() {
- super(SCHEMES.BUTTON_RAISED);
+ super(SCHEMES.BUTTON_RAISED());
}
/**
@@ -43,7 +43,7 @@
* @since 2.0
*/
public SimpleRaisedBorder(int width) {
- super(width == 2 ? DOUBLE : SCHEMES.BUTTON_RAISED);
+ super(width == 2 ? DOUBLE : SCHEMES.BUTTON_RAISED());
}
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/TitleBarBorder.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/TitleBarBorder.java
index e6ddc76..8094109 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/TitleBarBorder.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/TitleBarBorder.java
@@ -26,8 +26,8 @@
*/
public class TitleBarBorder extends AbstractLabeledBorder {
- private static Color defaultBackgroundColor = ColorConstants.menuBackgroundSelected;
- private static Color defaultForegroundColor = ColorConstants.menuForegroundSelected;
+ private static Color defaultBackgroundColor = ColorConstants.menuBackgroundSelected();
+ private static Color defaultForegroundColor = ColorConstants.menuForegroundSelected();
private int textAlignment = PositionConstants.LEFT;
private Insets padding = new Insets(1, 3, 2, 2);
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToggleButton.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToggleButton.java
index a184187..b7a5c7a 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToggleButton.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToggleButton.java
@@ -85,8 +85,8 @@
* The Graphics object used to paint
*/
protected void fillCheckeredRectangle(Graphics graphics) {
- graphics.setBackgroundColor(ColorConstants.button);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setBackgroundColor(ColorConstants.button());
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
Rectangle rect = getClientArea(Rectangle.getSINGLETON()).crop(
new Insets(1, 1, 0, 0));
graphics.fillRectangle(rect.x, rect.y, rect.width, rect.height);
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToolTipHelper.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToolTipHelper.java
index b4bbeb9..ab6ae8b 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToolTipHelper.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ToolTipHelper.java
@@ -43,8 +43,8 @@
*/
public ToolTipHelper(org.eclipse.swt.widgets.Control c) {
super(c, SWT.TOOL | SWT.ON_TOP);
- getShell().setBackground(ColorConstants.tooltipBackground);
- getShell().setForeground(ColorConstants.tooltipForeground);
+ getShell().setBackground(ColorConstants.tooltipBackground());
+ getShell().setForeground(ColorConstants.tooltipForeground());
}
/*
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/ScrollableThumbnail.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/ScrollableThumbnail.java
index 3cf4680..210d100 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/ScrollableThumbnail.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/ScrollableThumbnail.java
@@ -115,7 +115,7 @@
public SelectorFigure() {
PaletteData pData = new PaletteData(0xFF, 0xFF00, 0xFF0000);
- RGB rgb = ColorConstants.menuBackgroundSelected.getRGB();
+ RGB rgb = ColorConstants.menuBackgroundSelected().getRGB();
int fillColor = pData.getPixel(rgb);
iData = new ImageData(1, 1, 24, pData);
iData.setPixel(0, 0, fillColor);
@@ -144,7 +144,7 @@
g.drawImage(image, iBounds, bounds);
image.dispose();
- g.setForegroundColor(ColorConstants.menuBackgroundSelected);
+ g.setForegroundColor(ColorConstants.menuBackgroundSelected());
g.drawRectangle(bounds);
}
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
index 77bed2c..87c9df6 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
@@ -200,7 +200,7 @@
if (selectionStart != -1) {
graphics.restoreState();
graphics.setXORMode(true);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.fillRectangle(getBounds());
}
}
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/InlineFlow.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/InlineFlow.java
index 85705da..6916da6 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/InlineFlow.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/InlineFlow.java
@@ -137,7 +137,7 @@
protected void paintSelection(Graphics graphics) {
graphics.restoreState();
graphics.setXORMode(true);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setBackgroundColor(ColorConstants.white());
List list = getFragments();
FlowBox box;
for (int i = 0; i < list.size(); i++) {
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
index 27930b7..6cd2d88 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
@@ -576,10 +576,10 @@
if (!isEnabled()) {
Color fgColor = g.getForegroundColor();
- g.setForegroundColor(ColorConstants.buttonLightest);
+ g.setForegroundColor(ColorConstants.buttonLightest());
paintText(g, draw, frag.getX() + 1, frag.getBaseline()
- getAscent() + 1, frag.getBidiLevel());
- g.setForegroundColor(ColorConstants.buttonDarker);
+ g.setForegroundColor(ColorConstants.buttonDarker());
paintText(g, draw, frag.getX(), frag.getBaseline()
- getAscent(), frag.getBidiLevel());
g.setForegroundColor(fgColor);
@@ -597,7 +597,7 @@
if (selectionStart == -1)
return;
graphics.setXORMode(true);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setBackgroundColor(ColorConstants.white());
TextFragmentBox frag;
for (int i = 0; i < fragments.size(); i++) {
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
index 3771aa9..7c19019 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
@@ -66,8 +66,8 @@
protected void paintBorder(Graphics graphics) {
super.paintBorder(graphics);
if (hasFocus()) {
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(getBounds().getResized(-1, -1));
}
}
diff --git a/bundles/org.eclipse.rap.gef.demo/RAP GEF Demo.launch b/bundles/org.eclipse.rap.gef.demo/RAP GEF Demo.launch
index 6e8498b..23aa529 100644
--- a/bundles/org.eclipse.rap.gef.demo/RAP GEF Demo.launch
+++ b/bundles/org.eclipse.rap.gef.demo/RAP GEF Demo.launch
@@ -14,7 +14,7 @@
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-openjdk-amd64"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-7-openjdk-amd64"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true"/>
@@ -37,7 +37,7 @@
<booleanAttribute key="org.eclipse.rap.launch.useSessionTimeout" value="false"/>
<stringAttribute key="pde.version" value="3.3"/>
<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="com.ibm.icu.base@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.rap.jface.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclipse.rap.rwt.osgi@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.ui.cheatsheets@default:default,org.eclipse.rap.ui.forms@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.eclipse.rap.ui@default:default"/>
+<stringAttribute key="target_bundles" value="com.ibm.icu.base@default:default,javax.servlet*3.1.0.v201410161800@default:default,javax.xml@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs*3.7.0.v20150115-2226@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common*3.6.200.v20141113-1308@2:true,org.eclipse.equinox.console*1.1.100.v20141023-1406@default:default,org.eclipse.equinox.http.jetty*3.1.0.v20141113-1503@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet*1.2.0.v20150120-1816@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.region@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.help@default:default,org.eclipse.jetty.http*9.2.5.v20141112@default:default,org.eclipse.jetty.io*9.2.5.v20141112@default:default,org.eclipse.jetty.security*9.2.5.v20141112@default:default,org.eclipse.jetty.server*9.2.5.v20141112@default:default,org.eclipse.jetty.servlet*9.2.5.v20141112@default:default,org.eclipse.jetty.util*9.2.5.v20141112@default:default,org.eclipse.osgi*3.10.100.v20150129-2253@-1:true,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services*3.5.0.v20150126-1936@default:default,org.eclipse.rap.jface.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclipse.rap.rwt.osgi@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.eclipse.rap.ui@default:default"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/cg/ObstructionExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/cg/ObstructionExample.java
index 09554a7..5ff4c8c 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/cg/ObstructionExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/cg/ObstructionExample.java
@@ -61,7 +61,7 @@
loc = location;
thisFigure = this;
this.isSource = isItSource;
- setBackgroundColor(ColorConstants.darkBlue);
+ setBackgroundColor(ColorConstants.darkBlue());
addMouseListener(new MouseListener.Stub() {
public void mousePressed(MouseEvent event) {
@@ -143,7 +143,7 @@
public DragFigure() {
thisFigure = this;
- setBackgroundColor(ColorConstants.green);
+ setBackgroundColor(ColorConstants.green());
addMouseListener(new MouseListener.Stub() {
public void mousePressed(MouseEvent event) {
@@ -293,8 +293,8 @@
router.solve();
g.setLineWidth(1);
- g.setForegroundColor(ColorConstants.blue);
- g.setBackgroundColor(ColorConstants.button);
+ g.setForegroundColor(ColorConstants.blue());
+ g.setBackgroundColor(ColorConstants.button());
// draw paths
Path path = null;
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/connections/ConnectionAndAnchorExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/connections/ConnectionAndAnchorExample.java
index 5b4c5d7..2d3815d 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/connections/ConnectionAndAnchorExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/connections/ConnectionAndAnchorExample.java
@@ -55,9 +55,9 @@
RectangleFigure
node1 = new RectangleFigure(),
node2 = new RectangleFigure();
- node1.setBackgroundColor(ColorConstants.red);
+ node1.setBackgroundColor(ColorConstants.red());
node1.setBounds(new Rectangle(40,40, 50, 30));
- node2.setBackgroundColor(ColorConstants.blue);
+ node2.setBackgroundColor(ColorConstants.blue());
node2.setBounds(new Rectangle(200,40, 50, 30));
PolylineConnection conn = new PolylineConnection();
@@ -67,7 +67,7 @@
Label label = new Label("Midpoint");
label.setOpaque(true);
- label.setBackgroundColor(ColorConstants.buttonLightest);
+ label.setBackgroundColor(ColorConstants.buttonLightest());
label.setBorder(new LineBorder());
conn.add(label, new MidpointLocator(conn, 0));
//conn.setSourceDecoration(new ConnectionLabel());
@@ -86,9 +86,9 @@
Shape
node3 = new RectangleFigure(),
node4 = new RectangleFigure();
- node3.setBackgroundColor(ColorConstants.green);
+ node3.setBackgroundColor(ColorConstants.green());
node3.setBounds(new Rectangle(480,40, 50, 30));
- node4.setBackgroundColor(ColorConstants.black);
+ node4.setBackgroundColor(ColorConstants.black());
node4.setBounds(new Rectangle(480, 230, 50, 30));
PolylineConnection conn2 = new PolylineConnection();
@@ -98,13 +98,13 @@
Label endPointLabel = new Label("Endpoint");
endPointLabel.setOpaque(true);
- endPointLabel.setBackgroundColor(ColorConstants.buttonLightest);
+ endPointLabel.setBackgroundColor(ColorConstants.buttonLightest());
endPointLabel.setBorder(new LineBorder());
conn2.add(endPointLabel, new ConnectionEndpointLocator(conn2, true));
Label endPointLabel2 = new Label("Endpoint");
endPointLabel2.setOpaque(true);
- endPointLabel2.setBackgroundColor(ColorConstants.buttonLightest);
+ endPointLabel2.setBackgroundColor(ColorConstants.buttonLightest());
endPointLabel2.setBorder(new LineBorder());
ConnectionEndpointLocator endpointLocator =
new ConnectionEndpointLocator(conn2,false);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java
index f8c2998..f3bf82b 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java
@@ -102,7 +102,7 @@
*/
static void buildEdgeFigure(Figure contents, Edge edge) {
PolylineConnection conn = connection(edge);
- conn.setForegroundColor(ColorConstants.gray);
+ conn.setForegroundColor(ColorConstants.gray());
PolygonDecoration dec = new PolygonDecoration();
conn.setTargetDecoration(dec);
conn.setPoints(edge.getPoints());
@@ -120,7 +120,7 @@
static void buildNodeFigure(Figure contents, Node node) {
Label label;
label = new Label();
- label.setBackgroundColor(ColorConstants.lightGray);
+ label.setBackgroundColor(ColorConstants.lightGray());
label.setOpaque(true);
label.setBorder(new LineBorder());
if (node.incoming.isEmpty())
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/CompoundGraphDemo.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/CompoundGraphDemo.java
index d20cef4..082bf09 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/CompoundGraphDemo.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/CompoundGraphDemo.java
@@ -41,7 +41,7 @@
public static Figure buildGraph(CompoundDirectedGraph graph) {
Figure contents = new Panel();
contents.setFont(new Font(null, "Tahoma", 10, 0));
- contents.setBackgroundColor(ColorConstants.white);
+ contents.setBackgroundColor(ColorConstants.white());
contents.setLayoutManager(new XYLayout());
for (int i = 0; i < graph.subgraphs.size(); i++) {
@@ -111,7 +111,7 @@
private static void buildSubgraphFigure(Figure contents, Subgraph s) {
Figure figure = new Figure();
- figure.setBorder(new LineBorder(ColorConstants.blue, s.insets.left));
+ figure.setBorder(new LineBorder(ColorConstants.blue(), s.insets.left));
contents.add(figure, new Rectangle(s.x, s.y, s.width, s.height));
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/DirectedGraphDemo.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/DirectedGraphDemo.java
index 35c5f2e..f6d315f 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/DirectedGraphDemo.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/graph/DirectedGraphDemo.java
@@ -46,7 +46,7 @@
Figure contents = new Panel();
// contents.setFont(new Font(null, "Tahoma", 10, 0));
- contents.setBackgroundColor(ColorConstants.white);
+ contents.setBackgroundColor(ColorConstants.white());
contents.setLayoutManager(new XYLayout());
for (int i = 0; i < graph.nodes.size(); i++) {
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/hittest/EllipseHitting.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/hittest/EllipseHitting.java
index 8fa48a2..7ecbc9e 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/hittest/EllipseHitting.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/hittest/EllipseHitting.java
@@ -33,14 +33,14 @@
Figure panel = new Figure();
panel.setLayoutManager(new FlowLayout());
- panel.setBackgroundColor(ColorConstants.white);
+ panel.setBackgroundColor(ColorConstants.white());
MouseMotionListener listener = new MouseMotionListener.Stub() {
public void mouseEntered(MouseEvent me) {
- ((Shape)me.getSource()).setBackgroundColor(ColorConstants.yellow);
+ ((Shape)me.getSource()).setBackgroundColor(ColorConstants.yellow());
}
public void mouseExited(MouseEvent me) {
- ((Shape)me.getSource()).setBackgroundColor(ColorConstants.white);
+ ((Shape)me.getSource()).setBackgroundColor(ColorConstants.white());
}
};
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/FlowLayoutExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/FlowLayoutExample.java
index 037a804..a6d53df 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/FlowLayoutExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/FlowLayoutExample.java
@@ -56,57 +56,57 @@
Shape shape;
shape = new Ellipse();
- shape.setBackgroundColor(ColorConstants.blue);
+ shape.setBackgroundColor(ColorConstants.blue());
shape.setSize(60,40);
container.add(shape);
shape = new RectangleFigure();
- shape.setBackgroundColor(ColorConstants.red);
+ shape.setBackgroundColor(ColorConstants.red());
shape.setSize(30,70);
container.add(shape);
shape = new RoundedRectangle();
- shape.setBackgroundColor(ColorConstants.yellow);
+ shape.setBackgroundColor(ColorConstants.yellow());
shape.setSize(90,30);
container.add(shape);
shape = new RectangleFigure();
- shape.setBackgroundColor(ColorConstants.gray);
+ shape.setBackgroundColor(ColorConstants.gray());
shape.setSize(50,80);
container.add(shape);
shape = new Ellipse();
- shape.setBackgroundColor(ColorConstants.green);
+ shape.setBackgroundColor(ColorConstants.green());
shape.setSize(50,50);
container.add(shape);
shape = new Triangle();
- shape.setBackgroundColor(ColorConstants.black);
+ shape.setBackgroundColor(ColorConstants.black());
shape.setSize(50,50);
container.add(shape);
shape = new RoundedRectangle();
- shape.setBackgroundColor(ColorConstants.cyan);
+ shape.setBackgroundColor(ColorConstants.cyan());
shape.setSize(50,50);
container.add(shape);
shape = new RectangleFigure();
- shape.setBackgroundColor(ColorConstants.darkGreen);
+ shape.setBackgroundColor(ColorConstants.darkGreen());
shape.setSize(50,50);
container.add(shape);
shape = new Triangle();
- shape.setBackgroundColor(ColorConstants.orange);
+ shape.setBackgroundColor(ColorConstants.orange());
shape.setSize(50,50);
container.add(shape);
shape = new Ellipse();
- shape.setBackgroundColor(ColorConstants.red);
+ shape.setBackgroundColor(ColorConstants.red());
shape.setSize(50,50);
container.add(shape);
shape = new RoundedRectangle();
- shape.setBackgroundColor(ColorConstants.yellow);
+ shape.setBackgroundColor(ColorConstants.yellow());
shape.setSize(50,50);
container.add(shape);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java
index b43de5c..ff5f931 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java
@@ -64,10 +64,10 @@
Shape selectedShape = null, prevSelectedShape = null;
int shapeCount = 0;
int colorCount = 0;
- Color colors[] = new Color[] { ColorConstants.blue, ColorConstants.red,
- ColorConstants.yellow, ColorConstants.gray, ColorConstants.green,
- ColorConstants.lightBlue, ColorConstants.cyan,
- ColorConstants.darkGreen, ColorConstants.orange };
+ Color colors[] = new Color[] { ColorConstants.blue(), ColorConstants.red(),
+ ColorConstants.yellow(), ColorConstants.gray(), ColorConstants.green(),
+ ColorConstants.lightBlue(), ColorConstants.cyan(),
+ ColorConstants.darkGreen(), ColorConstants.orange() };
/**
* @param args
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/ToolbarLayoutExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/ToolbarLayoutExample.java
index 26d64b8..5c22170 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/ToolbarLayoutExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/layouts/ToolbarLayoutExample.java
@@ -57,27 +57,27 @@
container.setLayoutManager(layout = new ToolbarLayout(true));
ellipse = new Ellipse();
- ellipse.setBackgroundColor(ColorConstants.blue);
+ ellipse.setBackgroundColor(ColorConstants.blue());
ellipse.setSize(60,40);
container.add(ellipse);
rect = new RectangleFigure();
- rect.setBackgroundColor(ColorConstants.red);
+ rect.setBackgroundColor(ColorConstants.red());
rect.setSize(30,70);
container.add(rect);
roundRect = new RoundedRectangle();
- roundRect.setBackgroundColor(ColorConstants.yellow);
+ roundRect.setBackgroundColor(ColorConstants.yellow());
roundRect.setSize(90,30);
container.add(roundRect);
rect2 = new RectangleFigure();
- rect2.setBackgroundColor(ColorConstants.gray);
+ rect2.setBackgroundColor(ColorConstants.gray());
rect2.setSize(50,80);
container.add(rect2);
ellipse2 = new Ellipse();
- ellipse2.setBackgroundColor(ColorConstants.green);
+ ellipse2.setBackgroundColor(ColorConstants.green());
ellipse2.setSize(50,50);
container.add(ellipse2);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/path/PathExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/path/PathExample.java
index a759603..86509d4 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/path/PathExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/path/PathExample.java
@@ -42,7 +42,7 @@
final ScrollBar bar = new ScrollBar();
final Label l = new Label("�Zoom�");
- l.setBorder(new SchemeBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
+ l.setBorder(new SchemeBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR()));
bar.setThumb(l);
bar.setHorizontal(true);
bar.setMaximum(200);
@@ -66,7 +66,7 @@
polyline.addPoint(new Point(w + k, w + k));
polyline.addPoint(new Point(0 + k, w + k));
polyline.setLineWidth(3);
- polyline.setBackgroundColor(ColorConstants.red);
+ polyline.setBackgroundColor(ColorConstants.red());
polyline.setClosed(true);
Point c = polyline.getBounds().getCenter();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/scrollpane/InternalFrame.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/scrollpane/InternalFrame.java
index 137b144..cc5e1e3 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/scrollpane/InternalFrame.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/scrollpane/InternalFrame.java
@@ -36,15 +36,15 @@
static class InternalFrameBorder extends CompoundBorder {
InternalFrameBorder(){
TitleBarBorder titlebar = new TitleBarBorder();
- titlebar.setTextColor(ColorConstants.white);
- titlebar.setBackgroundColor(ColorConstants.darkGray);
+ titlebar.setTextColor(ColorConstants.white());
+ titlebar.setBackgroundColor(ColorConstants.darkGray());
inner = new CompoundBorder(
new LineBorder(FigureUtilities.mixColors(
- ColorConstants.buttonDarker,ColorConstants.button), 3),
- new SchemeBorder(SchemeBorder.SCHEMES.LOWERED)
+ ColorConstants.buttonDarker(),ColorConstants.button()), 3),
+ new SchemeBorder(SchemeBorder.SCHEMES.LOWERED())
);
outer = new CompoundBorder(
- new SchemeBorder(SchemeBorder.SCHEMES.RAISED),
+ new SchemeBorder(SchemeBorder.SCHEMES.RAISED()),
titlebar
);
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/swt/ShapeStylesExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/swt/ShapeStylesExample.java
index 4ba9a00..f371e6f 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/swt/ShapeStylesExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/swt/ShapeStylesExample.java
@@ -326,7 +326,7 @@
}
// apply default style
- shape.setBackgroundColor(ColorConstants.orange);
+ shape.setBackgroundColor(ColorConstants.orange());
shape.setLineWidthFloat(defaultLineWidth);
shape.setAntialias(SWT.ON);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/CaretExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/CaretExample.java
index 498a5a8..08aef6c 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/CaretExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/CaretExample.java
@@ -51,7 +51,7 @@
// };
// };
//
-// page.setBorder(new LineBorder(ColorConstants.darkGray, 10));
+// page.setBorder(new LineBorder(ColorConstants.darkGray(), 10));
// page.setHorizontalAligment(PositionConstants.CENTER);
//
// final TextFlow text = new TextFlow();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TestBorder.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TestBorder.java
index ea773a8..8b86dff 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TestBorder.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TestBorder.java
@@ -48,7 +48,7 @@
points.addPoint(where.getRight());
points.addPoint(where.getBottomRight().translate(-where.height / 2, 0));
points.addPoint(where.getBottomLeft());
- g.setBackgroundColor(ColorConstants.tooltipBackground);
+ g.setBackgroundColor(ColorConstants.tooltipBackground());
g.fillPolygon(points);
g.drawPolygon(points);
g.drawString("begin", where.x + 1, where.y);
@@ -60,7 +60,7 @@
points.addPoint(where.getTopRight());
points.addPoint(where.getBottomRight());
points.addPoint(where.getBottomLeft().translate(where.height / 2, 0));
- g.setBackgroundColor(ColorConstants.tooltipBackground);
+ g.setBackgroundColor(ColorConstants.tooltipBackground());
g.fillPolygon(points);
g.drawPolygon(points);
g.drawString("end", where.x + where.height / 2, where.y);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowExample.java
index 13cf8d9..8ef8867 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowExample.java
@@ -95,7 +95,7 @@
+ " nested structure using InlineFlows. "));
InlineFlow inline = new InlineFlow();
- inline.setForegroundColor(ColorConstants.darkBlue);
+ inline.setForegroundColor(ColorConstants.darkBlue());
inline.add(new TextFlow("This TextFlow is inside an InlineFlow with a blue "
+ "foreground color. Children can have "));
text = new TextFlow("Bold ");
@@ -142,7 +142,7 @@
protected IFigure getContents() {
FlowPage page = new FlowPage();
page.setOpaque(true);
- page.setBackgroundColor(ColorConstants.white);
+ page.setBackgroundColor(ColorConstants.white());
page.add(createTitle());
page.add(createParagraph());
page.add(createBlockParagraph());
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowFactory.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowFactory.java
index 32fd1fe..488a0c7 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowFactory.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowFactory.java
@@ -25,8 +25,8 @@
static void addFontSizes(Figure parent, int min, int max){
for (int i=min; i<max; i++){
TextFlow tf = new TextFlow(Integer.toString(i) + " pt. Font ");
-// tf.setBackgroundColor(ColorConstants.lightGray);
-// tf.setForegroundColor(ColorConstants.yellow);
+// tf.setBackgroundColor(ColorConstants.lightGray());
+// tf.setForegroundColor(ColorConstants.yellow());
tf.setFont(new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getDefault(), "Helvetica", i, org.eclipse.swt.SWT.NORMAL));
parent.add(tf);
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowLargeExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowLargeExample.java
index b94f930..492f2e1 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowLargeExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextFlowLargeExample.java
@@ -84,7 +84,7 @@
target.setToolTip(new Label("This is a Tooltip"));
page.add(target);
page.setOpaque(true);
- page.setBackgroundColor(ColorConstants.white);
+ page.setBackgroundColor(ColorConstants.white());
for (int i=0; i< 20; i++){
BlockFlow bf = new BlockFlow();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
index 373101c..1425f83 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
@@ -60,22 +60,22 @@
page.add(textFlow1);
FlowAdapter proxy1 = new FlowAdapter();
- proxy1.setBorder(new LineBorder(ColorConstants.orange, 3));
+ proxy1.setBorder(new LineBorder(ColorConstants.orange(), 3));
proxy1.setLayoutManager(new ToolbarLayout());
RoundedRectangle rect = new RoundedRectangle();
rect.setCornerDimensions(new Dimension(25,25));
- rect.setBackgroundColor(ColorConstants.green);
- rect.setForegroundColor(ColorConstants.black);
+ rect.setBackgroundColor(ColorConstants.green());
+ rect.setForegroundColor(ColorConstants.black());
rect.setPreferredSize(100, 40);
proxy1.add(rect);
Shape shape = new Triangle();
- shape.setBackgroundColor(ColorConstants.red);
- shape.setForegroundColor(ColorConstants.black);
+ shape.setBackgroundColor(ColorConstants.red());
+ shape.setForegroundColor(ColorConstants.black());
shape.setPreferredSize(80, 80);
proxy1.add(shape);
shape = new Ellipse();
- shape.setBackgroundColor(ColorConstants.blue);
- shape.setForegroundColor(ColorConstants.black);
+ shape.setBackgroundColor(ColorConstants.blue());
+ shape.setForegroundColor(ColorConstants.black());
shape.setPreferredSize(70, 70);
proxy1.add(shape);
page.add(proxy1);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java
index a9942b4..5e07dbc 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java
@@ -79,7 +79,7 @@
contents.setBorder(new LineBorder());
contents.setLayoutManager(new XYLayout());
final Figure figure1 = new RectangleFigure();
- figure1.setBackgroundColor(ColorConstants.green);
+ figure1.setBackgroundColor(ColorConstants.green());
figure1.setBounds(new Rectangle(50, 50, 200, 200));
figure1.addMouseListener(new MouseListener.Stub() {
public void mousePressed(MouseEvent event) {
@@ -102,7 +102,7 @@
});
contents.add(figure1);
final Figure figure2 = new RectangleFigure();
- figure2.setBackgroundColor(ColorConstants.blue);
+ figure2.setBackgroundColor(ColorConstants.blue());
figure2.setBounds(new Rectangle(350, 350, 150, 200));
figure2.addMouseListener(new MouseListener.Stub() {
public void mousePressed(MouseEvent event) {
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/PageNode.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/PageNode.java
index b302814..5bf2bca 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/PageNode.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/PageNode.java
@@ -115,8 +115,8 @@
protected void paintFigure(Graphics g) {
super.paintFigure(g);
if (selected) {
- g.setForegroundColor(ColorConstants.menuBackgroundSelected);
- g.setBackgroundColor(ColorConstants.titleGradient);
+ g.setForegroundColor(ColorConstants.menuBackgroundSelected());
+ g.setBackgroundColor(ColorConstants.titleGradient());
} else {
g.setForegroundColor(gradient1);
g.setBackgroundColor(gradient2);
@@ -127,7 +127,7 @@
public void setSelected(boolean value) {
this.selected = value;
if (selected)
- label.setForegroundColor(ColorConstants.white);
+ label.setForegroundColor(ColorConstants.white());
else
label.setForegroundColor(null);
repaint();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/SimpleTreeExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/SimpleTreeExample.java
index 724180c..1faa992 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/SimpleTreeExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/SimpleTreeExample.java
@@ -29,7 +29,7 @@
* @see org.eclipse.draw2d.examples.AbstractExample#getContents()
*/
protected IFigure getContents() {
- getFigureCanvas().setBackground(ColorConstants.white);
+ getFigureCanvas().setBackground(ColorConstants.white());
TreeRoot root = new TreeRoot(new PageNode("Graph Root"));
root.setAlignment(PositionConstants.LEFT);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeBranch.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeBranch.java
index 1cfbd6c..7a8b9e7 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeBranch.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeBranch.java
@@ -86,7 +86,7 @@
public TreeBranch(IFigure title, int style) {
setStyle(style);
if (title.getBorder() == null)
- title.setBorder(new LineBorder(ColorConstants.gray, 2));
+ title.setBorder(new LineBorder(ColorConstants.gray(), 2));
this.node = title;
add(contents);
add(title);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeExample.java
index 0e7cfa9..afccce2 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/tree/TreeExample.java
@@ -123,7 +123,7 @@
* @see org.eclipse.draw2d.examples.AbstractExample#getContents()
*/
protected IFigure getContents() {
- getFigureCanvas().setBackground(ColorConstants.white);
+ getFigureCanvas().setBackground(ColorConstants.white());
root = new TreeRoot(createPageNode("Graph Root"));
TreeBranch branch, subbranch;
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/StickyNote.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/StickyNote.java
index 0d9fcc4..d154d19 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/StickyNote.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/StickyNote.java
@@ -57,7 +57,7 @@
add(text);
text.setText("This is a sticky note. It wraps text based on its " +
"width.");
- setBackgroundColor(ColorConstants.tooltipBackground);
+ setBackgroundColor(ColorConstants.tooltipBackground());
setOpaque(true);
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/UMLClassDiagram.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/UMLClassDiagram.java
index 629c3a4..227a633 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/UMLClassDiagram.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/uml/UMLClassDiagram.java
@@ -29,7 +29,7 @@
shell.setLayout(new FillLayout());
FigureCanvas canvas = new FigureCanvas(shell);
- canvas.setBackground(ColorConstants.white);
+ canvas.setBackground(ColorConstants.white());
Figure diagram = new Figure();
diagram.setLayoutManager(new XYLayout());
@@ -56,7 +56,7 @@
Label connLabel = new Label("connection");
connLabel.setBorder(new LineBorder());
connLabel.setOpaque(true);
- connLabel.setBackgroundColor(ColorConstants.tooltipBackground);
+ connLabel.setBackgroundColor(ColorConstants.tooltipBackground());
assoc.add(connLabel, new ConnectionLocator(assoc, ConnectionLocator.MIDDLE));
diagram.add(new StickyNote(), new Rectangle(180, 10, 90, - 1));
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/UMLClassFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/UMLClassFigure.java
index 27e9d22..5865c3d 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/UMLClassFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/UMLClassFigure.java
@@ -32,7 +32,7 @@
public UMLClassFigure(Label name) {
ToolbarLayout layout = new ToolbarLayout();
setLayoutManager(layout);
- setBorder(new LineBorder(ColorConstants.black,1));
+ setBorder(new LineBorder(ColorConstants.black(),1));
setBackgroundColor(classColor);
setOpaque(true);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/ZoomExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/ZoomExample.java
index e988729..2a1e212 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/ZoomExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/zoom/ZoomExample.java
@@ -54,7 +54,7 @@
final ScrollBar bar = new ScrollBar();
final Label l = new Label("�Zoom�");
- l.setBorder(new SchemeBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
+ l.setBorder(new SchemeBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR()));
bar.setThumb(l);
bar.setHorizontal(true);
bar.setMaximum(200);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/ParallelActivityFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/ParallelActivityFigure.java
index aa5e4e0..35250f0 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/ParallelActivityFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/ParallelActivityFigure.java
@@ -36,10 +36,10 @@
protected void paintFigure(Graphics g) {
super.paintFigure(g);
Rectangle r = getBounds();
- g.setBackgroundColor(ColorConstants.button);
+ g.setBackgroundColor(ColorConstants.button());
if (selected) {
- g.setBackgroundColor(ColorConstants.menuBackgroundSelected);
- g.setForegroundColor(ColorConstants.menuForegroundSelected);
+ g.setBackgroundColor(ColorConstants.menuBackgroundSelected());
+ g.setForegroundColor(ColorConstants.menuForegroundSelected());
}
g.fillRectangle(r.x, r.y, 3, r.height);
@@ -57,9 +57,9 @@
getFooter().setForegroundColor(null);
} else {
getHeader().setForegroundColor(
- ColorConstants.menuForegroundSelected);
+ ColorConstants.menuForegroundSelected());
getFooter().setForegroundColor(
- ColorConstants.menuForegroundSelected);
+ ColorConstants.menuForegroundSelected());
}
repaint();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SequentialActivityFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SequentialActivityFigure.java
index b841572..ca71331 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SequentialActivityFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SequentialActivityFigure.java
@@ -42,7 +42,7 @@
protected void paintFigure(Graphics graphics) {
super.paintFigure(graphics);
- graphics.setBackgroundColor(ColorConstants.button);
+ graphics.setBackgroundColor(ColorConstants.button());
Rectangle r = getBounds();
graphics.fillRectangle(r.x + 13, r.y + 10, 8, r.height - 18);
// graphics.fillPolygon(ARROW);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SimpleActivityLabel.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SimpleActivityLabel.java
index 3406970..2d3e1b9 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SimpleActivityLabel.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/flow/figures/SimpleActivityLabel.java
@@ -41,16 +41,16 @@
protected void paintFigure(Graphics graphics) {
if (selected) {
graphics.pushState();
- graphics.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+ graphics.setBackgroundColor(ColorConstants.menuBackgroundSelected());
graphics.fillRectangle(getSelectionRectangle());
graphics.popState();
- graphics.setForegroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.white());
}
if (hasFocus) {
graphics.pushState();
graphics.setXORMode(true);
- graphics.setForegroundColor(ColorConstants.menuBackgroundSelected);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.menuBackgroundSelected());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(getSelectionRectangle().resize(-1, -1));
graphics.popState();
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicResizableEditPolicy.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicResizableEditPolicy.java
index 3f562f3..daeb755 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicResizableEditPolicy.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicResizableEditPolicy.java
@@ -110,7 +110,7 @@
((RectangleFigure) figure).setXOR(true);
((RectangleFigure) figure).setFill(true);
figure.setBackgroundColor(LogicColorConstants.ghostFillColor);
- figure.setForegroundColor(ColorConstants.white);
+ figure.setForegroundColor(ColorConstants.white());
}
return figure;
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java
index 0bdb622..5c02719 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java
@@ -228,7 +228,7 @@
((RectangleFigure) figure).setXOR(true);
((RectangleFigure) figure).setFill(true);
figure.setBackgroundColor(LogicColorConstants.ghostFillColor);
- figure.setForegroundColor(ColorConstants.white);
+ figure.setForegroundColor(ColorConstants.white());
}
addFeedback(figure);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/AndGateFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/AndGateFeedbackFigure.java
index b86bd16..c1bcbcf 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/AndGateFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/AndGateFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
Rectangle r = getBounds().getCopy();
@@ -49,7 +49,7 @@
r.y += 4;
g.setForegroundColor(LogicColorConstants.ghostFillColor);
g.drawLine(r.x, r.y + 4, r.x + 10, r.y + 4);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.drawPoint(r.x, r.y + 4);
g.fillArc(r, 180, 180);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/BentCornerFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/BentCornerFigure.java
index b216dad..c5f57db 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/BentCornerFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/BentCornerFigure.java
@@ -32,11 +32,11 @@
/**
* Constructs an empty BentCornerFigure with default background color of
- * ColorConstants.tooltipBackground and default corner size.
+ * ColorConstants.tooltipBackground() and default corner size.
*/
public BentCornerFigure() {
- setBackgroundColor(ColorConstants.tooltipBackground);
- setForegroundColor(ColorConstants.tooltipForeground);
+ setBackgroundColor(ColorConstants.tooltipBackground());
+ setForegroundColor(ColorConstants.tooltipForeground());
setCornerSize(DEFAULT_CORNER_SIZE);
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitBorder.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitBorder.java
index 08322c5..1cdc64a 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitBorder.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitBorder.java
@@ -47,7 +47,7 @@
x1 = rec.x + (2 * i + 1) * width / 8;
// Draw the "gap" for the connector
- g.setForegroundColor(ColorConstants.listBackground);
+ g.setForegroundColor(ColorConstants.listBackground());
g.drawLine(x1 - 2, y1 + 2, x1 + 3, y1 + 2);
// Draw the connectors
@@ -56,7 +56,7 @@
g.fillPolygon(connector);
g.drawPolygon(connector);
connector.translate(-x1, -y1);
- g.setForegroundColor(ColorConstants.listBackground);
+ g.setForegroundColor(ColorConstants.listBackground());
g.drawLine(x1 - 2, bottom - 3, x1 + 3, bottom - 3);
g.setForegroundColor(LogicColorConstants.connectorGreen);
bottomConnector.translate(x1, bottom);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFeedbackBorder.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFeedbackBorder.java
index 0ea0093..686a11a 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFeedbackBorder.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFeedbackBorder.java
@@ -39,7 +39,7 @@
public void paint(IFigure figure, Graphics g, Insets in) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
Rectangle r = figure.getBounds().getCropped(in);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFigure.java
index 9e3cc4e..4682194 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/CircuitFigure.java
@@ -45,7 +45,7 @@
scrollpane.setContents(pane);
createConnectionAnchors();
- setBackgroundColor(ColorConstants.listBackground);
+ setBackgroundColor(ColorConstants.listBackground());
setOpaque(true);
}
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFeedbackFigure.java
index 468ec7a..3733acc 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
Rectangle r = getBounds().getCopy();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFigure.java
index 8d18006..e13dadf 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/GroundFigure.java
@@ -41,7 +41,7 @@
*/
protected void paintFigure(Graphics g) {
Rectangle r = getBounds().getCopy();
- g.setBackgroundColor(ColorConstants.yellow);
+ g.setBackgroundColor(ColorConstants.yellow());
g.fillOval(r);
r.height--;
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFeedbackFigure.java
index a73468c..122ee9d 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
Rectangle r = getBounds().getCopy();
g.translate(r.getLocation());
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFigure.java
index 33ced34..7714f6d 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LEDFigure.java
@@ -162,7 +162,7 @@
g.drawLine(right, Y1, right, Y2);
// Draw the gaps for the connectors
- g.setForegroundColor(ColorConstants.listBackground);
+ g.setForegroundColor(ColorConstants.listBackground());
for (int i = 0; i < 4; i++) {
g.drawLine(GAP_CENTERS_X[i] - 2, Y1, GAP_CENTERS_X[i] + 3, Y1);
g.drawLine(GAP_CENTERS_X[i] - 2, Y2, GAP_CENTERS_X[i] + 3, Y2);
@@ -188,7 +188,7 @@
g.fillRectangle(displayHighlight);
g.setBackgroundColor(DISPLAY_SHADOW);
g.fillRectangle(displayShadow);
- g.setBackgroundColor(ColorConstants.black);
+ g.setBackgroundColor(ColorConstants.black());
g.fillRectangle(displayRectangle);
// Draw the value
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LabelFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LabelFeedbackFigure.java
index 72904f1..1dbf8c6 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LabelFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LabelFeedbackFigure.java
@@ -24,7 +24,7 @@
Rectangle rect = getBounds().getCopy();
graphics.setXORMode(true);
- graphics.setForegroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.white());
graphics.setBackgroundColor(LogicColorConstants.ghostFillColor);
graphics.translate(getLocation());
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFeedbackFigure.java
index ec26bbc..58feb0d 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFigure.java
index b5b80fb..5f18a7c 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LiveOutputFigure.java
@@ -40,7 +40,7 @@
*/
protected void paintFigure(Graphics g) {
Rectangle r = getBounds().getCopy();
- g.setBackgroundColor(ColorConstants.yellow);
+ g.setBackgroundColor(ColorConstants.yellow());
g.fillOval(r);
r.height--;
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LogicFlowFeedbackBorder.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LogicFlowFeedbackBorder.java
index b81ae95..6cdeb18 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LogicFlowFeedbackBorder.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/LogicFlowFeedbackBorder.java
@@ -26,7 +26,7 @@
}
public void paint(IFigure figure, Graphics graphics, Insets insets) {
- graphics.setForegroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.white());
graphics.setBackgroundColor(LogicColorConstants.ghostFillColor);
graphics.setXORMode(true);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/OrGateFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/OrGateFeedbackFigure.java
index c3ceaed..f077b45 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/OrGateFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/OrGateFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
Rectangle r = getBounds().getCopy();
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/XOrGateFeedbackFigure.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/XOrGateFeedbackFigure.java
index 1fc2539..95e04c8 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/XOrGateFeedbackFigure.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/figures/XOrGateFeedbackFigure.java
@@ -21,7 +21,7 @@
*/
protected void paintFigure(Graphics g) {
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.setBackgroundColor(LogicColorConstants.ghostFillColor);
Rectangle r = getBounds().getCopy();
r.translate(2, 2);
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editparts/GridLayer.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editparts/GridLayer.java
index 10cf2b3..3907b69 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editparts/GridLayer.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editparts/GridLayer.java
@@ -46,11 +46,11 @@
protected Point origin = new Point();
/**
- * Constructor Sets the default grid color: ColorConstants.lightGray
+ * Constructor Sets the default grid color: ColorConstants.lightGray()
*/
public GridLayer() {
super();
- setForegroundColor(ColorConstants.lightGray);
+ setForegroundColor(ColorConstants.lightGray());
}
/**
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/ConnectionEndpointEditPolicy.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/ConnectionEndpointEditPolicy.java
index 78622ce..cce8ce5 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/ConnectionEndpointEditPolicy.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/ConnectionEndpointEditPolicy.java
@@ -59,7 +59,7 @@
ConnectionFocus() {
setFill(false);
- setForegroundColor(ColorConstants.white);
+ setForegroundColor(ColorConstants.white());
setXOR(true);
setOutline(true);
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/LayoutEditPolicy.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/LayoutEditPolicy.java
index 8ce05d5..56ba37b 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/LayoutEditPolicy.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/LayoutEditPolicy.java
@@ -328,7 +328,7 @@
sizeOnDropFeedback = new RectangleFigure();
FigureUtilities.makeGhostShape((Shape) sizeOnDropFeedback);
((Shape) sizeOnDropFeedback).setLineStyle(Graphics.LINE_DASHDOT);
- sizeOnDropFeedback.setForegroundColor(ColorConstants.white);
+ sizeOnDropFeedback.setForegroundColor(ColorConstants.white());
addFeedback(sizeOnDropFeedback);
}
return sizeOnDropFeedback;
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/NonResizableEditPolicy.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/NonResizableEditPolicy.java
index 9a096bf..3787494 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/NonResizableEditPolicy.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/NonResizableEditPolicy.java
@@ -70,7 +70,7 @@
RectangleFigure r = new RectangleFigure();
FigureUtilities.makeGhostShape(r);
r.setLineStyle(Graphics.LINE_DOT);
- r.setForegroundColor(ColorConstants.white);
+ r.setForegroundColor(ColorConstants.white());
r.setBounds(getInitialFeedbackBounds());
r.validate();
addFeedback(r);
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/SnapFeedbackPolicy.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/SnapFeedbackPolicy.java
index fa896d1..88ef94d 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/SnapFeedbackPolicy.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/editpolicies/SnapFeedbackPolicy.java
@@ -192,27 +192,27 @@
Integer value;
value = (Integer) req.getExtendedData().get(
SnapToGeometry.KEY_WEST_ANCHOR);
- highlightGuide(value, ColorConstants.blue, 0);
+ highlightGuide(value, ColorConstants.blue(), 0);
value = (Integer) req.getExtendedData().get(
SnapToGeometry.KEY_NORTH_ANCHOR);
- highlightGuide(value, ColorConstants.blue, 1);
+ highlightGuide(value, ColorConstants.blue(), 1);
value = (Integer) req.getExtendedData().get(
SnapToGeometry.KEY_EAST_ANCHOR);
- highlightGuide(value, ColorConstants.blue, 2);
+ highlightGuide(value, ColorConstants.blue(), 2);
value = (Integer) req.getExtendedData().get(
SnapToGeometry.KEY_SOUTH_ANCHOR);
- highlightGuide(value, ColorConstants.blue, 3);
+ highlightGuide(value, ColorConstants.blue(), 3);
value = (Integer) req.getExtendedData().get(
SnapToGuides.KEY_VERTICAL_GUIDE);
- highlightGuide(value, ColorConstants.red, 4);
+ highlightGuide(value, ColorConstants.red(), 4);
value = (Integer) req.getExtendedData().get(
SnapToGuides.KEY_HORIZONTAL_GUIDE);
- highlightGuide(value, ColorConstants.red, 5);
+ highlightGuide(value, ColorConstants.red(), 5);
}
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/CornerTriangleBorder.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/CornerTriangleBorder.java
index c3aef76..8006e82 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/CornerTriangleBorder.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/CornerTriangleBorder.java
@@ -138,7 +138,7 @@
* @return The outline color.
*/
protected Color getBorderColor() {
- return (isPrimary()) ? ColorConstants.white : ColorConstants.black;
+ return (isPrimary()) ? ColorConstants.white() : ColorConstants.black();
}
/**
@@ -147,7 +147,7 @@
* @return The fill color.
*/
protected Color getFillColor() {
- return (isPrimary()) ? ColorConstants.black : ColorConstants.white;
+ return (isPrimary()) ? ColorConstants.black() : ColorConstants.white();
}
/**
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/SquareHandle.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/SquareHandle.java
index 03f6012..e9f264f 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/SquareHandle.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/handles/SquareHandle.java
@@ -77,7 +77,7 @@
* @return the color for the border
*/
protected Color getBorderColor() {
- return (isPrimary()) ? ColorConstants.white : ColorConstants.black;
+ return (isPrimary()) ? ColorConstants.white() : ColorConstants.black();
}
/**
@@ -86,7 +86,7 @@
* @return the color of the handle
*/
protected Color getFillColor() {
- return (isPrimary()) ? ColorConstants.black : ColorConstants.white;
+ return (isPrimary()) ? ColorConstants.black() : ColorConstants.white();
}
/**
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/PaletteColorUtil.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/PaletteColorUtil.java
index 12db510..043bc0e 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/PaletteColorUtil.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/PaletteColorUtil.java
@@ -25,15 +25,15 @@
*/
public class PaletteColorUtil {
- public static final Color WIDGET_BACKGROUND = ColorConstants.button;
+ public static final Color WIDGET_BACKGROUND = ColorConstants.button();
- public static final Color WIDGET_NORMAL_SHADOW = ColorConstants.buttonDarker;
+ public static final Color WIDGET_NORMAL_SHADOW = ColorConstants.buttonDarker();
- public static final Color WIDGET_DARK_SHADOW = ColorConstants.buttonDarkest;
+ public static final Color WIDGET_DARK_SHADOW = ColorConstants.buttonDarkest();
- public static final Color WIDGET_LIST_BACKGROUND = ColorConstants.listBackground;
+ public static final Color WIDGET_LIST_BACKGROUND = ColorConstants.listBackground();
- public static final Color INFO_FOREGROUND = ColorConstants.tooltipForeground;
+ public static final Color INFO_FOREGROUND = ColorConstants.tooltipForeground();
public static final Color ARROW_HOVER = new Color(null, 229, 229, 219);
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DetailedLabelFigure.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DetailedLabelFigure.java
index 870e255..692ca2e 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DetailedLabelFigure.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DetailedLabelFigure.java
@@ -265,7 +265,7 @@
if (super.getImage() != null) {
ImageData data = ImageUtilities
.createShadedImage(super.getImage(),
- ColorConstants.menuBackgroundSelected);
+ ColorConstants.menuBackgroundSelected());
// UNSUPPORTED - Create image using RAP supported constructor
// shadedImage = new Image(null, data,
// data.getTransparencyMask());
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DrawerFigure.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DrawerFigure.java
index 0434106..b10b754 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DrawerFigure.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DrawerFigure.java
@@ -72,7 +72,8 @@
protected static final Border TOGGLE_BUTTON_BORDER = new RaisedBorder();
/** Tooltip border constant **/
protected static final Border TOOLTIP_BORDER = new CompoundBorder(
- new SchemeBorder(SchemeBorder.SCHEMES.RAISED), new MarginBorder(1));
+ new SchemeBorder(SchemeBorder.SCHEMES.RAISED()),
+ new MarginBorder(1));
private Toggle collapseToggle;
private Label drawerLabel, tipLabel;
@@ -123,7 +124,7 @@
// draw top border of drawer figure
g.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
g.drawLine(r.getTopLeft(), r.getTopRight());
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.drawLine(r.getTopLeft().getTranslated(0, 1), r.getTopRight()
.getTranslated(0, 1));
r.crop(new Insets(2, 0, 0, 0));
@@ -135,7 +136,7 @@
// draw bottom border of drawer figure
if (!isExpanded()) {
- g.setForegroundColor(ColorConstants.white);
+ g.setForegroundColor(ColorConstants.white());
g.drawLine(r.getBottomLeft().getTranslated(0, -1), r
.getBottomRight().getTranslated(0, -1));
r.crop(new Insets(0, 0, 1, 0));
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java
index abd815f..2dbc90a 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java
@@ -26,7 +26,7 @@
protected Insets insets = new Insets(1, 1, 3, 3);
- private static final Color highlight = ColorConstants.menuBackgroundSelected,
+ private static final Color highlight = ColorConstants.menuBackgroundSelected(),
dropshadow2 = new Color(null, ViewForm.borderMiddleRGB),
dropshadow3 = new Color(null, ViewForm.borderOutsideRGB);
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/PaletteStackEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/PaletteStackEditPart.java
index 8233f2c..43a3e08 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/PaletteStackEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/PaletteStackEditPart.java
@@ -371,8 +371,8 @@
class RolloverArrow extends Clickable {
- private static final Border BORDER_TOGGLE = new ButtonBorder(
- ButtonBorder.SCHEMES.TOOLBAR);
+ private final Border BORDER_TOGGLE = new ButtonBorder(
+ ButtonBorder.SCHEMES.TOOLBAR());
/**
* Creates a new Clickable that paints a triangle figure.
@@ -381,7 +381,7 @@
super();
setRolloverEnabled(true);
setBorder(BORDER_TOGGLE);
- setBackgroundColor(ColorConstants.black);
+ setBackgroundColor(ColorConstants.black());
setOpaque(false);
setPreferredSize(11, -1);
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/RaisedBorder.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/RaisedBorder.java
index 720c9ec..79afafb 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/RaisedBorder.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/RaisedBorder.java
@@ -53,12 +53,12 @@
public void paint(IFigure figure, Graphics g, Insets insets) {
g.setLineStyle(Graphics.LINE_SOLID);
g.setLineWidth(1);
- g.setForegroundColor(ColorConstants.buttonLightest);
+ g.setForegroundColor(ColorConstants.buttonLightest());
Rectangle r = getPaintRectangle(figure, insets);
r.resize(-1, -1);
g.drawLine(r.x, r.y, r.right(), r.y);
g.drawLine(r.x, r.y, r.x, r.bottom());
- g.setForegroundColor(ColorConstants.buttonDarker);
+ g.setForegroundColor(ColorConstants.buttonDarker());
g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
g.drawLine(r.right(), r.y, r.right(), r.bottom());
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorBorder.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorBorder.java
index 6ba2afd..05f2acf 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorBorder.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorBorder.java
@@ -26,7 +26,7 @@
public void paint(IFigure f, Graphics g, Insets i) {
Rectangle r = getPaintRectangle(f, i);
r.height--;
- g.setForegroundColor(ColorConstants.buttonDarker);
+ g.setForegroundColor(ColorConstants.buttonDarker());
g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorEditPart.java
index bc7476c..b38573f 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SeparatorEditPart.java
@@ -85,7 +85,7 @@
g.drawLine(r.getBottomLeft(), r.getTopLeft());
g.drawLine(r.getTopLeft(), r.getTopRight());
- g.setForegroundColor(ColorConstants.buttonLightest);
+ g.setForegroundColor(ColorConstants.buttonLightest());
g.drawLine(r.getBottomLeft(), r.getBottomRight());
g.drawLine(r.getBottomRight(), r.getTopRight());
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java
index 9be263c..fba8906 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java
@@ -32,8 +32,8 @@
public IFigure createFigure() {
Figure figure = new Figure();
figure.setOpaque(true);
- figure.setForegroundColor(ColorConstants.listForeground);
- figure.setBackgroundColor(ColorConstants.listBackground);
+ figure.setForegroundColor(ColorConstants.listForeground());
+ figure.setBackgroundColor(ColorConstants.listBackground());
return figure;
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/ToolEntryEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/ToolEntryEditPart.java
index cbf3889..a55130d 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/ToolEntryEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/editparts/ToolEntryEditPart.java
@@ -254,7 +254,7 @@
setBorder(null);
}
setRolloverEnabled(false);
- setForegroundColor(ColorConstants.gray);
+ setForegroundColor(ColorConstants.gray());
}
}
@@ -286,8 +286,8 @@
if (getBorder() != null)
getBorder().paint(this, graphics, NO_INSETS);
if (hasFocus()) {
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
Rectangle area = isToolbarItem() ? getClientArea()
: getSelectionRectangle(getLayoutSetting(),
@@ -366,8 +366,8 @@
};
}
- static final Border TOOLBAR_ITEM_BORDER = new ButtonBorder(
- ButtonBorder.SCHEMES.TOOLBAR);
+ final Border TOOLBAR_ITEM_BORDER = new ButtonBorder(
+ ButtonBorder.SCHEMES.TOOLBAR());
// The following are the insets that the bounds of the label figure should
// be
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideEditPart.java
index e5c97ff..81822e1 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideEditPart.java
@@ -301,7 +301,7 @@
protected void paintFigure(Graphics g) {
g.setLineStyle(Graphics.LINE_DOT);
g.setXORMode(true);
- g.setForegroundColor(ColorConstants.darkGray);
+ g.setForegroundColor(ColorConstants.darkGray());
if (bounds.width > bounds.height) {
g.drawLine(bounds.x, bounds.y, bounds.right(), bounds.y);
g.drawLine(bounds.x + 2, bounds.y, bounds.right(), bounds.y);
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideFigure.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideFigure.java
index 886ffd8..d35ed64 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideFigure.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuideFigure.java
@@ -33,7 +33,7 @@
public GuideFigure(boolean isHorizontal) {
horizontal = isHorizontal;
- setBackgroundColor(ColorConstants.button);
+ setBackgroundColor(ColorConstants.button());
if (horizontal) {
setCursor(SharedCursors.SIZENS);
} else {
@@ -94,7 +94,7 @@
graphics.fillRectangle(clientArea
.getShrinked(new Insets(2, 2, 2, 1)));
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawLine(clientArea.x, clientArea.y + 1, clientArea.x,
clientArea.y + 7);
graphics.drawLine(clientArea.x + 1, clientArea.y, clientArea.x + 4,
@@ -112,7 +112,7 @@
graphics.drawLine(clientArea.x + 7, clientArea.y + 3,
clientArea.x + 7, clientArea.y + 5);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
graphics.drawLine(clientArea.x + 1, clientArea.y + 1,
clientArea.x + 4, clientArea.y + 1);
graphics.drawLine(clientArea.x + 1, clientArea.y + 2,
@@ -124,7 +124,7 @@
graphics.drawLine(clientArea.x + 6, clientArea.y + 3,
clientArea.x + 6, clientArea.y + 3);
- graphics.setForegroundColor(ColorConstants.buttonDarkest);
+ graphics.setForegroundColor(ColorConstants.buttonDarkest());
graphics.drawLine(clientArea.x + 3, clientArea.y + 7,
clientArea.x + 4, clientArea.y + 7);
graphics.drawLine(clientArea.x + 5, clientArea.y + 6,
@@ -137,8 +137,8 @@
if (drawFocus) {
clientArea.expand(1, 1);
clientArea.height -= 1;
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(clientArea);
}
} else {
@@ -150,7 +150,7 @@
graphics.fillRectangle(clientArea
.getShrinked(new Insets(2, 2, 1, 2)));
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawLine(clientArea.x + 1, clientArea.y, clientArea.x + 7,
clientArea.y);
graphics.drawLine(clientArea.x, clientArea.y + 1, clientArea.x,
@@ -168,7 +168,7 @@
graphics.drawLine(clientArea.x + 3, clientArea.y + 7,
clientArea.x + 5, clientArea.y + 7);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
graphics.drawLine(clientArea.x + 1, clientArea.y + 1,
clientArea.x + 1, clientArea.y + 4);
graphics.drawLine(clientArea.x + 2, clientArea.y + 1,
@@ -180,7 +180,7 @@
graphics.drawLine(clientArea.x + 3, clientArea.y + 6,
clientArea.x + 3, clientArea.y + 6);
- graphics.setForegroundColor(ColorConstants.buttonDarkest);
+ graphics.setForegroundColor(ColorConstants.buttonDarkest());
graphics.drawLine(clientArea.x + 7, clientArea.y + 3,
clientArea.x + 7, clientArea.y + 4);
graphics.drawLine(clientArea.x + 6, clientArea.y + 5,
@@ -193,8 +193,8 @@
if (drawFocus) {
clientArea.expand(1, 1);
clientArea.width -= 1;
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(clientArea);
}
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuidePlaceHolder.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuidePlaceHolder.java
index 17f8d09..b55a6ad 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuidePlaceHolder.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/GuidePlaceHolder.java
@@ -22,7 +22,7 @@
public GuidePlaceHolder(boolean isHorizontal) {
super(isHorizontal);
- setBackgroundColor(ColorConstants.lightGray);
+ setBackgroundColor(ColorConstants.lightGray());
}
protected void paintFigure(Graphics graphics) {
@@ -38,7 +38,7 @@
list.addPoint(clientArea.x, clientArea.y + 6);
graphics.fillPolygon(list);
graphics.drawPolygon(list);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawLine(clientArea.x - 1, clientArea.y, clientArea.x - 1,
clientArea.y + 6);
graphics.drawLine(clientArea.x, clientArea.y - 1, clientArea.x + 3,
@@ -56,7 +56,7 @@
list.addPoint(clientArea.x, clientArea.y + 3);
graphics.fillPolygon(list);
graphics.drawPolygon(list);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawLine(clientArea.x, clientArea.y - 1, clientArea.x + 6,
clientArea.y - 1);
graphics.drawLine(clientArea.x - 1, clientArea.y, clientArea.x - 1,
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerFigure.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerFigure.java
index 685fa0f..1c1d332 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerFigure.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerFigure.java
@@ -65,8 +65,8 @@
public RulerFigure(boolean isHorizontal, int measurementUnit) {
setHorizontal(isHorizontal);
setUnit(measurementUnit);
- setBackgroundColor(ColorConstants.listBackground);
- setForegroundColor(ColorConstants.listForeground);
+ setBackgroundColor(ColorConstants.listBackground());
+ setForegroundColor(ColorConstants.listForeground());
setOpaque(true);
setLayoutManager(new RulerLayout());
}
@@ -371,7 +371,7 @@
}
// paint the border
clippedBounds.expand(BORDER_WIDTH, 0);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
graphics.drawLine(
transposer.t(clippedBounds.getTopRight().translate(-1, -1)),
transposer.t(clippedBounds.getBottomRight().translate(-1, -1)));
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerRootEditPart.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerRootEditPart.java
index 5e5de0f..f3ded86 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerRootEditPart.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/rulers/RulerRootEditPart.java
@@ -210,8 +210,8 @@
focusBounds.resize(-4, -2);
focusBounds.y++;
}
- graphics.setForegroundColor(ColorConstants.black);
- graphics.setBackgroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.black());
+ graphics.setBackgroundColor(ColorConstants.white());
graphics.drawFocus(focusBounds);
}
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/DirectEditManager.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/DirectEditManager.java
index 40f8937..254b818 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/DirectEditManager.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/DirectEditManager.java
@@ -50,7 +50,7 @@
*/
public abstract class DirectEditManager {
- private static final Color BLUE = ColorConstants.menuBackgroundSelected;
+ private static final Color BLUE = ColorConstants.menuBackgroundSelected();
private static final Border BORDER_FRAME = new DirectEditBorder();
private AncestorListener ancestorListener;
@@ -465,12 +465,12 @@
public void paint(IFigure figure, Graphics graphics, Insets insets) {
Rectangle rect = getPaintRectangle(figure, insets);
- graphics.setForegroundColor(ColorConstants.white);
+ graphics.setForegroundColor(ColorConstants.white());
graphics.drawLine(rect.x, rect.y, rect.x, rect.bottom());
rect.x++;
rect.width--;
rect.resize(-1, -1);
- graphics.setForegroundColor(ColorConstants.black);
+ graphics.setForegroundColor(ColorConstants.black());
graphics.drawLine(rect.x + 2, rect.bottom(), rect.right(),
rect.bottom());
graphics.drawLine(rect.right(), rect.bottom(), rect.right(),
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/MarqueeSelectionTool.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/MarqueeSelectionTool.java
index d5ee629..53d661a 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/MarqueeSelectionTool.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/MarqueeSelectionTool.java
@@ -92,8 +92,8 @@
graphics.translate(getLocation());
graphics.setXORMode(true);
- graphics.setForegroundColor(ColorConstants.white);
- graphics.setBackgroundColor(ColorConstants.black);
+ graphics.setForegroundColor(ColorConstants.white());
+ graphics.setBackgroundColor(ColorConstants.black());
graphics.setLineStyle(Graphics.LINE_DOT);
int[] points = new int[6];
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
index 0d60072..001e9e3 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
@@ -1222,7 +1222,7 @@
Label tooltip = new Label(getText());
tooltip.setBorder(TOOL_TIP_BORDER);
setToolTip(tooltip);
- setForegroundColor(ColorConstants.listForeground);
+ setForegroundColor(ColorConstants.listForeground());
}
public IFigure getToolTip() {
@@ -1308,7 +1308,7 @@
lws.setControl(this);
final ArrowButton b = new ArrowButton(getArrowDirection());
b.setRolloverEnabled(true);
- b.setBorder(new ButtonBorder(ButtonBorder.SCHEMES.TOOLBAR));
+ b.setBorder(new ButtonBorder(ButtonBorder.SCHEMES.TOOLBAR()));
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
transferFocus = true;
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteCustomizerDialog.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteCustomizerDialog.java
index 50057e6..4743c30 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteCustomizerDialog.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteCustomizerDialog.java
@@ -536,12 +536,12 @@
GC gc = e.gc;
// UNSUPPORTED - api not implemented in RAP
// gc.setLineStyle(SWT.LINE_SOLID);
- gc.setForeground(ColorConstants.buttonDarker);
+ gc.setForeground(ColorConstants.buttonDarker());
gc.drawLine(area.x, area.y, area.x + area.width - 2, area.y);
gc.drawLine(area.x, area.y, area.x, area.y + area.height - 1);
gc.drawLine(area.x + area.width - 2, area.y, area.x
+ area.width - 2, area.y + area.height - 1);
- gc.setForeground(ColorConstants.buttonLightest);
+ gc.setForeground(ColorConstants.buttonLightest());
gc.drawLine(area.x + 1, area.y + 1, area.x + area.width - 3,
area.y + 1);
gc.drawLine(area.x + area.width - 1, area.y + 1, area.x
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteLabelProvider.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteLabelProvider.java
index 3b5008e..e0bc817 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteLabelProvider.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/customize/PaletteLabelProvider.java
@@ -72,7 +72,7 @@
public Color getForeground(Object element) {
PaletteEntry entry = (PaletteEntry) element;
if (!entry.isVisible() || !entry.getParent().isVisible()) {
- return ColorConstants.gray;
+ return ColorConstants.gray();
}
return null;
}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalEditor.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalEditor.java
index 90025b3..21cd036 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalEditor.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalEditor.java
@@ -110,7 +110,7 @@
*/
protected void configureGraphicalViewer() {
getGraphicalViewer().getControl().setBackground(
- ColorConstants.listBackground);
+ ColorConstants.listBackground());
}
/**
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/Splitter.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/Splitter.java
index f15ed0c..bcecbd9 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/Splitter.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/Splitter.java
@@ -200,7 +200,7 @@
: SWT.HORIZONTAL;
for (int i = sashes.length; i < newSashes.length; i++) {
newSashes[i] = new Sash(this, sashOrientation);
- newSashes[i].setBackground(ColorConstants.button);
+ newSashes[i].setBackground(ColorConstants.button());
newSashes[i].addListener(SWT.Paint, new SashPainter());
newSashes[i].addListener(SWT.Selection, sashListener);
}
@@ -268,15 +268,15 @@
return;
Point size = sash.getSize();
if (getOrientation() == SWT.HORIZONTAL) {
- gc.setForeground(ColorConstants.buttonDarker);
+ gc.setForeground(ColorConstants.buttonDarker());
gc.drawLine(getSashWidth() - 1, 0, getSashWidth() - 1, size.y);
- gc.setForeground(ColorConstants.buttonLightest);
+ gc.setForeground(ColorConstants.buttonLightest());
gc.drawLine(0, 0, 0, size.y);
} else {
- gc.setForeground(ColorConstants.buttonDarker);
+ gc.setForeground(ColorConstants.buttonDarker());
gc.drawLine(0, 0, size.x, 0);
gc.drawLine(0, getSashWidth() - 1, size.x, getSashWidth() - 1);
- gc.setForeground(ColorConstants.buttonLightest);
+ gc.setForeground(ColorConstants.buttonLightest());
gc.drawLine(0, 1, size.x, 1);
}
}
@@ -360,7 +360,7 @@
for (int i = 0; i < sashes.length; i++) {
sashes[i].dispose();
sashes[i] = new Sash(this, sashOrientation);
- sashes[i].setBackground(ColorConstants.buttonLightest);
+ sashes[i].setBackground(ColorConstants.buttonLightest());
sashes[i].addListener(SWT.Selection, sashListener);
}
layout();
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/rulers/RulerComposite.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/rulers/RulerComposite.java
index 069966c..be63830 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/rulers/RulerComposite.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/rulers/RulerComposite.java
@@ -466,7 +466,7 @@
* org.eclipse.draw2d.Graphics, org.eclipse.draw2d.geometry.Insets)
*/
public void paint(IFigure figure, Graphics graphics, Insets insets) {
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
if (horizontal) {
graphics.drawLine(
figure.getBounds().getTopLeft(),
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/Graph.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/Graph.java
index 31adcf2..128bcae 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/Graph.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/Graph.java
@@ -80,8 +80,8 @@
public Color DARK_BLUE = null;
public Color LIGHT_YELLOW = null;
- public Color HIGHLIGHT_COLOR = ColorConstants.yellow;
- public Color HIGHLIGHT_ADJACENT_COLOR = ColorConstants.orange;
+ public Color HIGHLIGHT_COLOR = ColorConstants.yellow();
+ public Color HIGHLIGHT_ADJACENT_COLOR = ColorConstants.orange();
public Color DEFAULT_NODE_COLOR = LIGHT_BLUE;
/**
@@ -123,7 +123,7 @@
public Graph(Composite parent, int style) {
super(parent, style | SWT.DOUBLE_BUFFERED);
this.style = style;
- this.setBackground(ColorConstants.white);
+ this.setBackground(ColorConstants.white());
LIGHT_BLUE = new Color(Display.getDefault(), 216, 228, 248);
LIGHT_BLUE_CYAN = new Color(Display.getDefault(), 213, 243, 255);
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphConnection.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphConnection.java
index 5f45ceb..b35b104 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphConnection.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphConnection.java
@@ -84,8 +84,8 @@
this.sourceNode = source;
this.destinationNode = destination;
this.visible = true;
- this.color = ColorConstants.lightGray;
- this.foreground = ColorConstants.lightGray;
+ this.color = ColorConstants.lightGray();
+ this.foreground = ColorConstants.lightGray();
this.highlightColor = graphModel.DARK_BLUE;
this.lineWidth = 1;
this.lineStyle = Graphics.LINE_SOLID;
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphContainer.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphContainer.java
index 68464ea..5d67eb7 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphContainer.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphContainer.java
@@ -713,7 +713,7 @@
zestLayer.setLayoutManager(new FreeformLayout());
scrollPane.setSize(computeChildArea());
scrollPane.setLocation(new Point(0, containerDimension.labelHeight - SUBLAYER_OFFSET));
- scrollPane.setForegroundColor(ColorConstants.gray);
+ scrollPane.setForegroundColor(ColorConstants.gray());
expandGraphLabel.setBackgroundColor(getBackgroundColor());
expandGraphLabel.setForegroundColor(getForegroundColor());
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphNode.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphNode.java
index 0b22a48..b8def67 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphNode.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/GraphNode.java
@@ -133,10 +133,10 @@
this.backColor = parent.getGraph().LIGHT_BLUE;
this.highlightColor = parent.getGraph().HIGHLIGHT_COLOR;
// @tag ADJACENT : Removed highlight adjacent
- //this.highlightAdjacentColor = ColorConstants.orange;
+ //this.highlightAdjacentColor = ColorConstants.orange();
this.nodeStyle = SWT.NONE;
- this.borderColor = ColorConstants.lightGray;
- this.borderHighlightColor = ColorConstants.blue;
+ this.borderColor = ColorConstants.lightGray();
+ this.borderHighlightColor = ColorConstants.blue();
this.borderWidth = 1;
this.currentLocation = new PrecisionPoint(0, 0);
this.size = new Dimension(-1, -1);
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/CachedLabel.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/CachedLabel.java
index 498e42d..30b8ecc 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/CachedLabel.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/CachedLabel.java
@@ -64,7 +64,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.draw2d.Figure#setForegroundColor(org.eclipse.swt.graphics.Color)
+ * @see
+ * org.eclipse.draw2d.Figure#setForegroundColor(org.eclipse.swt.graphics
+ * .Color)
*/
public void setForegroundColor(Color fg) {
updateInvalidation();
@@ -74,7 +76,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.draw2d.Figure#setBackgroundColor(org.eclipse.swt.graphics.Color)
+ * @see
+ * org.eclipse.draw2d.Figure#setBackgroundColor(org.eclipse.swt.graphics
+ * .Color)
*/
public void setBackgroundColor(Color bg) {
updateInvalidation();
@@ -118,10 +122,13 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.draw2d.Figure#setBounds(org.eclipse.draw2d.geometry.Rectangle)
+ * @see
+ * org.eclipse.draw2d.Figure#setBounds(org.eclipse.draw2d.geometry.Rectangle
+ * )
*/
public void setBounds(Rectangle rect) {
- boolean resize = (rect.width != bounds.width) || (rect.height != bounds.height);
+ boolean resize = (rect.width != bounds.width)
+ || (rect.height != bounds.height);
if (resize && Animation.isAnimating()) {
updateInvalidation();
@@ -166,10 +173,10 @@
}
if (!isEnabled()) {
graphics.translate(1, 1);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawText(getSubStringText(), getTextLocation());
graphics.translate(-1, -1);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
}
graphics.drawText(getText(), getTextLocation());
graphics.translate(-bounds.x, -bounds.y);
@@ -197,16 +204,17 @@
cachedImage = new Image(Display.getCurrent(), width, height);
// @tag TODO : Dispose of the image properly
- //ZestPlugin.getDefault().addImage(cachedImage.toString(), cachedImage);
-// UNSUPPORTED - image constructor not implemented in RAP
-// GC gc = new GC(cachedImage);
+ // ZestPlugin.getDefault().addImage(cachedImage.toString(),
+ // cachedImage);
+ // UNSUPPORTED - image constructor not implemented in RAP
+ // GC gc = new GC(cachedImage);
GC gc = new GC(cachedImage.getDevice());
Graphics graphics2 = new SWTGraphics(gc);
graphics2.setBackgroundColor(getBackgroundTextColor());
graphics2.fillRectangle(0, 0, width, height);
graphics2.setForegroundColor(getForegroundColor());
- //graphics2.drawText(getSubStringText(), new Point(0, 0));
+ // graphics2.drawText(getSubStringText(), new Point(0, 0));
graphics2.drawText(getText(), new Point(0, 0));
gc.dispose();
@@ -240,7 +248,7 @@
protected void cleanImage() {
if (cachedImage != null) {
- //ZestPlugin.getDefault().removeImage(cachedImage.toString());
+ // ZestPlugin.getDefault().removeImage(cachedImage.toString());
cachedImage.dispose();
cachedImage = null;
}
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/ExpandGraphLabel.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/ExpandGraphLabel.java
index 67b6cb9..13cda46 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/ExpandGraphLabel.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/ExpandGraphLabel.java
@@ -44,8 +44,8 @@
setStyle(Clickable.STYLE_TOGGLE);
triangle = new Triangle();
triangle.setSize(10, 10);
- triangle.setBackgroundColor(ColorConstants.black);
- triangle.setForegroundColor(ColorConstants.black);
+ triangle.setBackgroundColor(ColorConstants.black());
+ triangle.setForegroundColor(ColorConstants.black());
triangle.setFill(true);
triangle.setDirection(Triangle.EAST);
triangle.setLocation(new Point(5, 3));
@@ -66,7 +66,9 @@
}
/**
- * Sets the expander state (the little triangle) to ExpanderGraphLabel.OPEN or ExpanderGraphLabel.CLOSED
+ * Sets the expander state (the little triangle) to ExpanderGraphLabel.OPEN
+ * or ExpanderGraphLabel.CLOSED
+ *
* @param state
*/
public void setExpandedState(int state) {
@@ -80,7 +82,10 @@
/*
* (non-Javadoc)
- * @see org.eclipse.draw2d.ActionListener#actionPerformed(org.eclipse.draw2d.ActionEvent)
+ *
+ * @see
+ * org.eclipse.draw2d.ActionListener#actionPerformed(org.eclipse.draw2d.
+ * ActionEvent)
*/
public void actionPerformed(ActionEvent event) {
if (state == OPEN) {
@@ -100,21 +105,26 @@
this(container, "", null, cacheLabel);
}
- public ExpandGraphLabel(GraphContainer container, Image i, boolean cacheLabel) {
+ public ExpandGraphLabel(GraphContainer container, Image i,
+ boolean cacheLabel) {
this(container, "", i, cacheLabel);
}
- public ExpandGraphLabel(GraphContainer container, String text, boolean cacheLabel) {
+ public ExpandGraphLabel(GraphContainer container, String text,
+ boolean cacheLabel) {
this(container, text, null, cacheLabel);
}
- public ExpandGraphLabel(GraphContainer container, String text, Image image, boolean cacheLabel) {
+ public ExpandGraphLabel(GraphContainer container, String text, Image image,
+ boolean cacheLabel) {
this.label = new Label(text) {
/*
* This method is overwritten so that the text is not truncated.
* (non-Javadoc)
- * @see org.eclipse.draw2d.Label#paintFigure(org.eclipse.draw2d.Graphics)
+ *
+ * @see
+ * org.eclipse.draw2d.Label#paintFigure(org.eclipse.draw2d.Graphics)
*/
protected void paintFigure(Graphics graphics) {
if (isOpaque()) {
@@ -127,10 +137,10 @@
}
if (!isEnabled()) {
graphics.translate(1, 1);
- graphics.setForegroundColor(ColorConstants.buttonLightest);
+ graphics.setForegroundColor(ColorConstants.buttonLightest());
graphics.drawText(getSubStringText(), getTextLocation());
graphics.translate(-1, -1);
- graphics.setForegroundColor(ColorConstants.buttonDarker);
+ graphics.setForegroundColor(ColorConstants.buttonDarker());
}
graphics.drawText(getText(), getTextLocation());
graphics.translate(-bounds.x, -bounds.y);
@@ -148,7 +158,7 @@
this.setLayoutManager(layout);
this.add(this.expander);
this.add(this.label);
- //this.remove(this.label);
+ // this.remove(this.label);
}
/**
@@ -161,8 +171,10 @@
if (font != null) {
Dimension minSize = FigureUtilities.getTextExtents(text, font);
if (getIcon() != null) {
- org.eclipse.swt.graphics.Rectangle imageRect = getIcon().getBounds();
- int expandHeight = Math.max(imageRect.height - minSize.height, 0);
+ org.eclipse.swt.graphics.Rectangle imageRect = getIcon()
+ .getBounds();
+ int expandHeight = Math.max(imageRect.height
+ - minSize.height, 0);
minSize.expand(imageRect.width + 4, expandHeight);
}
minSize.expand(10 + (2 * 1) + 100, 4 + (2 * 1));
@@ -198,7 +210,8 @@
green = (int) (green - (green * 0.20));
green = green > 0 ? green : 0;
- Color lightenColor = new Color(Display.getCurrent(), new RGB(red, green, blue));
+ Color lightenColor = new Color(Display.getCurrent(), new RGB(red,
+ green, blue));
graphics.setForegroundColor(lightenColor);
graphics.setBackgroundColor(getBackgroundColor());
@@ -207,28 +220,28 @@
// fill in the background
Rectangle bounds = getBounds().getCopy();
Rectangle r = bounds.getCopy();
- //r.x += arcWidth / 2;
+ // r.x += arcWidth / 2;
r.y += arcWidth / 2;
- //r.width -= arcWidth;
+ // r.width -= arcWidth;
r.height -= arcWidth;
Rectangle top = bounds.getCopy();
top.height /= 2;
- //graphics.setForegroundColor(lightenColor);
- //graphics.setBackgroundColor(lightenColor);
+ // graphics.setForegroundColor(lightenColor);
+ // graphics.setBackgroundColor(lightenColor);
graphics.setForegroundColor(getBackgroundColor());
graphics.setBackgroundColor(getBackgroundColor());
graphics.fillRoundRectangle(top, arcWidth, arcWidth);
top.y = top.y + top.height;
- //graphics.setForegroundColor(getBackgroundColor());
- //graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getBackgroundColor());
+ // graphics.setBackgroundColor(getBackgroundColor());
graphics.setForegroundColor(lightenColor);
graphics.setBackgroundColor(lightenColor);
graphics.fillRoundRectangle(top, arcWidth, arcWidth);
- //graphics.setForegroundColor(lightenColor);
- //graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(lightenColor);
+ // graphics.setBackgroundColor(getBackgroundColor());
graphics.setBackgroundColor(lightenColor);
graphics.setForegroundColor(getBackgroundColor());
graphics.fillGradient(r, true);
@@ -243,31 +256,31 @@
lightenColor.dispose();
}
-// public Dimension getPreferredSize(int hint, int hint2) {
-// return this.label.getPreferredSize();
-//}
+ // public Dimension getPreferredSize(int hint, int hint2) {
+ // return this.label.getPreferredSize();
+ // }
public void setTextT(String string) {
this.setPreferredSize(null);
this.label.setText(string);
this.add(label);
- //System.out.println(this.label.getPreferredSize());
+ // System.out.println(this.label.getPreferredSize());
this.layout.layout(this);
this.invalidate();
this.revalidate();
this.validate();
- //this.remove(label);
+ // this.remove(label);
}
public void setText(String string) {
this.label.setText(string);
- //this.label.setPreferredSize(500, 30);
- //adjustBoundsToFit();
+ // this.label.setPreferredSize(500, 30);
+ // adjustBoundsToFit();
}
public void setImage(Image image) {
this.label.setIcon(image);
- //adjustBoundsToFit();
+ // adjustBoundsToFit();
}
public void setLocation(Point p) {
diff --git a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/GraphLabel.java b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/GraphLabel.java
index eecffd4..7c5b1d1 100644
--- a/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/GraphLabel.java
+++ b/bundles/org.eclipse.rap.zest.core/src/org/eclipse/zest/core/widgets/internal/GraphLabel.java
@@ -99,7 +99,7 @@
*/
protected void initLabel() {
super.setFont(Display.getDefault().getSystemFont());
- this.borderColor = ColorConstants.black;
+ this.borderColor = ColorConstants.black();
this.borderWidth = 0;
this.arcWidth = 8;
this.setLayoutManager(new StackLayout());
diff --git a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/AdvancedGraphicsTests.java b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/AdvancedGraphicsTests.java
index 7a415f4..91333c1 100644
--- a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/AdvancedGraphicsTests.java
+++ b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/AdvancedGraphicsTests.java
@@ -164,12 +164,13 @@
g.pushState();
Runnable tests[] = new Runnable[4];
- tests[0] = new AntialiasSettings(SWT.ON, SWT.ON, ColorConstants.red);
- tests[1] = new AntialiasSettings(SWT.OFF, SWT.OFF, ColorConstants.blue);
+ tests[0] = new AntialiasSettings(SWT.ON, SWT.ON, ColorConstants.red());
+ tests[1] = new AntialiasSettings(SWT.OFF, SWT.OFF,
+ ColorConstants.blue());
tests[2] = new AntialiasSettings(SWT.DEFAULT, SWT.ON,
- ColorConstants.black);
+ ColorConstants.black());
tests[3] = new AntialiasSettings(SWT.ON, SWT.DEFAULT,
- ColorConstants.darkGreen);
+ ColorConstants.darkGreen());
performTestcase(new Runnable() {
public void run() {
g.drawPolyline(LINE);
@@ -195,7 +196,7 @@
g.setAntialias(aa);
}
}
- g.setBackgroundColor(ColorConstants.red);
+ g.setBackgroundColor(ColorConstants.red());
g.pushState();
Runnable tests[] = new Runnable[3];
@@ -434,11 +435,11 @@
Font f = new Font(null, "Helvetica", 50, SWT.BOLD);
resources.push(f);
g.setFont(f);
- g.setBackgroundColor(ColorConstants.yellow);
+ g.setBackgroundColor(ColorConstants.yellow());
g.pushState();
- Pattern gradient = new Pattern(null, 0, 0, 80, 40, ColorConstants.gray,
- ColorConstants.black);
+ Pattern gradient = new Pattern(null, 0, 0, 80, 40,
+ ColorConstants.gray(), ColorConstants.black());
Pattern image = new Pattern(null, TestImages.depth_24);
resources.push(gradient);
diff --git a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/GeometryTest.java b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/GeometryTest.java
index 4b85a7e..4d6ed0e 100644
--- a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/GeometryTest.java
+++ b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/GeometryTest.java
@@ -341,8 +341,8 @@
Image image = new Image(display, IMAGE_SIZE, IMAGE_SIZE);
GC gc = new GC(image.getDevice());
cleanupImage(gc);
- gc.setBackground(ColorConstants.black);
- gc.setForeground(ColorConstants.black);
+ gc.setBackground(ColorConstants.black());
+ gc.setForeground(ColorConstants.black());
gc.fillPolygon(pointlist.toIntArray());
gc.drawPolygon(pointlist.toIntArray());
gc.dispose();
@@ -364,7 +364,7 @@
Image image = new Image(display, IMAGE_SIZE, IMAGE_SIZE);
GC gc = new GC(image.getDevice());
cleanupImage(gc);
- gc.setForeground(ColorConstants.black);
+ gc.setForeground(ColorConstants.black());
gc.drawPolyline(pointlist.toIntArray());
gc.dispose();
ImageData imageData = image.getImageData();
@@ -382,8 +382,8 @@
// Filling initial image with white color
private void cleanupImage(GC gc) {
- gc.setBackground(ColorConstants.white);
- gc.setForeground(ColorConstants.white);
+ gc.setBackground(ColorConstants.white());
+ gc.setForeground(ColorConstants.white());
gc.fillRectangle(0, 0, IMAGE_SIZE, IMAGE_SIZE);
gc.drawRectangle(0, 0, IMAGE_SIZE, IMAGE_SIZE);
}
diff --git a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/PaintDamageEraseTest.java b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/PaintDamageEraseTest.java
index 65bbae2..4d3ba08 100644
--- a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/PaintDamageEraseTest.java
+++ b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/PaintDamageEraseTest.java
@@ -191,14 +191,14 @@
container = new RectangleFigure();
}
- container.setBackgroundColor(ColorConstants.red);
+ container.setBackgroundColor(ColorConstants.red());
container.setBorder(new MarginBorder(15));
insideBox = new RectangleFigure();
container.add(insideBox);
- insideBox.setBackgroundColor(ColorConstants.green);
+ insideBox.setBackgroundColor(ColorConstants.green());
if (useRelativeCoordinates) {
insideBox.setBounds(new Rectangle(10, 10, 25, 25));
diff --git a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/RelativeBendpointTest.java b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/RelativeBendpointTest.java
index 34a02ff..b5b7744 100644
--- a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/RelativeBendpointTest.java
+++ b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/RelativeBendpointTest.java
@@ -38,7 +38,7 @@
public DiagramFigure() {
super();
setLayoutManager(new FreeformLayout());
- setBackgroundColor(ColorConstants.white);
+ setBackgroundColor(ColorConstants.white());
setOpaque(true);
}
}
@@ -47,7 +47,7 @@
public NodeFigure() {
super();
setFill(true);
- setBackgroundColor(ColorConstants.darkGray);
+ setBackgroundColor(ColorConstants.darkGray());
}
}
diff --git a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/ScalablePolygonShapeTest.java b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/ScalablePolygonShapeTest.java
index 81e729f..a9b6beb 100644
--- a/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/ScalablePolygonShapeTest.java
+++ b/tests/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/ScalablePolygonShapeTest.java
@@ -169,21 +169,21 @@
scalablePolygon.setBounds(RECTANGLE_DOUBLED_BOUNDS);
scalablePolygon.setOutline(true);
scalablePolygon.setFill(true);
- scalablePolygon.setBackgroundColor(ColorConstants.black);
- scalablePolygon.setForegroundColor(ColorConstants.black);
+ scalablePolygon.setBackgroundColor(ColorConstants.black());
+ scalablePolygon.setForegroundColor(ColorConstants.black());
Display display = Display.getDefault();
int imageSize = RECTANGLE_END * 3;
Image image = new Image(display, imageSize, imageSize);
GC gc = new GC(image.getDevice());
// Filling initial image with white color
- gc.setBackground(ColorConstants.white);
- gc.setForeground(ColorConstants.white);
+ gc.setBackground(ColorConstants.white());
+ gc.setForeground(ColorConstants.white());
gc.fillRectangle(0, 0, imageSize, imageSize);
gc.drawRectangle(0, 0, imageSize, imageSize);
- gc.setBackground(ColorConstants.black);
- gc.setForeground(ColorConstants.black);
+ gc.setBackground(ColorConstants.black());
+ gc.setForeground(ColorConstants.black());
SWTGraphics graphics = new SWTGraphics(gc);
scalablePolygon.paint(graphics);
graphics.dispose();
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/jface/GraphJFaceSnippet8.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/jface/GraphJFaceSnippet8.java
index 5f77263..e79da01 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/jface/GraphJFaceSnippet8.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/jface/GraphJFaceSnippet8.java
@@ -83,8 +83,8 @@
PolylineConnection pc = (PolylineConnection) connection
.getConnectionFigure();
pc.setLineDash(new float[] { 4 });
- pc.setTargetDecoration(createDecoration(ColorConstants.white));
- pc.setSourceDecoration(createDecoration(ColorConstants.green));
+ pc.setTargetDecoration(createDecoration(ColorConstants.white()));
+ pc.setSourceDecoration(createDecoration(ColorConstants.green()));
}
private PolygonDecoration createDecoration(final Color color) {
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet10.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet10.java
index d758288..8c59653 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet10.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet10.java
@@ -24,8 +24,8 @@
/**
*
- * This snippet shows how to create a curved connection using Zest.
- * Each time the Button is clicked, the curve changes.
+ * This snippet shows how to create a curved connection using Zest. Each time
+ * the Button is clicked, the curve changes.
*
* @author Ian Bull
*
@@ -42,26 +42,28 @@
final Graph g = new Graph(shell, SWT.NONE);
GraphNode n = new GraphNode(g, SWT.NONE, "Paper");
- n.setBorderColor(org.eclipse.draw2d.ColorConstants.yellow);
+ n.setBorderColor(org.eclipse.draw2d.ColorConstants.yellow());
n.setBorderWidth(3);
GraphNode n2 = new GraphNode(g, SWT.NONE, "Rock");
GraphNode n3 = new GraphNode(g, SWT.NONE, "Scissors");
- final GraphConnection connection = new GraphConnection(g, SWT.NONE, n, n2);
+ final GraphConnection connection = new GraphConnection(g, SWT.NONE, n,
+ n2);
connection.setLineWidth(3);
new GraphConnection(g, SWT.NONE, n2, n3);
new GraphConnection(g, SWT.NONE, n3, n);
- g.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
-
+ g.setLayoutAlgorithm(new SpringLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
+
Button button = new Button(shell, SWT.PUSH);
button.setText("Change Curve");
button.addSelectionListener(new SelectionAdapter() {
int count = 0;
+
public void widgetSelected(SelectionEvent e) {
count = ++count % 16;
- if ( count > 8 ) {
+ if (count > 8) {
connection.setCurveDepth((-16 + count) * 10);
- }
- else {
+ } else {
connection.setCurveDepth(count * 10);
}
}
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet11.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet11.java
index 4ecaf68..538ee85 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet11.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet11.java
@@ -18,7 +18,6 @@
import org.eclipse.zest.core.widgets.Graph;
import org.eclipse.zest.core.widgets.GraphConnection;
import org.eclipse.zest.core.widgets.GraphNode;
-import org.eclipse.zest.core.widgets.ZestStyles;
import org.eclipse.zest.layouts.LayoutStyles;
import org.eclipse.zest.layouts.algorithms.SpringLayoutAlgorithm;
@@ -31,14 +30,14 @@
*/
public class GraphSnippet11 {
-
- public static void createConnection( Graph g, GraphNode n1, GraphNode n2, Color color, int curve) {
+ public static void createConnection(Graph g, GraphNode n1, GraphNode n2,
+ Color color, int curve) {
GraphConnection connection = new GraphConnection(g, SWT.NONE, n1, n2);
connection.setLineColor(color);
connection.setCurveDepth(curve);
connection.setLineWidth(1);
}
-
+
public static void main(String[] args) {
Display d = new Display();
Shell shell = new Shell(d);
@@ -49,14 +48,15 @@
final Graph g = new Graph(shell, SWT.NONE);
GraphNode n = new GraphNode(g, SWT.NONE, "Node 1");
GraphNode n2 = new GraphNode(g, SWT.NONE, "Node 2");
- createConnection(g, n, n2, ColorConstants.darkGreen, 20);
- createConnection(g, n, n2, ColorConstants.darkGreen, -20);
- createConnection(g, n, n2, ColorConstants.darkBlue, 40);
- createConnection(g, n, n2, ColorConstants.darkBlue, -40);
- createConnection(g, n, n2, ColorConstants.darkGray, 60);
- createConnection(g, n, n2, ColorConstants.darkGray, -60);
- createConnection(g, n, n2, ColorConstants.black, 0);
- g.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
+ createConnection(g, n, n2, ColorConstants.darkGreen(), 20);
+ createConnection(g, n, n2, ColorConstants.darkGreen(), -20);
+ createConnection(g, n, n2, ColorConstants.darkBlue(), 40);
+ createConnection(g, n, n2, ColorConstants.darkBlue(), -40);
+ createConnection(g, n, n2, ColorConstants.darkGray(), 60);
+ createConnection(g, n, n2, ColorConstants.darkGray(), -60);
+ createConnection(g, n, n2, ColorConstants.black(), 0);
+ g.setLayoutAlgorithm(new SpringLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
shell.open();
while (!shell.isDisposed()) {
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet12.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet12.java
index 1b5b3d0..6cbaedb 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet12.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet12.java
@@ -47,51 +47,51 @@
Figure person = new Figure();
person.setLayoutManager(new FreeformLayout());
IFigure head = null;
- if ( headImage != null ) {
- headImage = new Image(headImage.getDevice(), headImage.getImageData().scaledTo(40, 50));
+ if (headImage != null) {
+ headImage = new Image(headImage.getDevice(), headImage
+ .getImageData().scaledTo(40, 50));
head = new ImageFigure(headImage);
- }
- else
+ } else
head = new Ellipse();
head.setSize(40, 50);
-
+
PolylineShape body = new PolylineShape();
body.setLineWidth(1);
- body.setStart(new Point(20,40));
- body.setEnd(new Point(20,100));
- body.setBounds(new Rectangle(0,0,40,100));
-
+ body.setStart(new Point(20, 40));
+ body.setEnd(new Point(20, 100));
+ body.setBounds(new Rectangle(0, 0, 40, 100));
+
PolylineShape leftLeg = new PolylineShape();
leftLeg.setLineWidth(1);
- leftLeg.setStart(new Point(20,100));
- leftLeg.setEnd(new Point(0,130));
- leftLeg.setBounds(new Rectangle(0,0,40,130));
-
+ leftLeg.setStart(new Point(20, 100));
+ leftLeg.setEnd(new Point(0, 130));
+ leftLeg.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape rightLeg = new PolylineShape();
rightLeg.setLineWidth(1);
- rightLeg.setStart(new Point(20,100));
- rightLeg.setEnd(new Point(40,130));
- rightLeg.setBounds(new Rectangle(0,0,40,130));
-
+ rightLeg.setStart(new Point(20, 100));
+ rightLeg.setEnd(new Point(40, 130));
+ rightLeg.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape leftArm = new PolylineShape();
leftArm.setLineWidth(1);
- leftArm.setStart(new Point(20,60));
- leftArm.setEnd(new Point(0,50));
- leftArm.setBounds(new Rectangle(0,0,40,130));
-
+ leftArm.setStart(new Point(20, 60));
+ leftArm.setEnd(new Point(0, 50));
+ leftArm.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape rightArm = new PolylineShape();
rightArm.setLineWidth(1);
- rightArm.setStart(new Point(20,60));
- rightArm.setEnd(new Point(40,50));
- rightArm.setBounds(new Rectangle(0,0,40,130));
-
+ rightArm.setStart(new Point(20, 60));
+ rightArm.setEnd(new Point(40, 50));
+ rightArm.setBounds(new Rectangle(0, 0, 40, 130));
+
person.add(head);
person.add(body);
person.add(leftLeg);
person.add(rightLeg);
person.add(leftArm);
person.add(rightArm);
- person.setSize(40,130);
+ person.setSize(40, 130);
return person;
}
@@ -102,46 +102,47 @@
shell.setLayout(new FillLayout());
shell.setSize(400, 400);
-
final Graph g = new Graph(shell, SWT.NONE);
- g.addSelectionListener(new SelectionListener(){
-
+ g.addSelectionListener(new SelectionListener() {
+
public void widgetSelected(SelectionEvent e) {
Iterator iter = g.getSelection().iterator();
- while(iter.hasNext()) {
+ while (iter.hasNext()) {
Object o = iter.next();
- if ( o instanceof CGraphNode) {
- IFigure figure = ((CGraphNode)o).getFigure();
- figure.setBackgroundColor(ColorConstants.blue);
- figure.setForegroundColor(ColorConstants.blue);
+ if (o instanceof CGraphNode) {
+ IFigure figure = ((CGraphNode) o).getFigure();
+ figure.setBackgroundColor(ColorConstants.blue());
+ figure.setForegroundColor(ColorConstants.blue());
}
}
iter = g.getNodes().iterator();
- while ( iter.hasNext()) {
+ while (iter.hasNext()) {
Object o = iter.next();
- if ( o instanceof CGraphNode) {
- if ( !g.getSelection().contains(o)) {
- ((CGraphNode)o).getFigure().setBackgroundColor(ColorConstants.black);
- ((CGraphNode)o).getFigure().setForegroundColor(ColorConstants.black);
+ if (o instanceof CGraphNode) {
+ if (!g.getSelection().contains(o)) {
+ ((CGraphNode) o).getFigure().setBackgroundColor(
+ ColorConstants.black());
+ ((CGraphNode) o).getFigure().setForegroundColor(
+ ColorConstants.black());
}
}
}
}
-
+
public void widgetDefaultSelected(SelectionEvent e) {
// TODO Auto-generated method stub
-
+
}
});
-
+
Image zx = new Image(d, "zx.png");
Image ibull = new Image(d, "ibull.jpg");
CGraphNode n = new CGraphNode(g, SWT.NONE, createPersonFigure(zx));
- CGraphNode n2 = new CGraphNode(g, SWT.NONE, createPersonFigure(ibull));
+ CGraphNode n2 = new CGraphNode(g, SWT.NONE, createPersonFigure(ibull));
GraphNode n3 = new GraphNode(g, SWT.NONE, "PDE");
GraphNode n4 = new GraphNode(g, SWT.NONE, "Zest");
GraphNode n5 = new GraphNode(g, SWT.NONE, "PDE Viz tool");
-
+
new GraphConnection(g, SWT.NONE, n, n2);
new GraphConnection(g, SWT.NONE, n, n3);
new GraphConnection(g, SWT.NONE, n2, n4);
@@ -149,7 +150,8 @@
new GraphConnection(g, SWT.NONE, n2, n5);
new GraphConnection(g, SWT.NONE, n3, n5);
new GraphConnection(g, SWT.NONE, n4, n5);
- g.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
+ g.setLayoutAlgorithm(new SpringLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
shell.open();
while (!shell.isDisposed()) {
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet13.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet13.java
index eb6d28d..24cd3f9 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet13.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet13.java
@@ -52,51 +52,51 @@
Figure person = new Figure();
person.setLayoutManager(new FreeformLayout());
IFigure head = null;
- if ( headImage != null ) {
- headImage = new Image(headImage.getDevice(), headImage.getImageData().scaledTo(40, 50));
+ if (headImage != null) {
+ headImage = new Image(headImage.getDevice(), headImage
+ .getImageData().scaledTo(40, 50));
head = new ImageFigure(headImage);
- }
- else
+ } else
head = new Ellipse();
head.setSize(40, 50);
-
+
PolylineShape body = new PolylineShape();
body.setLineWidth(1);
- body.setStart(new Point(20,40));
- body.setEnd(new Point(20,100));
- body.setBounds(new Rectangle(0,0,40,100));
-
+ body.setStart(new Point(20, 40));
+ body.setEnd(new Point(20, 100));
+ body.setBounds(new Rectangle(0, 0, 40, 100));
+
PolylineShape leftLeg = new PolylineShape();
leftLeg.setLineWidth(1);
- leftLeg.setStart(new Point(20,100));
- leftLeg.setEnd(new Point(0,130));
- leftLeg.setBounds(new Rectangle(0,0,40,130));
-
+ leftLeg.setStart(new Point(20, 100));
+ leftLeg.setEnd(new Point(0, 130));
+ leftLeg.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape rightLeg = new PolylineShape();
rightLeg.setLineWidth(1);
- rightLeg.setStart(new Point(20,100));
- rightLeg.setEnd(new Point(40,130));
- rightLeg.setBounds(new Rectangle(0,0,40,130));
-
+ rightLeg.setStart(new Point(20, 100));
+ rightLeg.setEnd(new Point(40, 130));
+ rightLeg.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape leftArm = new PolylineShape();
leftArm.setLineWidth(1);
- leftArm.setStart(new Point(20,60));
- leftArm.setEnd(new Point(0,50));
- leftArm.setBounds(new Rectangle(0,0,40,130));
-
+ leftArm.setStart(new Point(20, 60));
+ leftArm.setEnd(new Point(0, 50));
+ leftArm.setBounds(new Rectangle(0, 0, 40, 130));
+
PolylineShape rightArm = new PolylineShape();
rightArm.setLineWidth(1);
- rightArm.setStart(new Point(20,60));
- rightArm.setEnd(new Point(40,50));
- rightArm.setBounds(new Rectangle(0,0,40,130));
-
+ rightArm.setStart(new Point(20, 60));
+ rightArm.setEnd(new Point(40, 50));
+ rightArm.setBounds(new Rectangle(0, 0, 40, 130));
+
person.add(head);
person.add(body);
person.add(leftLeg);
person.add(rightLeg);
person.add(leftArm);
person.add(rightArm);
- person.setSize(40,130);
+ person.setSize(40, 130);
return person;
}
@@ -107,41 +107,42 @@
shell.setLayout(new FillLayout());
shell.setSize(400, 400);
-
final Graph g = new Graph(shell, SWT.NONE);
- g.addSelectionListener(new SelectionListener(){
-
+ g.addSelectionListener(new SelectionListener() {
+
public void widgetSelected(SelectionEvent e) {
Iterator iter = g.getSelection().iterator();
- while(iter.hasNext()) {
+ while (iter.hasNext()) {
Object o = iter.next();
- if ( o instanceof CGraphNode) {
- IFigure figure = ((CGraphNode)o).getFigure();
- figure.setBackgroundColor(ColorConstants.blue);
- figure.setForegroundColor(ColorConstants.blue);
+ if (o instanceof CGraphNode) {
+ IFigure figure = ((CGraphNode) o).getFigure();
+ figure.setBackgroundColor(ColorConstants.blue());
+ figure.setForegroundColor(ColorConstants.blue());
}
}
iter = g.getNodes().iterator();
- while ( iter.hasNext()) {
+ while (iter.hasNext()) {
Object o = iter.next();
- if ( o instanceof CGraphNode) {
- if ( !g.getSelection().contains(o)) {
- ((CGraphNode)o).getFigure().setBackgroundColor(ColorConstants.black);
- ((CGraphNode)o).getFigure().setForegroundColor(ColorConstants.black);
+ if (o instanceof CGraphNode) {
+ if (!g.getSelection().contains(o)) {
+ ((CGraphNode) o).getFigure().setBackgroundColor(
+ ColorConstants.black());
+ ((CGraphNode) o).getFigure().setForegroundColor(
+ ColorConstants.black());
}
}
}
}
-
+
public void widgetDefaultSelected(SelectionEvent e) {
// TODO Auto-generated method stub
-
+
}
});
-
+
Image zx = new Image(d, "zxsnow.png");
IFigure tooltip = new Figure();
- tooltip.setBorder(new MarginBorder(5,5,5,5));
+ tooltip.setBorder(new MarginBorder(5, 5, 5, 5));
FlowLayout layout = new FlowLayout(false);
layout.setMajorSpacing(3);
layout.setMinorAlignment(3);
@@ -149,25 +150,27 @@
tooltip.add(new ImageFigure(zx));
tooltip.add(new Label("Name: " + "Chris Aniszczyk"));
tooltip.add(new Label("Location: " + "Austin, Texas"));
-
+
Image ibull = new Image(d, "ibull.jpg");
GraphContainer c1 = new GraphContainer(g, SWT.NONE);
c1.setText("Canada");
GraphContainer c2 = new GraphContainer(g, SWT.NONE);
c2.setText("USA");
-
+
GraphNode n1 = new GraphNode(c1, SWT.NONE, "Ian B.");
n1.setSize(200, 100);
GraphNode n2 = new GraphNode(c2, SWT.NONE, "Chris A.");
n2.setTooltip(tooltip);
-
- GraphConnection connection = new GraphConnection(g, ZestStyles.CONNECTIONS_DIRECTED, n1, n2);
+
+ GraphConnection connection = new GraphConnection(g,
+ ZestStyles.CONNECTIONS_DIRECTED, n1, n2);
connection.setCurveDepth(-30);
- GraphConnection connection2 = new GraphConnection(g, ZestStyles.CONNECTIONS_DIRECTED, n2, n1);
+ GraphConnection connection2 = new GraphConnection(g,
+ ZestStyles.CONNECTIONS_DIRECTED, n2, n1);
connection2.setCurveDepth(-30);
-
-
- g.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
+
+ g.setLayoutAlgorithm(new SpringLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
shell.open();
while (!shell.isDisposed()) {
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet8.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet8.java
index c9e2b2e..cd184e3 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet8.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/GraphSnippet8.java
@@ -24,8 +24,8 @@
import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
/**
- * This snippet shows how to filter elements in the layout. The Data on the tree
- * connections are set to "False", meaning they won't be filtered.
+ * This snippet shows how to filter elements in the layout. The Data on the tree
+ * connections are set to "False", meaning they won't be filtered.
*
* @author Ian Bull
*
@@ -68,46 +68,53 @@
connection.setData(Boolean.FALSE);
connection = new GraphConnection(graph, SWT.NONE, d, h);
connection.setData(Boolean.FALSE);
-
- connection = new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, b, c);
- connection.setLineColor(ColorConstants.red);
+
+ connection = new GraphConnection(graph,
+ ZestStyles.CONNECTIONS_DIRECTED, b, c);
+ connection.setLineColor(ColorConstants.red());
connection.setLineWidth(3);
- connection = new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, c, d);
- connection.setLineColor(ColorConstants.red);
+ connection = new GraphConnection(graph,
+ ZestStyles.CONNECTIONS_DIRECTED, c, d);
+ connection.setLineColor(ColorConstants.red());
connection.setLineWidth(3);
- connection = new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, e, f);
- connection.setLineColor(ColorConstants.red);
+ connection = new GraphConnection(graph,
+ ZestStyles.CONNECTIONS_DIRECTED, e, f);
+ connection.setLineColor(ColorConstants.red());
connection.setLineWidth(3);
- connection = new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, f, g);
- connection.setLineColor(ColorConstants.red);
+ connection = new GraphConnection(graph,
+ ZestStyles.CONNECTIONS_DIRECTED, f, g);
+ connection.setLineColor(ColorConstants.red());
connection.setLineWidth(3);
-
- connection = new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, h, e);
- connection.setLineColor(ColorConstants.red);
+
+ connection = new GraphConnection(graph,
+ ZestStyles.CONNECTIONS_DIRECTED, h, e);
+ connection.setLineColor(ColorConstants.red());
connection.setLineWidth(3);
-
- TreeLayoutAlgorithm treeLayoutAlgorithm = new TreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+
+ TreeLayoutAlgorithm treeLayoutAlgorithm = new TreeLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING);
Filter filter = new Filter() {
public boolean isObjectFiltered(LayoutItem item) {
// Get the "Connection" from the Layout Item
// and use this connection to get the "Graph Data"
Object object = item.getGraphData();
- if (object instanceof GraphConnection ) {
+ if (object instanceof GraphConnection) {
GraphConnection connection = (GraphConnection) object;
- if ( connection.getData() != null && connection.getData() instanceof Boolean ) {
- // If the data is false, don't filter, otherwise, filter.
- return ((Boolean)connection.getData()).booleanValue();
+ if (connection.getData() != null
+ && connection.getData() instanceof Boolean) {
+ // If the data is false, don't filter, otherwise,
+ // filter.
+ return ((Boolean) connection.getData()).booleanValue();
}
return true;
}
return false;
}
-
+
};
treeLayoutAlgorithm.setFilter(filter);
graph.setLayoutAlgorithm(treeLayoutAlgorithm, true);
-
shell.open();
while (!shell.isDisposed()) {
diff --git a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/uml/UMLClassFigure.java b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/uml/UMLClassFigure.java
index 6a97d69..5851162 100644
--- a/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/uml/UMLClassFigure.java
+++ b/tests/org.eclipse.zest.tests/src/org/eclipse/zest/tests/uml/UMLClassFigure.java
@@ -23,7 +23,7 @@
public UMLClassFigure(Label name) {
ToolbarLayout layout = new ToolbarLayout();
setLayoutManager(layout);
- setBorder(new LineBorder(ColorConstants.black, 1));
+ setBorder(new LineBorder(ColorConstants.black(), 1));
setBackgroundColor(UMLExample.classColor);
setOpaque(true);