@ -121,41 +121,40 @@ private void initComponents()
* /
private void initCallLabel ( JLabel callLabel )
{
Iterator < CallPeer > participantsIter
= incomingCall . getCallPeers ( ) ;
Iterator < CallPeer > peersIter = incomingCall . getCallPeers ( ) ;
boolean hasMoreP articipant s = false ;
boolean hasMoreP eer s = false ;
String text = "" ;
ImageIcon imageIcon =
ImageUtils . getScaledRoundedIcon ( ImageLoader
. getImage ( ImageLoader . DEFAULT_USER_PHOTO ) , 40 , 45 ) ;
while ( p articipant sIter. hasNext ( ) )
while ( p eer sIter. hasNext ( ) )
{
CallPeer p articipant = participant sIter. next ( ) ;
CallPeer p eer = peer sIter. next ( ) ;
// More p articipant s.
if ( p articipant sIter. hasNext ( ) )
// More p eer s.
if ( p eer sIter. hasNext ( ) )
{
text = callLabel . getText ( )
+ p articipant . getDisplayName ( ) + ", " ;
+ p eer . getDisplayName ( ) + ", " ;
hasMoreP articipant s = true ;
hasMoreP eer s = true ;
}
// Only one p articipant .
// Only one p eer .
else
{
text = callLabel . getText ( )
+ p articipant . getDisplayName ( )
+ p eer . getDisplayName ( )
+ " "
+ GuiActivator . getResources ( ) . getI18NString ( "service.gui.IS_CALLING" ) ;
imageIcon = getP articipantImage( participant ) ;
imageIcon = getP eerImage( peer ) ;
}
}
if ( hasMoreP articipant s)
if ( hasMoreP eer s)
text + = GuiActivator . getResources ( )
. getI18NString ( "service.gui.ARE_CALLING" ) ;
@ -186,21 +185,21 @@ else if (buttonName.equals(HANGUP_BUTTON))
}
/ * *
* Returns the p articipant image .
* Returns the p eer image .
*
* @param p articipant The call participant , for which we ' re returning an
* @param p eer The call peer , for which we ' re returning an
* image .
* @return the p articipant image .
* @return the p eer image .
* /
private ImageIcon getP articipantImage( CallPeer participant )
private ImageIcon getP eerImage( CallPeer peer )
{
ImageIcon icon = null ;
// We search for a contact corresponding to this call p articipant and
// We search for a contact corresponding to this call p eer and
// try to get its image.
if ( p articipant . getContact ( ) ! = null )
if ( p eer . getContact ( ) ! = null )
{
MetaContact metaContact = GuiActivator . getMetaContactListService ( )
. findMetaContactByContact ( p articipant . getContact ( ) ) ;
. findMetaContactByContact ( p eer . getContact ( ) ) ;
byte [ ] avatar = metaContact . getAvatar ( ) ;
@ -209,9 +208,9 @@ private ImageIcon getParticipantImage(CallPeer participant)
}
// If the icon is still null we try to get an image from the call
// p articipant .
if ( icon = = null & & p articipant . getImage ( ) ! = null )
icon = new ImageIcon ( p articipant . getImage ( ) ) ;
// p eer .
if ( icon = = null & & p eer . getImage ( ) ! = null )
icon = new ImageIcon ( p eer . getImage ( ) ) ;
return icon ;
}