summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Karbach2012-03-14 06:09:26 (EDT)
committer Claudia Knobloch2012-03-14 06:09:26 (EDT)
commit0e456b9849942cd6ba8b202380253ea3d17589eb (patch)
tree81eea34768bc4c21d8daf994fe583026939bd8cb
parentbd9c2fcf2f04287c755171b211bbb525c094d56c (diff)
downloadorg.eclipse.ptp-0e456b9849942cd6ba8b202380253ea3d17589eb.zip
org.eclipse.ptp-0e456b9849942cd6ba8b202380253ea3d17589eb.tar.gz
org.eclipse.ptp-0e456b9849942cd6ba8b202380253ea3d17589eb.tar.bz2
Bug 372686
-rw-r--r--rms/org.eclipse.ptp.rm.lml.ui/src/org/eclipse/ptp/rm/lml/ui/providers/Usagebar.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/rms/org.eclipse.ptp.rm.lml.ui/src/org/eclipse/ptp/rm/lml/ui/providers/Usagebar.java b/rms/org.eclipse.ptp.rm.lml.ui/src/org/eclipse/ptp/rm/lml/ui/providers/Usagebar.java
index a44d3ac..e9dee57 100644
--- a/rms/org.eclipse.ptp.rm.lml.ui/src/org/eclipse/ptp/rm/lml/ui/providers/Usagebar.java
+++ b/rms/org.eclipse.ptp.rm.lml.ui/src/org/eclipse/ptp/rm/lml/ui/providers/Usagebar.java
@@ -104,6 +104,7 @@ public class Usagebar extends LguiWidget implements Updatable {
// React to mouse-over-events
addMouseMoveListener(new MouseMoveListener() {
+ @Override
public void mouseMove(MouseEvent e) {
mouse.mouseMoveAction(usagebarPainter.getJobAtPosition(e.x));
}
@@ -117,6 +118,7 @@ public class Usagebar extends LguiWidget implements Updatable {
*
* @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
*/
+ @Override
public void mouseDoubleClick(MouseEvent e) {
}
@@ -125,6 +127,7 @@ public class Usagebar extends LguiWidget implements Updatable {
*
* @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
*/
+ @Override
public void mouseDown(MouseEvent e) {
mouse.mouseDownAction(usagebarPainter.getJobAtPosition(e.x));
}
@@ -134,6 +137,7 @@ public class Usagebar extends LguiWidget implements Updatable {
*
* @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
*/
+ @Override
public void mouseUp(MouseEvent e) {
mouse.mouseUpAction(usagebarPainter.getJobAtPosition(e.x));
}
@@ -147,6 +151,7 @@ public class Usagebar extends LguiWidget implements Updatable {
*
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
+ @Override
public void handleEvent(Event event) {
mouse.mouseExitAction();
}
@@ -155,6 +160,12 @@ public class Usagebar extends LguiWidget implements Updatable {
}
+ @Override
+ public void dispose() {
+ super.dispose();
+ lguiItem.getObjectStatus().removeComponent(this);
+ }
+
/**
* @return true, if the scale is painted.
*/
@@ -223,8 +234,11 @@ public class Usagebar extends LguiWidget implements Updatable {
* org.eclipse.ptp.rm.lml.internal.core.model.ObjectStatus.Updatable#updateStatus(org.eclipse.ptp.rm.lml.internal.core.elements
* .ObjectType, boolean, boolean)
*/
+ @Override
public void updateStatus(ObjectType object, boolean mouseOver, boolean mouseDown) {
- redraw();
+ if (!isDisposed()) {
+ redraw();
+ }
}
}