Adds a button that allows to hide/show the participants list in a video

conference call. Two properties have been added to allow disabling the
button or indicating the default mode (hidden or shown participants
list).
cusax-fix 5012
yanas 12 years ago
parent 49acd785b4
commit 8ac9024568

@ -225,6 +225,8 @@ service.gui.buttons.LOCAL_VIDEO_BUTTON=resources/images/impl/gui/buttons/localVi
service.gui.buttons.LOCAL_VIDEO_BUTTON_PRESSED=resources/images/impl/gui/buttons/localVideoButtonPressed.png
service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON=resources/images/impl/gui/buttons/showHideLocalVideo.png
service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON_PRESSED=resources/images/impl/gui/buttons/showHideLocalVideoPressed.png
service.gui.buttons.SHOW_HIDE_PEERS_BUTTON=resources/images/impl/gui/buttons/showHidePeers.png
service.gui.buttons.SHOW_HIDE_PEERS_BUTTON_PRESSED=resources/images/impl/gui/buttons/showHidePeersPressed.png
service.gui.buttons.TRANSFER_CALL_BUTTON=resources/images/impl/gui/buttons/transferCallButton.png
service.gui.buttons.SECURE_BUTTON_ON=resources/images/impl/gui/buttons/secureOn.png
service.gui.buttons.SECURE_BUTTON_OFF=resources/images/impl/gui/buttons/secureOff.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -581,6 +581,7 @@ service.gui.MUTE_BUTTON_TOOL_TIP=Toggle Mute or hold button to adjust microphone
service.gui.RECORD_BUTTON_TOOL_TIP=Toggle Record
service.gui.LOCAL_VIDEO_BUTTON_TOOL_TIP=Toggle Video
service.gui.SHOW_LOCAL_VIDEO_BUTTON_TOOL_TIP=Show/hide local video
service.gui.SHOW_HIDE_PEERS_TOOL_TIP=Show/hide call participants list
service.gui.TRANSFER_BUTTON_TOOL_TIP=Transfer Call
service.gui.TRANSFER_TO=Transfer to...
service.gui.SECURITY_INFO=Security information

@ -37,6 +37,8 @@
import org.jitsi.util.event.*;
import org.osgi.framework.*;
import sun.security.provider.*;
/**
* The dialog created for a given call.
*
@ -154,6 +156,20 @@ public class CallPanel
private static final String HIDE_VIDEO_BUTON_PROP
= "net.java.sip.communicator.impl.gui.main.call.HIDE_VIDEO_BUTTON";
/**
* Property to disable the button, which shows/hides participants in video
* conferences.
*/
private static final String HIDE_PEERS_LIST_BUTON_PROP
= "net.java.sip.communicator.impl.gui.main.call.HIDE_PEERS_LIST_BUTTON";
/**
* Indicates if the participants list in a video conference is visible by
* default.
*/
private static final String PEERS_LIST_HIDDEN_PROP
= "net.java.sip.communicator.impl.gui.main.call.PEERS_LIST_HIDDEN";
/**
* Property to disable the desktop sharing button.
*/
@ -330,6 +346,12 @@ public class CallPanel
*/
private ShowHideVideoButton showHideVideoButton;
/**
* The button, which shows / hides the participants list in a video
* conference.
*/
private ShowHidePeersButton showHidePeersButton;
/**
* The title of this call container.
*/
@ -960,6 +982,12 @@ private void doUpdateSettingsPanelInEventDispatchThread(
}
}
if (showHidePeersButton != null)
{
showHidePeersButton.setVisible(isConference
&& CallManager.isVideoStreaming(callConference));
}
// The desktop sharing button depends on the operation set desktop
// sharing server.
if(desktopSharingButton != null)
@ -1350,6 +1378,9 @@ private void initButtonIndexes()
videoButton.setIndex(11);
if (showHideVideoButton != null)
showHideVideoButton.setIndex(12);
if (showHidePeersButton != null)
showHidePeersButton.setIndex(13);
chatButton.setIndex(19);
if (infoButton != null)
@ -1523,6 +1554,14 @@ private void initializeUserInterfaceHierarchy()
videoButton = new LocalVideoButton(aCall);
}
if (isButtonEnabled(HIDE_PEERS_LIST_BUTON_PROP))
{
// If the PEERS_LIST_HIDDEN_PROP isn't specified we show the list
// by default.
showHidePeersButton = new ShowHidePeersButton(this,
isButtonEnabled(PEERS_LIST_HIDDEN_PROP));
}
localLevel
= new InputVolumeControlButton(
aCall,
@ -1580,6 +1619,8 @@ private void initializeUserInterfaceHierarchy()
settingsPanel.add(transferCallButton);
if (videoButton != null)
settingsPanel.add(videoButton);
if (showHidePeersButton != null)
settingsPanel.add(showHidePeersButton);
// The bottom bar will contain the settingsPanel.
add(createBottomBar(), BorderLayout.SOUTH);
@ -2015,6 +2056,22 @@ void setFullScreen(boolean fullScreen)
callWindow.setFullScreen(fullScreen);
}
/**
* Shows/hides the thumbnails list in the case of video conference.
*
* @param show <tt>true</tt> to show the thumbnails list, <tt>false</tt>
* to hide it
*/
public void showThumbnailsList(boolean show)
{
// This shouldn't happen, but if we aren't in a video conference we
// have nothing to do here.
if (!(callPanel instanceof VideoConferenceCallPanel))
return;
((VideoConferenceCallPanel) callPanel).showThumbnailsList(show);
}
/**
* Selects or unselects the video button in this call dialog.
*

@ -0,0 +1,58 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.main.call.conference;
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
* Implements an AWT/Swing button which toggles the display of the participants
* list in a conference call.
*
* @author Yana Stamcheva
*/
public class ShowHidePeersButton
extends AbstractCallToggleButton
{
private static final long serialVersionUID = 0L;
/**
* The parent call container.
*/
private final CallPanel callPanel;
/**
* Initializes a new <tt>ShowHideVideoButton</tt> instance which is to
* toggle the display of the visual <tt>Component</tt> which depicts the
* video streaming from the local peer/user to the remote peer(s).
*
* @param callPanel the parent call container
* @param selected <tt>true</tt> if the new toggle button is to be initially
* selected; otherwise, <tt>false</tt>
*/
public ShowHidePeersButton(CallPanel callPanel, boolean selected)
{
super( null,
true,
selected,
ImageLoader.SHOW_HIDE_PEERS_BUTTON,
ImageLoader.SHOW_HIDE_PEERS_BUTTON_PRESSED,
"service.gui.SHOW_HIDE_PEERS_TOOL_TIP");
this.callPanel = callPanel;
}
/**
* Toggles the display of the visual <tt>Component</tt> which depicts the
* video streaming from the local peer/user to the remote peer(s).
*/
@Override
public void buttonPressed()
{
callPanel.showThumbnailsList(isSelected());
}
}

