diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/actions/BlinkToggleAction.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/actions/BlinkToggleAction.java index 52116612f6..ab132ff1d3 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/actions/BlinkToggleAction.java +++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/actions/BlinkToggleAction.java @@ -32,7 +32,6 @@ import org.eclipse.swt.widgets.Menu; import com.raytheon.uf.viz.core.IDisplayPane; import com.raytheon.uf.viz.core.IDisplayPaneContainer; import com.raytheon.uf.viz.core.drawables.ResourcePair; -import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.ResourceProperties; @@ -44,18 +43,17 @@ import com.raytheon.uf.viz.d2d.ui.dialogs.ImageBlinkDialog; import com.raytheon.viz.ui.cmenu.AbstractRightClickAction; /** - * - * BlinkToggleAction * * Enable blinking on a resource * *
* - * SOFTWARE HISTORY + * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Oct 15, 2007 chammack Initial Creation. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Oct 15, 2007 chammack Initial Creation. + * Jan 09, 2014 2647 bsteffen Get properties directly from resource. * ** @@ -82,8 +80,8 @@ public class BlinkToggleAction extends AbstractRightClickAction implements private static float[] blinkRates; static { - blinkRates = ((HierarchicalPreferenceStore) Activator.getDefault() - .getPreferenceStore()).getFloatArray("blinkRate"); + blinkRates = Activator.getDefault().getPreferenceStore() + .getFloatArray("blinkRate"); Arrays.sort(blinkRates); } @@ -119,11 +117,10 @@ public class BlinkToggleAction extends AbstractRightClickAction implements */ @Override public void run() { - System.out.println("TODO: Handle mode = " + mode); switch (mode) { case OTHER: { - ResourceProperties props = getDescriptor().getResourceList() - .getProperties(getTopMostSelectedResource()); + ResourceProperties props = getTopMostSelectedResource() + .getProperties(); boolean isEnabled = props.isBlinking(); props.setBlinking(!isEnabled); this.setChecked(!isEnabled); @@ -154,8 +151,7 @@ public class BlinkToggleAction extends AbstractRightClickAction implements } else { mode = InternalMode.OTHER; - ResourceProperties topMostProps = getDescriptor().getResourceList() - .getProperties(topMost); + ResourceProperties topMostProps = topMost.getProperties(); boolean isEnabled = topMostProps.isBlinking(); this.setChecked(isEnabled); } @@ -314,7 +310,6 @@ public class BlinkToggleAction extends AbstractRightClickAction implements } private class BlinkRateAction extends Action { - boolean preSelected; private float rate; diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/PaneManager.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/PaneManager.java index bab3b5b57b..5b419318e6 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/PaneManager.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/PaneManager.java @@ -68,9 +68,12 @@ import com.vividsolutions.jts.geom.Coordinate; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 07/07/09 bgonzale Initial Creation. + * Date Ticket# Engineer Description + * ------------- -------- ----------- ----------------------------------------- + * Jul 07, 2009 bgonzale Initial Creation. + * Jan 09, 2014 2647 bsteffen Do not change active editor on focus + * because that causes problems when + * switching windows. * * * @author bgonzale @@ -166,13 +169,6 @@ public class PaneManager extends InputAdapter implements IMultiPaneEditor { pane.addListener(SWT.MouseExit, inputManager); pane.addListener(SWT.MouseEnter, inputManager); - pane.addListener(SWT.FocusIn, new Listener() { - @Override - public void handleEvent(Event event) { - activatedPane = pane; - } - }); - pane.addListener(SWT.MouseEnter, new Listener() { @Override public void handleEvent(Event event) {