Issue #429 colors matching between telestrator and chat room across clients
Former-commit-id:d84865ced9
[formerly 46a327c929a09c21270f7b6de543e8d742476003] Former-commit-id:09fc05162c
This commit is contained in:
parent
d79ae59e19
commit
563e76c313
4 changed files with 16 additions and 7 deletions
|
@ -84,6 +84,10 @@ public class UsersTreeViewerSorter extends ViewerSorter {
|
|||
return ((IRosterItem) e1).getName().compareTo(
|
||||
((IRosterItem) e2).getName());
|
||||
} else if (e1 instanceof IVenueSession && e2 instanceof IVenueSession) {
|
||||
if (((IVenueSession) e1).getVenue() == null
|
||||
|| ((IVenueSession) e1).getVenue() == null) {
|
||||
return 0;
|
||||
}
|
||||
return ((IVenueSession) e1).getVenue().toString()
|
||||
.compareTo(((IVenueSession) e2).getVenue().toString());
|
||||
}
|
||||
|
|
|
@ -136,7 +136,13 @@ public class ParticipantsLabelProvider extends ColumnLabelProvider {
|
|||
&& !user.getUser().getAlias().isEmpty()) {
|
||||
return user.getUser().getAlias();
|
||||
}
|
||||
return user.getUser().getName();
|
||||
// TODO, XXX, FIXME? do we need this, it is REALLY good for debugging
|
||||
String name = user.getUser().getName();
|
||||
if (CollaborationDataManager.getInstance().getCollaborationConnection()
|
||||
.getAccount().equals(user.getUser())) {
|
||||
name += " (YOU)";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -138,6 +138,7 @@ public class CollaborationDrawingLayer extends DrawingLayer {
|
|||
colorManager = SharedDisplaySessionMgr.getSessionContainer(sessionId)
|
||||
.getColorManager();
|
||||
color = colorManager.getColors().get(userId);
|
||||
getCapability(ColorableCapability.class).setColor(color);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -165,11 +166,8 @@ public class CollaborationDrawingLayer extends DrawingLayer {
|
|||
for (UserId userName : collaboratorShapes.keySet()) {
|
||||
for (ShapeContainer sh : collaboratorShapes.get(userName)) {
|
||||
if (sh != null) {
|
||||
color = colorManager.getColors().get(userName);
|
||||
if (color == null) {
|
||||
color = new RGB(255, 0, 0);
|
||||
}
|
||||
target.drawWireframeShape(sh.getShape(), color,
|
||||
RGB col = colorManager.getColors().get(userName);
|
||||
target.drawWireframeShape(sh.getShape(), col,
|
||||
outline.getOutlineWidth(),
|
||||
outline.getLineStyle());
|
||||
}
|
||||
|
@ -181,7 +179,7 @@ public class CollaborationDrawingLayer extends DrawingLayer {
|
|||
@Subscribe
|
||||
public void setColorEvent(ColorChangeEvent event) {
|
||||
this.color = event.getColor();
|
||||
colorManager.addUser(event.getUserName());
|
||||
colorManager.getColorFromUser(event.getUserName());
|
||||
issueRefresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ public class DrawingLayer extends
|
|||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
this.paintProps = paintProps;
|
||||
this.color = getCapability(ColorableCapability.class).getColor();
|
||||
if (tempWireframeShape == null || needsRefresh) {
|
||||
tempWireframeShape = target.createWireframeShape(true,
|
||||
getDescriptor());
|
||||
|
|
Loading…
Add table
Reference in a new issue