@ -85,6 +85,8 @@ public void update(Observable o, Object arg)
*/
private final ThumbnailConferenceCallPanel thumbnailContainer;
private final JPanel thumbnailPanel;
/**
* Initializes a new <tt>VideoConferenceCallPanel</tt> instance which is to
* be used by a specific <tt>CallPanel</tt> to depict a specific
@ -107,6 +109,7 @@ public VideoConferenceCallPanel(
this.uiVideoHandler = uiVideoHandler;
thumbnailPanel = new JPanel(new BorderLayout());
thumbnailContainer
= new ThumbnailConferenceCallPanel( callPanel,
callConference,
@ -260,7 +263,6 @@ private VideoContainer createVideoContainer()
{
VideoContainer videoContainer = new VideoContainer(null, true);
JPanel thumbnailPanel = new JPanel(new BorderLayout());
thumbnailPanel.setBackground(Color.DARK_GRAY);
thumbnailPanel.add(thumbnailContainer, BorderLayout.NORTH);
@ -270,6 +272,17 @@ private VideoContainer createVideoContainer()
return videoContainer;
}
/**
* Shows/hides the participants thumbnails list.
*
* @param show <tt>true</tt> to show the participants list, <tt>false</tt>
* to hide it
*/
public void showThumbnailsList(boolean show)
{
thumbnailPanel.setVisible(show);
}
/**
* {@inheritDoc}
*/

@ -777,6 +777,20 @@ public class ImageLoader
public static final ImageID SHOW_LOCAL_VIDEO_BUTTON_PRESSED
= new ImageID("service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON_PRESSED");
/**
* A show/hide local video button icon. The icon shown in the CallPeer
* panel.
*/
public static final ImageID SHOW_HIDE_PEERS_BUTTON
= new ImageID("service.gui.buttons.SHOW_HIDE_PEERS_BUTTON");
/**
* A show/hide local video button pressed icon. The icon shown in the
* CallPeer panel.
*/
public static final ImageID SHOW_HIDE_PEERS_BUTTON_PRESSED
= new ImageID("service.gui.buttons.SHOW_HIDE_PEERS_BUTTON_PRESSED");
/**
* The resize video button.
*/

Loading…
Cancel
Save