|
|
|
|
@ -102,11 +102,6 @@ public class CallDialog
|
|
|
|
|
*/
|
|
|
|
|
private HoldButton holdButton;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The mute button.
|
|
|
|
|
*/
|
|
|
|
|
private MuteButton muteButton;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The button which allows starting and stopping the recording of the
|
|
|
|
|
* {@link #call}.
|
|
|
|
|
@ -133,11 +128,6 @@ public class CallDialog
|
|
|
|
|
*/
|
|
|
|
|
private FullScreenButton fullScreenButton;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The volume control button.
|
|
|
|
|
*/
|
|
|
|
|
private VolumeControlButton volumeControlButton;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The dial button, which opens a keypad dialog.
|
|
|
|
|
*/
|
|
|
|
|
@ -182,6 +172,16 @@ public class CallDialog
|
|
|
|
|
*/
|
|
|
|
|
private Timer callDurationTimer;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sound local level label.
|
|
|
|
|
*/
|
|
|
|
|
private AbstractVolumeControlButton localLevel;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sound remote level label.
|
|
|
|
|
*/
|
|
|
|
|
private AbstractVolumeControlButton remoteLevel;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a <tt>CallDialog</tt> by specifying the underlying call panel.
|
|
|
|
|
*
|
|
|
|
|
@ -247,13 +247,18 @@ private void init()
|
|
|
|
|
ImageLoader.getImage(ImageLoader.HANGUP_BUTTON_BG));
|
|
|
|
|
|
|
|
|
|
holdButton = new HoldButton(call);
|
|
|
|
|
muteButton = new MuteButton(call);
|
|
|
|
|
recordButton = new RecordButton(call);
|
|
|
|
|
videoButton = new LocalVideoButton(call);
|
|
|
|
|
desktopSharingButton = new DesktopSharingButton(call);
|
|
|
|
|
transferCallButton = new TransferCallButton(call);
|
|
|
|
|
fullScreenButton = new FullScreenButton(this);
|
|
|
|
|
volumeControlButton = new VolumeControlButton();
|
|
|
|
|
|
|
|
|
|
localLevel = new InputVolumeControlButton(
|
|
|
|
|
call,
|
|
|
|
|
ImageLoader.MUTE_BUTTON,
|
|
|
|
|
false, true, false);
|
|
|
|
|
remoteLevel = new OutputVolumeControlButton(
|
|
|
|
|
ImageLoader.VOLUME_CONTROL_BUTTON, false, true);
|
|
|
|
|
|
|
|
|
|
dialButton.setName(DIAL_BUTTON);
|
|
|
|
|
dialButton.setToolTipText(
|
|
|
|
|
@ -278,15 +283,11 @@ private void init()
|
|
|
|
|
dialButton.setEnabled(false);
|
|
|
|
|
conferenceButton.setEnabled(false);
|
|
|
|
|
holdButton.setEnabled(false);
|
|
|
|
|
muteButton.setEnabled(false);
|
|
|
|
|
recordButton.setEnabled(false);
|
|
|
|
|
volumeControlButton.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
settingsPanel.add(dialButton);
|
|
|
|
|
settingsPanel.add(conferenceButton);
|
|
|
|
|
settingsPanel.add(holdButton);
|
|
|
|
|
settingsPanel.add(muteButton);
|
|
|
|
|
settingsPanel.add(volumeControlButton);
|
|
|
|
|
settingsPanel.add(recordButton);
|
|
|
|
|
|
|
|
|
|
if (!isLastConference)
|
|
|
|
|
@ -301,8 +302,6 @@ private void init()
|
|
|
|
|
addOneToOneSpecificComponents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settingsPanel.add(volumeControlButton);
|
|
|
|
|
|
|
|
|
|
dtmfHandler = new DTMFHandler(this);
|
|
|
|
|
|
|
|
|
|
JComponent bottomBar = createBottomBar();
|
|
|
|
|
@ -441,34 +440,6 @@ public void updateHoldButtonState()
|
|
|
|
|
this.holdButton.setSelected(isAllLocallyOnHold);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Updates the state of the general mute button. The mute buttons is
|
|
|
|
|
* selected only if all call peers are muted at the same time. In all other
|
|
|
|
|
* cases the mute button is unselected.
|
|
|
|
|
*/
|
|
|
|
|
public void updateMuteButtonState()
|
|
|
|
|
{
|
|
|
|
|
// Check if all the call peers are muted and change the state of
|
|
|
|
|
// the button.
|
|
|
|
|
Iterator<? extends CallPeer> callPeers = call.getCallPeers();
|
|
|
|
|
|
|
|
|
|
boolean isAllMute = true;
|
|
|
|
|
while(callPeers.hasNext())
|
|
|
|
|
{
|
|
|
|
|
CallPeer callPeer = callPeers.next();
|
|
|
|
|
if (!callPeer.isMute())
|
|
|
|
|
{
|
|
|
|
|
isAllMute = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If we have clicked the mute button in a full screen mode or selected
|
|
|
|
|
// mute of the peer menu in a conference call we need to update the
|
|
|
|
|
// state of the call dialog hold button.
|
|
|
|
|
muteButton.setSelected(isAllMute);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Selects or unselects the video button in this call dialog.
|
|
|
|
|
*
|
|
|
|
|
@ -576,9 +547,7 @@ public void enableButtons()
|
|
|
|
|
dialButton.setEnabled(true);
|
|
|
|
|
conferenceButton.setEnabled(true);
|
|
|
|
|
holdButton.setEnabled(true);
|
|
|
|
|
muteButton.setEnabled(true);
|
|
|
|
|
recordButton.setEnabled(true);
|
|
|
|
|
volumeControlButton.setEnabled(true);
|
|
|
|
|
|
|
|
|
|
if (!isLastConference)
|
|
|
|
|
{
|
|
|
|
|
@ -989,6 +958,9 @@ private void removeOneToOneSpecificComponents()
|
|
|
|
|
settingsPanel.remove(desktopSharingButton);
|
|
|
|
|
settingsPanel.remove(transferCallButton);
|
|
|
|
|
settingsPanel.remove(fullScreenButton);
|
|
|
|
|
|
|
|
|
|
//settingsPanel.add(localLevel);
|
|
|
|
|
//settingsPanel.add(remoteLevel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -1000,6 +972,9 @@ private void addOneToOneSpecificComponents()
|
|
|
|
|
settingsPanel.add(desktopSharingButton);
|
|
|
|
|
settingsPanel.add(transferCallButton);
|
|
|
|
|
settingsPanel.add(fullScreenButton);
|
|
|
|
|
|
|
|
|
|
//settingsPanel.remove(localLevel);
|
|
|
|
|
//settingsPanel.remove(remoteLevel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|