Issue #429 changing 'private' aspect
Former-commit-id:98350f4ba5
[formerly 4c475ace9b0803b40bc90eca71a800a1ca2da4b5] Former-commit-id:9887678590
This commit is contained in:
parent
225a8762d1
commit
eba8ac8dd9
6 changed files with 22 additions and 24 deletions
|
@ -81,7 +81,7 @@
|
|||
class="com.raytheon.uf.viz.collaboration.ui.session.PeerToPeerView"
|
||||
id="com.raytheon.uf.viz.collaboration.PeerToPeerView"
|
||||
icon="icons/chats.gif"
|
||||
name="Private Chat"
|
||||
name="Chat"
|
||||
restorable="false"/>
|
||||
</extension>
|
||||
<extension
|
||||
|
|
|
@ -256,7 +256,7 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
|
|||
}
|
||||
};
|
||||
|
||||
peerToPeerChatAction = new Action("Private Chat") {
|
||||
peerToPeerChatAction = new Action("Chat") {
|
||||
@Override
|
||||
public void run() {
|
||||
createP2PChat(getId());
|
||||
|
@ -747,23 +747,21 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
|
|||
CollaborationNode node = (CollaborationNode) item
|
||||
.getData();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("ID: ").append(node.getId())
|
||||
.append("\n");
|
||||
builder.append("ID: ").append(node.getId());
|
||||
if (node instanceof CollaborationUser) {
|
||||
CollaborationUser user = (CollaborationUser) node;
|
||||
builder.append("Mode: ").append(user.getMode())
|
||||
.append("\n");
|
||||
builder.append("\nMode: ")
|
||||
.append(user.getMode()).append("\n");
|
||||
builder.append("Type: ").append(user.getType())
|
||||
.append("\n");
|
||||
builder.append("Message: \"")
|
||||
.append(user.getStatusMessage())
|
||||
.append("\"\n");
|
||||
builder.append("Message: \"").append(
|
||||
user.getStatusMessage() + "\"");
|
||||
} else if (node instanceof SessionGroup
|
||||
&& ((SessionGroup) node).isSessionRoot() == false) {
|
||||
IVenueInfo info = CollaborationDataManager
|
||||
.getInstance().getSession(node.getId())
|
||||
.getVenue().getInfo();
|
||||
builder.append("VenueName: ")
|
||||
builder.append("\nVenueName: ")
|
||||
.append(info.getVenueName())
|
||||
.append("\n");
|
||||
// builder.append("VenueID: ")
|
||||
|
@ -771,9 +769,8 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
|
|||
builder.append("Subject: ")
|
||||
.append(info.getVenueSubject())
|
||||
.append("\n");
|
||||
builder.append("ParticipantCount: ")
|
||||
.append(info.getParticipantCount())
|
||||
.append("\n");
|
||||
builder.append("ParticipantCount: ").append(
|
||||
info.getParticipantCount());
|
||||
}
|
||||
usersTreeViewer.getTree().setToolTipText(
|
||||
builder.toString());
|
||||
|
|
|
@ -96,7 +96,7 @@ public abstract class AbstractSessionView extends ViewPart implements
|
|||
|
||||
public abstract void sendMessage();
|
||||
|
||||
protected abstract void setMessageLabel(Label label);
|
||||
protected abstract void setMessageLabel(Composite comp);
|
||||
|
||||
public AbstractSessionView() {
|
||||
imageMap = new HashMap<String, Image>();
|
||||
|
@ -144,8 +144,7 @@ public abstract class AbstractSessionView extends ViewPart implements
|
|||
GridLayout layout = new GridLayout(1, false);
|
||||
messagesComp.setLayout(layout);
|
||||
// TODO, wrap label in view
|
||||
Label label = new Label(messagesComp, SWT.WRAP);
|
||||
setMessageLabel(label);
|
||||
setMessageLabel(messagesComp);
|
||||
messagesText = new StyledText(messagesComp, SWT.MULTI | SWT.WRAP
|
||||
| SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
|
||||
messagesText.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
|
|
@ -28,6 +28,8 @@ import org.eclipse.jface.action.ActionContributionItem;
|
|||
import org.eclipse.jface.action.IMenuCreator;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
|
@ -217,7 +219,8 @@ public class CollaborationSessionView extends SessionView {
|
|||
* setMessageLabel(org.eclipse.swt.widgets.Label)
|
||||
*/
|
||||
@Override
|
||||
protected void setMessageLabel(Label label) {
|
||||
protected void setMessageLabel(Composite comp) {
|
||||
Label label = new Label(comp, SWT.NONE);
|
||||
StringBuilder labelInfo = new StringBuilder();
|
||||
IVenueSession session = CollaborationDataManager.getInstance()
|
||||
.getSession(sessionId);
|
||||
|
|
|
@ -22,7 +22,7 @@ package com.raytheon.uf.viz.collaboration.ui.session;
|
|||
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.swt.custom.SashForm;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -144,10 +144,9 @@ public class PeerToPeerView extends AbstractSessionView {
|
|||
* @see com.raytheon.uf.viz.collaboration.ui.session.AbstractSessionView#
|
||||
* setMessageLabel(org.eclipse.swt.widgets.Label)
|
||||
*/
|
||||
protected void setMessageLabel(Label label) {
|
||||
StringBuilder labelInfo = new StringBuilder();
|
||||
labelInfo.append("Private Chat");
|
||||
label.setText(labelInfo.toString());
|
||||
protected void setMessageLabel(Composite comp) {
|
||||
// no message needed as there is no subject and we know that it is
|
||||
// private based on the fact that there are no participants
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -536,9 +536,9 @@ public class SessionView extends AbstractSessionView {
|
|||
* setMessageLabel(org.eclipse.swt.widgets.Label)
|
||||
*/
|
||||
@Override
|
||||
protected void setMessageLabel(Label label) {
|
||||
protected void setMessageLabel(Composite comp) {
|
||||
Label label = new Label(comp, SWT.WRAP);
|
||||
StringBuilder labelInfo = new StringBuilder();
|
||||
labelInfo.append("Private Chat: ");
|
||||
IVenueSession session = CollaborationDataManager.getInstance()
|
||||
.getSession(sessionId);
|
||||
if (session != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue