|
|
|
|
@ -60,6 +60,13 @@ public class OneToOneCallPeerPanel
|
|
|
|
|
*/
|
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Property to disable showing the dummy picture for the peer when no
|
|
|
|
|
* streams present.
|
|
|
|
|
*/
|
|
|
|
|
public static final String HIDE_PLACEHOLDER_PIC_PROP
|
|
|
|
|
= "net.java.sip.communicator.impl.gui.main.call.HIDE_PLACEHOLDER_PIC";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The <tt>CallPeer</tt>, which is rendered in this panel.
|
|
|
|
|
*/
|
|
|
|
|
@ -277,7 +284,15 @@ public OneToOneCallPeerPanel(
|
|
|
|
|
detailsChangeListener);
|
|
|
|
|
securityPanel = SecurityPanel.create(this, callPeer, null);
|
|
|
|
|
|
|
|
|
|
photoLabel = new JLabel(getPhotoLabelIcon());
|
|
|
|
|
ImageIcon icon = getPhotoLabelIcon();
|
|
|
|
|
if(icon != null)
|
|
|
|
|
{
|
|
|
|
|
photoLabel = new JLabel(icon);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
photoLabel = new JLabel();
|
|
|
|
|
}
|
|
|
|
|
center = createCenter();
|
|
|
|
|
statusBar = createStatusBar();
|
|
|
|
|
|
|
|
|
|
@ -345,6 +360,21 @@ public OneToOneCallPeerPanel(
|
|
|
|
|
updateViewFromModel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set size of the {@link #photoLabel}
|
|
|
|
|
*/
|
|
|
|
|
private void sizePhotoLabel()
|
|
|
|
|
{
|
|
|
|
|
if(photoLabel.getIcon() != null)
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setPreferredSize(new Dimension(90, 90));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setPreferredSize(new Dimension(0, 0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates the <tt>Component</tt> hierarchy of the central area of this
|
|
|
|
|
* <tt>CallPeerPanel</tt> which displays the photo of the <tt>CallPeer</tt>
|
|
|
|
|
@ -352,7 +382,7 @@ public OneToOneCallPeerPanel(
|
|
|
|
|
*/
|
|
|
|
|
private VideoContainer createCenter()
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setPreferredSize(new Dimension(90, 90));
|
|
|
|
|
sizePhotoLabel();
|
|
|
|
|
|
|
|
|
|
return createVideoContainer(photoLabel);
|
|
|
|
|
}
|
|
|
|
|
@ -584,6 +614,22 @@ public String getPeerName()
|
|
|
|
|
return peerName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tests a provided boolean property name, returning false if it should be
|
|
|
|
|
* hidden.
|
|
|
|
|
*
|
|
|
|
|
* @param componentHidePropertyName the name of the boolean property to
|
|
|
|
|
* check.
|
|
|
|
|
* @return false if the component should be hidden, true otherwise.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
private boolean isComponentEnabled(String componentHidePropertyName)
|
|
|
|
|
{
|
|
|
|
|
return !GuiActivator.getConfigurationService().getBoolean(
|
|
|
|
|
componentHidePropertyName,
|
|
|
|
|
false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the <tt>Icon</tt> to be displayed in {@link #photoLabel}.
|
|
|
|
|
*
|
|
|
|
|
@ -592,7 +638,7 @@ public String getPeerName()
|
|
|
|
|
private ImageIcon getPhotoLabelIcon()
|
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
(peerImage == null)
|
|
|
|
|
(peerImage == null && isComponentEnabled(HIDE_PLACEHOLDER_PIC_PROP))
|
|
|
|
|
? new ImageIcon(
|
|
|
|
|
ImageLoader.getImage(ImageLoader.DEFAULT_USER_PHOTO))
|
|
|
|
|
: peerImage;
|
|
|
|
|
@ -677,10 +723,18 @@ public void loadSkin()
|
|
|
|
|
|
|
|
|
|
if(peerImage == null)
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setIcon(
|
|
|
|
|
new ImageIcon(
|
|
|
|
|
ImageLoader.getImage(
|
|
|
|
|
ImageLoader.DEFAULT_USER_PHOTO)));
|
|
|
|
|
if(isComponentEnabled(HIDE_PLACEHOLDER_PIC_PROP))
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setIcon(
|
|
|
|
|
new ImageIcon(
|
|
|
|
|
ImageLoader.getImage(
|
|
|
|
|
ImageLoader.DEFAULT_USER_PHOTO)));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setIcon(null);
|
|
|
|
|
}
|
|
|
|
|
sizePhotoLabel();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1108,6 +1162,7 @@ public void setPeerImage(byte[] image)
|
|
|
|
|
public void run()
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setIcon(peerImage);
|
|
|
|
|
sizePhotoLabel();
|
|
|
|
|
photoLabel.repaint();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@ -1115,6 +1170,7 @@ public void run()
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
photoLabel.setIcon(peerImage);
|
|
|
|
|
sizePhotoLabel();
|
|
|
|
|
photoLabel.repaint();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1582,4 +1638,4 @@ public void setInterested(boolean value)
|
|
|
|
|
this.interested = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|