Call window toolbar enhancements.

cusax-fix
Yana Stamcheva 15 years ago
parent e625b43735
commit 7a3bfde430

@ -105,6 +105,9 @@ service.gui.icons.SEND_SMS=resources/images/impl/gui/common/sms.png
service.gui.icons.SEND_SMS_SELECTED=resources/images/impl/gui/common/smsSelected.png
service.gui.icons.TYPING=resources/images/impl/gui/common/typing.gif
service.gui.icons.WINDOW_RESIZE_ICON=resources/images/impl/gui/common/windowResizeIcon.png
service.gui.icons.LO_VIDEO_ICON=resources/images/impl/gui/common/loVideoIcon.png
service.gui.icons.SD_VIDEO_ICON=resources/images/impl/gui/common/sdVideoIcon.png
service.gui.icons.HD_VIDEO_ICON=resources/images/impl/gui/common/hdVideoIcon.png
# Status icons
service.gui.statusicons.USER_ONLINE_ICON=resources/images/impl/gui/common/statusicons/online.png
@ -162,10 +165,15 @@ service.gui.buttons.EDIT_TOOLBAR_BUTTON=resources/images/impl/gui/buttons/editTo
service.gui.buttons.EDIT_TOOLBAR_BUTTON_PRESSED=resources/images/impl/gui/buttons/editToolbarButtonPressed.png
service.gui.buttons.DIAL_BUTTON=resources/images/impl/gui/buttons/dialButton.png
service.gui.buttons.HOLD_BUTTON=resources/images/impl/gui/buttons/holdButton.png
service.gui.buttons.HOLD_BUTTON_PRESSED=resources/images/impl/gui/buttons/holdButtonPressed.png
service.gui.buttons.MUTE_BUTTON=resources/images/impl/gui/buttons/muteButton.png
service.gui.buttons.MUTE_BUTTON_PRESSED=resources/images/impl/gui/buttons/muteButtonPressed.png
service.gui.buttons.RECORD_BUTTON=resources/images/impl/gui/buttons/recordButton.png
service.gui.buttons.RECORD_BUTTON_PRESSED=resources/images/impl/gui/buttons/recordButtonPressed.png
service.gui.buttons.LOCAL_VIDEO_BUTTON=resources/images/impl/gui/buttons/localVideoButton.png
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.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
@ -207,6 +215,9 @@ service.gui.buttons.RESET=resources/images/impl/gui/buttons/reset.png
service.gui.buttons.VOLUME_CONTROL=resources/images/impl/gui/buttons/volumeControl.png
service.gui.buttons.CLOSE_VIDEO=resources/images/impl/gui/buttons/closeVideo.png
service.gui.buttons.TRANSPARENT_WINDOW_BUTTON=resources/images/impl/gui/buttons/transparentWindowButton.png
service.gui.buttons.HD_VIDEO_BUTTON=resources/images/impl/gui/buttons/hdVideo.png
service.gui.buttons.SD_VIDEO_BUTTON=resources/images/impl/gui/buttons/sdVideo.png
service.gui.buttons.LO_VIDEO_BUTTON=resources/images/impl/gui/buttons/loVideo.png
# Sound level icons
service.gui.soundlevel.SOUND_LEVEL_ACTIVE=resources/images/impl/gui/common/soundlevel/soundActive.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

