Issue #2895 fixed telestration when leadership returns to a previous
leader Change-Id: Ie61adbe281b6920db994e1e30a3cbe621a1d5033 Former-commit-id:1447abe995
[formerly68b60eba47
] [formerlye75d3dfb7c
] [formerly1447abe995
[formerly68b60eba47
] [formerlye75d3dfb7c
] [formerly2fc1030fad
[formerlye75d3dfb7c
[formerly 8a0f86ebb2f659e55afc39cb6cf4bb4bdfb857b0]]]] Former-commit-id:2fc1030fad
Former-commit-id:52e60a68a9
[formerly8589374171
] [formerly 389d920f6cf85e74cfa2b1864b84d9f952b0b23a [formerlyca1ec93450
]] Former-commit-id: 2113aab9642e8adaee09df90029c31ddc9b73949 [formerly5cb38bd511
] Former-commit-id:1125203c93
This commit is contained in:
parent
07a23a916d
commit
a99fd8dbbb
4 changed files with 33 additions and 11 deletions
|
@ -40,6 +40,10 @@ import com.raytheon.uf.viz.core.VizApp;
|
|||
* The container is also capable of listening for leader change events and if
|
||||
* the remote display is changed.
|
||||
*
|
||||
* This class primarily exists since due to the plugin hierarchy a
|
||||
* SharedDisplaySession cannot have actual dependencies on code in the display
|
||||
* plugin.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
|
@ -49,6 +53,7 @@ import com.raytheon.uf.viz.core.VizApp;
|
|||
* Apr 16, 2012 njensen Initial creation
|
||||
* Feb 11, 2014 2751 njensen Added leaderChanged() and listeners
|
||||
* Mar 07, 2014 2848 bclement made colorManager final, added modifyColors() listeners
|
||||
* Mar 18, 2014 2895 njensen Improved javadoc
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -121,7 +126,6 @@ public class SessionContainer {
|
|||
return colorManager;
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void leaderChanged(LeaderChangeEvent event) {
|
||||
// for now (and possibly forever) we are not allowing capabilities to be
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.raytheon.uf.viz.collaboration.display.data.SharedDisplaySessionMgr;
|
|||
* Mar 26, 2012 njensen Initial creation
|
||||
* Feb 12, 2014 2751 njensen Renamed container to displayContainer
|
||||
* Mar 07, 2014 2848 bclement moved event handler registration to constructor
|
||||
* Mar 18, 2014 2895 njensen Fixed shutdown order
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -69,11 +70,18 @@ public abstract class AbstractRoleEventController<T extends IRemoteDisplayContai
|
|||
session.unregisterEventHandler(this);
|
||||
SessionContainer sc = SharedDisplaySessionMgr
|
||||
.getSessionContainer(session.getSessionId());
|
||||
sc.setDisplayContainer(null);
|
||||
if (displayContainer != null) {
|
||||
displayContainer.disposeContainer();
|
||||
displayContainer = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to set the session's display container to null to properly
|
||||
* fire listeners on the container, but this needs to occur after the
|
||||
* displayContainer has been disposed. Otherwise we potentially leak
|
||||
* memory and get displayIds wrong in the future.
|
||||
*/
|
||||
sc.setDisplayContainer(null);
|
||||
}
|
||||
|
||||
protected abstract T createDisplayContainer();
|
||||
|
|
|
@ -60,9 +60,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 23, 2012 mschenke Initial creation
|
||||
* May 23, 2012 mschenke Initial creation
|
||||
* Jan 30, 2014 2698 bclement changed UserId to VenueParticipant
|
||||
* Feb 13, 2014 2751 bclement VenueParticipant refactor
|
||||
* Mar 18, 2014 2895 njensen Fix concurrent mod exception on dispose
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -173,8 +174,8 @@ public class CollaborationDrawingResource extends
|
|||
layer.setEraserWidth(16); // Configure?
|
||||
layer.setLineStyle(outline.getLineStyle());
|
||||
layer.setLineWidth(outline.getOutlineWidth());
|
||||
layer.setColor(container.getColorManager()
|
||||
.getColorForUser(user));
|
||||
layer.setColor(container.getColorManager().getColorForUser(
|
||||
user));
|
||||
layer.paint(target, paintProps);
|
||||
}
|
||||
}
|
||||
|
@ -190,15 +191,17 @@ public class CollaborationDrawingResource extends
|
|||
protected void disposeInternal() {
|
||||
container.getSession().unregisterEventHandler(this);
|
||||
disposeLayers();
|
||||
layerMap.clear();
|
||||
layerMap = null;
|
||||
|
||||
manager.dispose();
|
||||
}
|
||||
|
||||
private void disposeLayers() {
|
||||
for (DrawingToolLayer layer : layerMap.values()) {
|
||||
layer.dispose();
|
||||
synchronized (layerMap) {
|
||||
for (DrawingToolLayer layer : layerMap.values()) {
|
||||
layer.dispose();
|
||||
}
|
||||
layerMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,8 @@ import com.raytheon.viz.ui.input.EditableManager;
|
|||
* Feb 19, 2014 2751 bclement add change color and transfer leader icons
|
||||
* Mar 06, 2014 2751 bclement moved users table refresh logic to refreshParticipantList()
|
||||
* Mar 06, 2014 2848 bclement moved colormanager update code to session container
|
||||
* Mar 11, 2014 #2865 lvenable Added null checks in threads
|
||||
* Mar 11, 2014 2865 lvenable Added null checks in threads
|
||||
* Mar 18, 2014 2895 njensen Fix lockAction enable/disable logic
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -424,7 +425,11 @@ public class CollaborationSessionView extends SessionView implements
|
|||
}
|
||||
if (layer != null && currentResource.isSessionLeader()) {
|
||||
lockAction.getAction().setEnabled(true);
|
||||
} else {
|
||||
lockAction.getAction().setEnabled(false);
|
||||
}
|
||||
|
||||
// enable/disable toolbar buttons based on locked
|
||||
if (layer != null
|
||||
&& (locked == false || currentResource.isSessionLeader())) {
|
||||
drawAction.getAction().setEnabled(true);
|
||||
|
@ -458,7 +463,6 @@ public class CollaborationSessionView extends SessionView implements
|
|||
redoAction.getAction().setEnabled(false);
|
||||
clearAction.getAction().setEnabled(false);
|
||||
eraseAction.getAction().setEnabled(false);
|
||||
lockAction.getAction().setEnabled(false);
|
||||
}
|
||||
getViewSite().getActionBars().getToolBarManager().update(true);
|
||||
}
|
||||
|
@ -700,6 +704,9 @@ public class CollaborationSessionView extends SessionView implements
|
|||
@Override
|
||||
public void remoteDisplayChanged(RemoteDisplay remoteDisplay,
|
||||
RemoteDisplayChangeType changeType) {
|
||||
// TODO this method has more to do with displays than the view,
|
||||
// would be good to separate it out somehow
|
||||
|
||||
if (remoteDisplay == null) {
|
||||
currentDisplay = null;
|
||||
VizApp.runAsync(actionUpdater);
|
||||
|
@ -848,7 +855,7 @@ public class CollaborationSessionView extends SessionView implements
|
|||
refreshParticipantList();
|
||||
}
|
||||
sendParticipantSystemMessage(event.getNewLeader(),
|
||||
" is now leader.");
|
||||
"is now leader.");
|
||||
updateToolItems();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue