summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2010-08-24 07:41:56 (EDT)
committerSteffen Kriese2010-08-24 07:41:56 (EDT)
commitb03187a295b41d526bb5097b0bc666ec0ed86681 (patch)
tree64501c9bb2f707aee5eff355d3ebe42428232f24
parent0fe67644ae708bf602b86846bcecffdb49a8a3c7 (diff)
downloadorg.eclipse.riena.rap-b03187a295b41d526bb5097b0bc666ec0ed86681.zip
org.eclipse.riena.rap-b03187a295b41d526bb5097b0bc666ec0ed86681.tar.gz
org.eclipse.riena.rap-b03187a295b41d526bb5097b0bc666ec0ed86681.tar.bz2
Extended the GCFAcade to single source the StatusMeterRidget
-rw-r--r--org.eclipse.riena.ui.swt.rap/src/org/eclipse/riena/ui/swt/facades/GCFacadeRAP.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.riena.ui.swt.rap/src/org/eclipse/riena/ui/swt/facades/GCFacadeRAP.java b/org.eclipse.riena.ui.swt.rap/src/org/eclipse/riena/ui/swt/facades/GCFacadeRAP.java
index 61d15ff..520f9e2 100644
--- a/org.eclipse.riena.ui.swt.rap/src/org/eclipse/riena/ui/swt/facades/GCFacadeRAP.java
+++ b/org.eclipse.riena.ui.swt.rap/src/org/eclipse/riena/ui/swt/facades/GCFacadeRAP.java
@@ -13,7 +13,11 @@ package org.eclipse.riena.ui.swt.facades;
import org.eclipse.rwt.graphics.Graphics;
import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Display;
/**
* Implements {@link GCFacade} for RAP.
@@ -52,4 +56,16 @@ public class GCFacadeRAP extends GCFacade {
// do nothing
}
+ @Override
+ public GC createGCFromImage(final Image img) {
+ return new GC(Display.getCurrent());
+ }
+
+ @Override
+ public Image createImage(final Display display, final int width, final int height) {
+ final ImageData data = new ImageData(width, height, 24, new PaletteData(0xFF, 0xFF00, 0xFF0000));
+ final Image img = new Image(display, data);
+ return img;
+ }
+
}