src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
/**
     * Constructs the call info text.
     * @return true if call info could be found, false otherwise
     */
Constructs the call info text.
@return true if call info could be found, false otherwise
Constructs the call info text . @return true if call info could be found false otherwise
private boolean constructCallInfo()
    {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(
            "<html><body><p align=\"left\">"
                + "<font color=\"" + fontColor + "\" size=\"3\">");
        stringBuffer.append(getLineString(resources.getI18NString(
            "service.gui.callinfo.CALL_INFORMATION"), ""));
        List<Call> calls = callConference.getCalls();
        /*
         * TODO A telephony conference may consist of a single Call with
         * multiple CallPeers but it may as well consist of multiple Calls.
         */
        if (calls.size() <= 0)
        {
            return false;
        }
        else
        {
            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)
            {
                stringBuffer.append(
                        getLineString(resources.getI18NString(
                                "service.gui.callinfo.PEER_COUNT"),
                                String.valueOf(callPeerCount)));
            }
            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();
            if (preferredTransport != TransportProtocol.UNKNOWN)
                stringBuffer.append(getLineString(
                    resources.getI18NString("service.gui.callinfo.CALL_TRANSPORT"),
                    preferredTransport.toString()));
            final OperationSetTLS opSetTls = aCall.getProtocolProvider()
                    .getOperationSet(OperationSetTLS.class);
            if (opSetTls != null)
            {
                stringBuffer.append(getLineString(
                        resources.getI18NString(
                        "service.gui.callinfo.TLS_PROTOCOL"),
                        opSetTls.getProtocol()));
                stringBuffer.append(getLineString(
                        resources.getI18NString(
                        "service.gui.callinfo.TLS_CIPHER_SUITE"),
                        opSetTls.getCipherSuite()));
                stringBuffer.append("<b><a href=\"")
                    .append(CERTIFICATE_URL)
                    .append("\">")
                    .append(resources.getI18NString(
                            "service.gui.callinfo.VIEW_CERTIFICATE"))
                    .append("</a></b><br/>");
            }
            constructCallPeersInfo(stringBuffer);
            stringBuffer.append("</font></p></body></html>");
            infoTextPane.setText(stringBuffer.toString());
            infoTextPane.revalidate();
            infoTextPane.repaint();
            return true;
        }
    }
private boolean constructCallInfo ( ) { StringBuffer stringBuffer = new StringBuffer ( ) ; stringBuffer . append ( "<html><body><p align=\"left\">" + "<font color=\"" + fontColor + "\" size=\"3\">" ) ; stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.CALL_INFORMATION" ) , "" ) ) ; List < Call > calls = callConference . getCalls ( ) ; /*
         * TODO A telephony conference may consist of a single Call with
         * multiple CallPeers but it may as well consist of multiple Calls.
         */ if ( calls . size ( ) <= 0 ) { return false ; } else { 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 ) { stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.PEER_COUNT" ) , String . valueOf ( callPeerCount ) ) ) ; } 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 ( ) ; if ( preferredTransport != TransportProtocol . UNKNOWN ) stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.CALL_TRANSPORT" ) , preferredTransport . toString ( ) ) ) ; final OperationSetTLS opSetTls = aCall . getProtocolProvider ( ) . getOperationSet ( OperationSetTLS . class ) ; if ( opSetTls != null ) { stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.TLS_PROTOCOL" ) , opSetTls . getProtocol ( ) ) ) ; stringBuffer . append ( getLineString ( resources . getI18NString ( "service.gui.callinfo.TLS_CIPHER_SUITE" ) , opSetTls . getCipherSuite ( ) ) ) ; stringBuffer . append ( "<b><a href=\"" ) . append ( CERTIFICATE_URL ) . append ( "\">" ) . append ( resources . getI18NString ( "service.gui.callinfo.VIEW_CERTIFICATE" ) ) . append ( "</a></b><br/>" ) ; } constructCallPeersInfo ( stringBuffer ) ; stringBuffer . append ( "</font></p></body></html>" ) ; infoTextPane . setText ( stringBuffer . toString ( ) ) ; infoTextPane . revalidate ( ) ; infoTextPane . repaint ( ) ; return true ; } }
Constructs the call info text.
Constructs the call info text .