final IncomingCallHUDPanel incomingCallHUDPanel =
new IncomingCallHUDPanel(this, session, cell.getCellID(),
(VoiceChatJoinRequestMessage) message);
HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
final HUDComponent incomingCallHUDComponent =
mainHUD.createComponent(incomingCallHUDPanel);
incomingCallHUDPanel.setHUDComponent(incomingCallHUDComponent);
incomingCallHUDComponent.setPreferredLocation(Layout.CENTER);
incomingCallHUDComponent.setIcon(voiceChatIcon);
mainHUD.addComponent(incomingCallHUDComponent);
incomingCallHUDComponent.addEventListener(new HUDEventListener() {
public void HUDObjectChanged(HUDEvent e) {
if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
incomingCallHUDPanel.busy();
}
}
});
incomingCallHUDComponent.setVisible(true);
return;
}
if (message instanceof VoiceChatBusyMessage) {
VoiceChatBusyMessage msg = (VoiceChatBusyMessage) message;
VoiceChatBusyHUDPanel voiceChatBusyHUDPanel =
new VoiceChatBusyHUDPanel(msg.getCallee());
HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
HUDComponent voiceChatBusyHUDComponent =
mainHUD.createComponent(voiceChatBusyHUDPanel);
voiceChatBusyHUDPanel.setHUDComponent(voiceChatBusyHUDComponent);
voiceChatBusyHUDComponent.setPreferredLocation(Layout.CENTER);
voiceChatBusyHUDComponent.setIcon(voiceChatIcon);
mainHUD.addComponent(voiceChatBusyHUDComponent);
voiceChatBusyHUDComponent.addEventListener(new HUDEventListener() {
public void HUDObjectChanged(HUDEvent e) {
if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
}
}
});
voiceChatBusyHUDComponent.setVisible(true);
notifyMemberChangeListeners(msg.getGroup(), msg.getCallee(), false);
return;
}