Merge "Issue #26 fix gage color for hydro to refresh" into 10-Tech_Blocked

Former-commit-id: 25b9659dc7 [formerly e52a1315b2 [formerly ac489b3dc676f7f202991906e0b004baa074dfe0]]
Former-commit-id: e52a1315b2
Former-commit-id: ce5baf0632
This commit is contained in:
Matt Nash 2012-02-08 08:53:19 -06:00 committed by Gerrit Code Review
commit 6a2add04e9

View file

@ -28,8 +28,10 @@ import org.eclipse.ui.commands.IElementUpdater;
import org.eclipse.ui.handlers.RadioState;
import org.eclipse.ui.menus.UIElement;
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageColor;
import com.raytheon.viz.ui.EditorUtil;
/**
* TODO Add Description
@ -47,8 +49,7 @@ import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageColor;
* @version 1.0
*/
public class ToggleGageColor extends AbstractHandler implements
IElementUpdater {
public class ToggleGageColor extends AbstractHandler implements IElementUpdater {
/*
* (non-Javadoc)
*
@ -76,5 +77,11 @@ IElementUpdater {
String g = (String) parameters.get(RadioState.PARAMETER_ID);
GageColor val = GageColor.valueOf(g);
element.setChecked(color.equals(val));
IDisplayPaneContainer container = EditorUtil
.getActiveEditorAs(IDisplayPaneContainer.class);
if (container != null) {
container.refresh();
}
}
}