|
|
|
|
@ -63,6 +63,11 @@ public class CallInfoFrame
|
|
|
|
|
private final ResourceManagementService resources
|
|
|
|
|
= GuiActivator.getResources();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Indicates if the info window has any text to display.
|
|
|
|
|
*/
|
|
|
|
|
private boolean hasCallInfo;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a new frame containing the statistical information for a specific
|
|
|
|
|
* telephony conference.
|
|
|
|
|
@ -88,7 +93,7 @@ public CallInfoFrame(CallConference callConference)
|
|
|
|
|
|
|
|
|
|
callInfoWindow.getContentPane().add(scrollPane);
|
|
|
|
|
|
|
|
|
|
this.constructCallInfo();
|
|
|
|
|
hasCallInfo = this.constructCallInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -164,8 +169,9 @@ private String getLineString(String labelText, String infoText)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructs the call info text.
|
|
|
|
|
* @return true if call info could be found, false otherwise
|
|
|
|
|
*/
|
|
|
|
|
private void constructCallInfo()
|
|
|
|
|
private boolean constructCallInfo()
|
|
|
|
|
{
|
|
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
@ -181,49 +187,58 @@ private void constructCallInfo()
|
|
|
|
|
* TODO A telephony conference may consist of a single Call with
|
|
|
|
|
* multiple CallPeers but it may as well consist of multiple Calls.
|
|
|
|
|
*/
|
|
|
|
|
Call aCall = calls.get(0);
|
|
|
|
|
|
|
|
|
|
stringBuffer.append(
|
|
|
|
|
getLineString(
|
|
|
|
|
resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.CALL_IDENTITY"),
|
|
|
|
|
aCall.getProtocolProvider().getAccountID()
|
|
|
|
|
.getDisplayName()));
|
|
|
|
|
|
|
|
|
|
int callPeerCount = callConference.getCallPeerCount();
|
|
|
|
|
if (callPeerCount > 1)
|
|
|
|
|
if (calls.size() <= 0)
|
|
|
|
|
{
|
|
|
|
|
stringBuffer.append(
|
|
|
|
|
getLineString(resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.PEER_COUNT"),
|
|
|
|
|
String.valueOf(callPeerCount)));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Call aCall = calls.get(0);
|
|
|
|
|
|
|
|
|
|
boolean isConfFocus = callConference.isConferenceFocus();
|
|
|
|
|
stringBuffer.append(
|
|
|
|
|
getLineString(
|
|
|
|
|
resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.CALL_IDENTITY"),
|
|
|
|
|
aCall.getProtocolProvider().getAccountID()
|
|
|
|
|
.getDisplayName()));
|
|
|
|
|
|
|
|
|
|
int callPeerCount = callConference.getCallPeerCount();
|
|
|
|
|
if (callPeerCount > 1)
|
|
|
|
|
{
|
|
|
|
|
stringBuffer.append(
|
|
|
|
|
getLineString(resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.PEER_COUNT"),
|
|
|
|
|
String.valueOf(callPeerCount)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isConfFocus)
|
|
|
|
|
{
|
|
|
|
|
stringBuffer.append(getLineString(
|
|
|
|
|
resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.IS_CONFERENCE_FOCUS"),
|
|
|
|
|
String.valueOf(isConfFocus)));
|
|
|
|
|
}
|
|
|
|
|
boolean isConfFocus = callConference.isConferenceFocus();
|
|
|
|
|
|
|
|
|
|
if (isConfFocus)
|
|
|
|
|
{
|
|
|
|
|
stringBuffer.append(getLineString(
|
|
|
|
|
resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.IS_CONFERENCE_FOCUS"),
|
|
|
|
|
String.valueOf(isConfFocus)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TransportProtocol preferredTransport
|
|
|
|
|
= aCall.getProtocolProvider().getTransportProtocol();
|
|
|
|
|
TransportProtocol preferredTransport
|
|
|
|
|
= aCall.getProtocolProvider().getTransportProtocol();
|
|
|
|
|
|
|
|
|
|
if (preferredTransport != TransportProtocol.UNKNOWN)
|
|
|
|
|
stringBuffer.append(getLineString(
|
|
|
|
|
resources.getI18NString("service.gui.callinfo.CALL_TRANSPORT"),
|
|
|
|
|
preferredTransport.toString()));
|
|
|
|
|
if (preferredTransport != TransportProtocol.UNKNOWN)
|
|
|
|
|
stringBuffer.append(getLineString(
|
|
|
|
|
resources.getI18NString("service.gui.callinfo.CALL_TRANSPORT"),
|
|
|
|
|
preferredTransport.toString()));
|
|
|
|
|
|
|
|
|
|
constructCallPeersInfo(stringBuffer);
|
|
|
|
|
constructCallPeersInfo(stringBuffer);
|
|
|
|
|
|
|
|
|
|
stringBuffer.append("</font></p></body></html>");
|
|
|
|
|
stringBuffer.append("</font></p></body></html>");
|
|
|
|
|
|
|
|
|
|
infoTextPane.setText(stringBuffer.toString());
|
|
|
|
|
infoTextPane.revalidate();
|
|
|
|
|
infoTextPane.repaint();
|
|
|
|
|
infoTextPane.setText(stringBuffer.toString());
|
|
|
|
|
infoTextPane.revalidate();
|
|
|
|
|
infoTextPane.repaint();
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -620,7 +635,7 @@ public void callTitleChanged(CallPanel callContainer)
|
|
|
|
|
if (selectedText != null && selectedText.length() > 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
constructCallInfo();
|
|
|
|
|
hasCallInfo = this.constructCallInfo();
|
|
|
|
|
callInfoWindow.pack();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -654,6 +669,17 @@ public boolean isVisible()
|
|
|
|
|
return callInfoWindow.isVisible();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Indicates if the call info window has any text to display
|
|
|
|
|
*
|
|
|
|
|
* @return <tt>true</tt> if the window contains call info,
|
|
|
|
|
* <tt>false</tt> otherwise
|
|
|
|
|
*/
|
|
|
|
|
public boolean hasCallInfo()
|
|
|
|
|
{
|
|
|
|
|
return hasCallInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disposes the corresponding window.
|
|
|
|
|
*/
|
|
|
|
|
@ -696,7 +722,7 @@ private void appendStreamEncryptionMethod(
|
|
|
|
|
if(srtpControl != null)
|
|
|
|
|
{
|
|
|
|
|
String info;
|
|
|
|
|
if (srtpControl instanceof ZrtpControl)
|
|
|
|
|
if (srtpControl instanceof ZrtpControl)
|
|
|
|
|
{
|
|
|
|
|
info = "ZRTP " + ((ZrtpControl)srtpControl).getCipherString();
|
|
|
|
|
}
|
|
|
|
|
@ -707,7 +733,7 @@ private void appendStreamEncryptionMethod(
|
|
|
|
|
|
|
|
|
|
rtpType = resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.MEDIA_STREAM_SRTP")
|
|
|
|
|
+ " ("
|
|
|
|
|
+ " ("
|
|
|
|
|
+ resources.getI18NString(
|
|
|
|
|
"service.gui.callinfo.KEY_EXCHANGE_PROTOCOL")
|
|
|
|
|
+ ": "
|
|
|
|
|
|