@ -85,10 +85,11 @@ service.gui.CALL_NOT_SUPPORTING_PARTICIPANT=This call only supports participants
service.gui.CANCEL=&Cancel
service.gui.CHAT=Chat
service.gui.CHANGE_FONT=Change font
service.gui.CHANGE_ROOM_SUBJECT=Change room's subject...
service.gui.CHANGE_ROOM_SUBJECT_LABEL=In the field below, you can enter the new subject for this room.
service.gui.CHANGE_NICKNAME=Change nickname...
service.gui.CHANGE_NICKNAME_LABEL=In the field below, you can enter your new nickname.
service.gui.CHANGE_ROOM_SUBJECT=Change room's subject...
service.gui.CHANGE_ROOM_SUBJECT_LABEL=In the field below, you can enter the new subject for this room.
service.gui.CHANGE_VIDEO_QUALITY=Change video quality
service.gui.CHAT_ROOM_ALREADY_JOINED=The {0} chat room is already joined.
service.gui.CHAT_ROOM_CONFIGURATION={0} chat room configuration
service.gui.CHAT_ROOM_CONFIGURATION_FAILED=Failed to obtain the {0} chat room configuration form.
@ -219,6 +220,7 @@ service.gui.GRANT_MEMBERSHIP=Grant membership
service.gui.GRANT_VOICE=Grant voice
service.gui.GUEST=visitor
service.gui.HANG_UP=Hang up
service.gui.HD_QUALITY=HD video (720p)
service.gui.HELP=&Help
service.gui.HIDE=Hide
service.gui.HIDE_OFFLINE_CONTACTS=Hide offline contacts
@ -271,6 +273,7 @@ service.gui.LOGIN_GENERAL_ERROR=An error occurred while logging in with account:
service.gui.LOGIN_INTERNAL_ERROR=An error occurred while logging in with account: User name: {0}, Server name: {1}. This is most probably an internal application error. Please report the problem to our developers mailing list (dev@jitsi.java.net).
service.gui.LOGIN_INVALID_PROPERTIES_ERROR=Unable to log in with account: User name: {0}, Server name: {1}, due to an account configuration problem. Please check your account configuration.
service.gui.LOGOFF_NOT_SUCCEEDED=An error occurred while logging off with the following account: User name: {0}, Server name: {1}.
service.gui.LOW_QUALITY=Low quality (175p)
service.gui.MEMBER=member
service.gui.MESSAGE=Message:
service.gui.MISSED_CALLS_TOOL_TIP=Missed calls from:
@ -315,6 +318,7 @@ service.gui.NO_GROUP_CHAT_ACCOUNT_AVAILABLE=No accounts, supporting multi user c
service.gui.NO_ONLINE_TELEPHONY_ACCOUNT=At least one online telephony account is needed in order to make a call. Please login to one of your telephony accounts and try again.
service.gui.NON_EMPTY_CHAT_WINDOW_CLOSE=You're trying to close a chat with a non-sent message. Are you sure you want to close this chat?
service.gui.NON_EXISTING_USER_ID=The {0} server does not recognize specified user id.
service.gui.SD_QUALITY=Standard quality (480p)
service.gui.OFFLINE=Offline
service.gui.OK=&OK
service.gui.OLDER_CALLS=Older calls

