From 2fd5ea46f6759c1e94ac52250327ca6bfd7a25a4 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Tue, 16 Jun 2015 13:13:27 +0900 Subject: [PATCH] VMButton: redefine inheritance relationship of VMButtonPainter classes Change-Id: I348799539086d1d52c5a95261ad2a41710753cec Signed-off-by: jihye424.kim --- .../emulator/manager/ui/widgets/CommonVMButtonPainter.java | 8 ++++---- .../tizen/emulator/manager/ui/widgets/IVMButtonPainter.java | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/org/tizen/emulator/manager/ui/widgets/CommonVMButtonPainter.java b/src/org/tizen/emulator/manager/ui/widgets/CommonVMButtonPainter.java index 32477fc..ac92c1b 100644 --- a/src/org/tizen/emulator/manager/ui/widgets/CommonVMButtonPainter.java +++ b/src/org/tizen/emulator/manager/ui/widgets/CommonVMButtonPainter.java @@ -31,7 +31,6 @@ package org.tizen.emulator.manager.ui.widgets; import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; @@ -40,7 +39,7 @@ import org.tizen.emulator.manager.platform.Skin; import org.tizen.emulator.manager.plugin.PluginImageResources; import org.tizen.emulator.manager.vms.SKIN_SHAPE; -public abstract class CommonVMButtonPainter implements PaintListener { +public abstract class CommonVMButtonPainter implements IVMButtonPainter { protected int BUTTON_X_OFFSET = 2; protected int BUTTON_Y_OFFSET = 3; @@ -53,8 +52,6 @@ public abstract class CommonVMButtonPainter implements PaintListener { protected int LAUNCH_BUTTON_BOTTOM_OFFSET = 13; protected int TITLE_X_OFFSET = 9; - public abstract void drawButtonText(GC gc, Rectangle rect, VMButton button); - @Override public void paintControl(PaintEvent e) { VMButton button = (VMButton) e.widget; @@ -113,14 +110,17 @@ public abstract class CommonVMButtonPainter implements PaintListener { drawButtonText(gc, rect, button); } + @Override public int getLaunchButtonLeftOffset() { return LAUNCH_BUTTON_LEFT_OFFSET; } + @Override public int getLaunchButtonBottomOffset() { return LAUNCH_BUTTON_BOTTOM_OFFSET; } + @Override public int getTitleOffset() { return TITLE_X_OFFSET; } diff --git a/src/org/tizen/emulator/manager/ui/widgets/IVMButtonPainter.java b/src/org/tizen/emulator/manager/ui/widgets/IVMButtonPainter.java index 1903260..4223d53 100644 --- a/src/org/tizen/emulator/manager/ui/widgets/IVMButtonPainter.java +++ b/src/org/tizen/emulator/manager/ui/widgets/IVMButtonPainter.java @@ -4,7 +4,7 @@ * * Contact: * Minkee Lee - * JiHye Kim + * Jihye kim * SeokYeon Hwang * Sangho Park * @@ -27,12 +27,16 @@ * */ - package org.tizen.emulator.manager.ui.widgets; -public interface IVMButtonPainter { +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +public interface IVMButtonPainter extends PaintListener { + public void drawButtonText(GC gc, Rectangle rect, VMButton button); // Offset in VMButton. public int getLaunchButtonBottomOffset(); public int getLaunchButtonLeftOffset(); + public int getTitleOffset(); } -- 2.7.4