String label = event.getContextMenuItem().getLabel();
CellID cellID = cell.getCellID();
if (PLAY.equals(label) || RESUME.equals(label)) {
addMenuItems(new String[] {STOP, PAUSE, VOLUME});
channelComp.send(new AudioTreatmentRequestMessage(cellID, false, false));
return;
}
if (PAUSE.equals(label)) {
addMenuItems(new String[] {STOP, RESUME, VOLUME});
channelComp.send(new AudioTreatmentRequestMessage(cellID, false, true));
return;
}
if (VOLUME.equals(label)) {
String softphoneCallID = SoftphoneControlImpl.getInstance().getCallID();
if (volumeControlJFrame == null) {
volumeControlJFrame = new VolumeControlJFrame(this, "");
}
volumeControlJFrame.setLocationRelativeTo(
JmeClientMain.getFrame().getFrame());
volumeControlJFrame.setVisible(true);
return;
}
if (!(STOP.equals(label))) {
return;
}
addMenuItems(new String[] {PLAY, VOLUME});
channelComp.send(new AudioTreatmentRequestMessage(cellID, true, true));
}