@ -280,6 +280,22 @@ public void loadSkin()
}
}
/**
* Sets the icon image of this button.
*
* @param iconImageID the identifier of the icon image
*/
public void setIconImageID(ImageID iconImageID)
{
this.iconImageID = iconImageID;
if (!fullScreen && !settingsPanel)
setIconImage(ImageUtils.scaleImageWithinBounds(
ImageLoader.getImage(iconImageID), 12, 12));
else
setIconImage(ImageLoader.getImage(iconImageID));
}
/**
* Notifies this <tt>AbstractCallToggleButton</tt> that its associated
* action has been performed and that it should execute its very logic.

@ -113,6 +113,11 @@ public class CallPanel
*/
private ShowHideVideoButton showHideVideoButton;
/**
* The video resize button.
*/
private ResizeVideoButton resizeVideoButton;
/**
* The desktop sharing button.
*/
@ -272,6 +277,7 @@ private void init()
recordButton = new RecordButton(call);
videoButton = new LocalVideoButton(call);
showHideVideoButton = new ShowHideVideoButton(call);
resizeVideoButton = new ResizeVideoButton(call);
showHideVideoButton.setPeerRenderer(((CallRenderer) callPanel)
.getCallPeerRenderer(call.getCallPeers().next()));
@ -283,6 +289,16 @@ private void init()
public void stateChanged(ChangeEvent e)
{
boolean isVideoSelected = videoButton.isSelected();
if (isVideoSelected)
settingsPanel.add(showHideVideoButton,
GuiUtils.getComponentIndex(
videoButton, settingsPanel) + 1);
else
settingsPanel.remove(showHideVideoButton);
settingsPanel.revalidate();
settingsPanel.repaint();
showHideVideoButton.setEnabled(isVideoSelected);
showHideVideoButton.setSelected(isVideoSelected);
}
@ -334,10 +350,11 @@ public void stateChanged(ChangeEvent e)
{
// Buttons would be enabled once the call has entered in state
// connected.
transferCallButton.setEnabled(false);
desktopSharingButton.setEnabled(false);
videoButton.setEnabled(false);
showHideVideoButton.setEnabled(false);
desktopSharingButton.setEnabled(false);
transferCallButton.setEnabled(false);
resizeVideoButton.setEnabled(false);
fullScreenButton.setEnabled(false);
addOneToOneSpecificComponents();
@ -1061,6 +1078,7 @@ private void removeOneToOneSpecificComponents()
settingsPanel.remove(videoButton);
settingsPanel.remove(showHideVideoButton);
settingsPanel.remove(resizeVideoButton);
settingsPanel.remove(desktopSharingButton);
settingsPanel.remove(transferCallButton);
settingsPanel.remove(fullScreenButton);
@ -1071,10 +1089,9 @@ private void removeOneToOneSpecificComponents()
*/
private void addOneToOneSpecificComponents()
{
settingsPanel.add(videoButton);
settingsPanel.add(showHideVideoButton);
settingsPanel.add(desktopSharingButton);
settingsPanel.add(transferCallButton);
settingsPanel.add(desktopSharingButton);
settingsPanel.add(videoButton);
settingsPanel.add(fullScreenButton);
}

@ -10,6 +10,7 @@
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.ImageID;
import net.java.sip.communicator.util.*;
/**
@ -63,8 +64,10 @@ public HoldButton(Call call, boolean fullScreen, boolean selected)
{
super( call,
fullScreen,
true,
selected,
ImageLoader.HOLD_BUTTON,
ImageLoader.HOLD_BUTTON_PRESSED,
"service.gui.HOLD_BUTTON_TOOL_TIP");
}

@ -50,11 +50,12 @@ public LocalVideoButton(Call call)
*/
public LocalVideoButton(Call call, boolean fullScreen, boolean selected)
{
super(
call,
super( call,
fullScreen,
true,
selected,
ImageLoader.LOCAL_VIDEO_BUTTON,
ImageLoader.LOCAL_VIDEO_BUTTON_PRESSED,
"service.gui.LOCAL_VIDEO_BUTTON_TOOL_TIP");
MediaDevice videoDevice

@ -277,6 +277,8 @@ private Component createFullScreenButtonBar()
Component[] buttons
= new Component[]
{
new InputVolumeControlButton(call, true, callPeer.isMute()),
new OutputVolumeControlButton(true),
new HoldButton(call,
true,
CallPeerState.isOnHold(callPeer.getState())),
@ -284,10 +286,6 @@ private Component createFullScreenButtonBar()
new LocalVideoButton(
call, true, callContainer.isVideoButtonSelected()),
showHideButton,
new InputVolumeControlButton(call,
true,
callPeer.isMute()),
new OutputVolumeControlButton(true),
CallPeerRendererUtils.createExitFullScreenButton(this)
};

@ -92,7 +92,13 @@ public RecordButton(Call call)
*/
public RecordButton(Call call, boolean fullScreen, boolean selected)
{
super(call, fullScreen, selected, ImageLoader.RECORD_BUTTON, null);
super( call,
fullScreen,
true,
selected,
ImageLoader.RECORD_BUTTON,
ImageLoader.RECORD_BUTTON_PRESSED,
null);
String toolTip
= resources.getI18NString("service.gui.RECORD_BUTTON_TOOL_TIP");

@ -0,0 +1,158 @@
/*
* SIP Communicator, 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;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
/**
* The button responsible to resize video for the associated participant.
*
* @author Yana Stamcheva
*/
public class ResizeVideoButton
extends AbstractCallToggleButton
{
/**
* Initializes a new <tt>DesktopSharingButton</tt> instance which is meant
* to be used to initiate a desktop sharing during a call.
*
* @param call the <tt>Call</tt> to be associated with the desktop sharing
* button instance
*/
public ResizeVideoButton(Call call)
{
this(call, false, false);
}
/**
* Initializes a new <tt>HoldButton</tt> instance which is to put a specific
* <tt>CallPeer</tt> on/off hold.
*
* @param call the <tt>Call</tt> to be associated with the new instance and
* to be put on/off hold upon performing its action
* @param fullScreen <tt>true</tt> if the new instance is to be used in
* full-screen UI; otherwise, <tt>false</tt>
* @param selected <tt>true</tt> if the new toggle button is to be initially
* selected; otherwise, <tt>false</tt>
*/
public ResizeVideoButton(Call call, boolean fullScreen, boolean selected)
{
super( call,
fullScreen,
selected,
ImageLoader.SD_VIDEO_BUTTON,
"service.gui.CHANGE_VIDEO_QUALITY");
}
/**
* Shares the desktop with the peers in the current call.
*/
public void buttonPressed()
{
if (call != null)
{
//We'll select the button once the desktop sharing has been
// established.
setSelected(false);
JPopupMenu resizeMenu = createResizeVideoMenu();
Point location = new Point(getX(), getY() + getHeight());
SwingUtilities.convertPointToScreen(location, getParent());
resizeMenu.setLocation(location);
resizeMenu.setVisible(true);
}
}
/**
* Creates the menu responsible for desktop sharing when a single desktop
* sharing contact is available.
*
* @return the created popup menu
*/
private JPopupMenu createResizeVideoMenu()
{
final JPopupMenu popupMenu = new JPopupMenu(
GuiActivator.getResources().getI18NString(
"service.gui.CHANGE_VIDEO_QUALITY"));
popupMenu.setInvoker(this);
popupMenu.setFocusable(true);
JMenuItem lowQuality = new JMenuItem(
GuiActivator.getResources()
.getI18NString("service.gui.LOW_QUALITY"),
GuiActivator.getResources()
.getImage("service.gui.icons.LO_VIDEO_ICON"));
JMenuItem normalQuality = new JMenuItem(GuiActivator.getResources()
.getI18NString("service.gui.SD_QUALITY"),
GuiActivator.getResources()
.getImage("service.gui.icons.SD_VIDEO_ICON"));
JMenuItem hdQuality = new JMenuItem(GuiActivator.getResources()
.getI18NString("service.gui.HD_QUALITY"),
GuiActivator.getResources()
.getImage("service.gui.icons.HD_VIDEO_ICON"));
JLabel titleLabel = new JLabel(
GuiActivator.getResources().getI18NString(
"service.gui.CHANGE_VIDEO_QUALITY"));
titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
titleLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
popupMenu.add(titleLabel);
popupMenu.addSeparator();
popupMenu.add(hdQuality);
popupMenu.add(normalQuality);
popupMenu.add(lowQuality);
lowQuality.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
popupMenu.setVisible(false);
setIconImageID(ImageLoader.LO_VIDEO_BUTTON);
// TODO: set low quality.
}
});
normalQuality.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
popupMenu.setVisible(false);
setIconImageID(ImageLoader.SD_VIDEO_BUTTON);
// TODO: set normal quality.
}
});
hdQuality.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
popupMenu.setVisible(false);
setIconImageID(ImageLoader.HD_VIDEO_BUTTON);
// TODO: set hd quality.
}
});
return popupMenu;
}
}

@ -51,10 +51,12 @@ public ShowHideVideoButton( Call call,
boolean selected)
{
super( call,
fullScreen,
selected,
ImageLoader.SHOW_LOCAL_VIDEO_BUTTON,
"service.gui.SHOW_LOCAL_VIDEO_BUTTON_TOOL_TIP");
fullScreen,
true,
selected,
ImageLoader.SHOW_LOCAL_VIDEO_BUTTON,
ImageLoader.SHOW_LOCAL_VIDEO_BUTTON_PRESSED,
"service.gui.SHOW_LOCAL_VIDEO_BUTTON_TOOL_TIP");
}
/**

@ -488,6 +488,13 @@ public class ImageLoader
public static final ImageID HOLD_BUTTON
= new ImageID("service.gui.buttons.HOLD_BUTTON");
/**
* A put-on/off-hold button icon. The icon shown in the CallPeer
* panel.
*/
public static final ImageID HOLD_BUTTON_PRESSED
= new ImageID("service.gui.buttons.HOLD_BUTTON_PRESSED");
/**
* The icon shown when the status of the call is "On hold".
*/
@ -506,18 +513,36 @@ public class ImageLoader
public static final ImageID MUTE_BUTTON
= new ImageID("service.gui.buttons.MUTE_BUTTON");
/**
* A mute button pressed icon. The icon shown in the CallPeer panel.
*/
public static final ImageID MUTE_BUTTON_PRESSED
= new ImageID("service.gui.buttons.MUTE_BUTTON_PRESSED");
/**
* A record button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID RECORD_BUTTON
= new ImageID("service.gui.buttons.RECORD_BUTTON");
/**
* A record button pressed icon. The icon shown in the CallPeer panel.
*/
public static final ImageID RECORD_BUTTON_PRESSED
= new ImageID("service.gui.buttons.RECORD_BUTTON_PRESSED");
/**
* A local video button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID LOCAL_VIDEO_BUTTON
= new ImageID("service.gui.buttons.LOCAL_VIDEO_BUTTON");
/**
* A local video button pressed icon. The icon shown in the CallPeer panel.
*/
public static final ImageID LOCAL_VIDEO_BUTTON_PRESSED
= new ImageID("service.gui.buttons.LOCAL_VIDEO_BUTTON_PRESSED");
/**
* A show/hide local video button icon. The icon shown in the CallPeer
* panel.
@ -525,6 +550,31 @@ public class ImageLoader
public static final ImageID SHOW_LOCAL_VIDEO_BUTTON
= new ImageID("service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON");
/**
* A show/hide local video button pressed icon. The icon shown in the
* CallPeer panel.
*/
public static final ImageID SHOW_LOCAL_VIDEO_BUTTON_PRESSED
= new ImageID("service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON_PRESSED");
/**
* The resize video button.
*/
public static final ImageID HD_VIDEO_BUTTON
= new ImageID("service.gui.buttons.HD_VIDEO_BUTTON");
/**
* The resize video button.
*/
public static final ImageID SD_VIDEO_BUTTON
= new ImageID("service.gui.buttons.SD_VIDEO_BUTTON");
/**
* The resize video button.
*/
public static final ImageID LO_VIDEO_BUTTON
= new ImageID("service.gui.buttons.LO_VIDEO_BUTTON");
/**
* A call-transfer button icon. The icon shown in the CallPeer panel.
*/

@ -463,6 +463,25 @@ public static void updateComponentTreeUI(Component c)
c.repaint();
}
/**
* Returns the index of the given component in the given container.
*
* @param c the Component to look for
* @param container the parent container, where this component is added
* @return the index of the component in the container or -1 if no such
* component is contained in the container
*/
public static int getComponentIndex(Component c, Container container)
{
for (int i = 0; i < container.getComponentCount(); i++)
{
if (container.getComponent(i).equals(c))
return i;
}
return -1;
}
/**
* Repaints UI tree recursively.
* @param c UI component.

Loading…
Cancel
Save