}
public ContextMenuItem[] getContextMenuItems(ContextEvent event) {
return new ContextMenuItem[] {
new SimpleContextMenuItem(BUNDLE.getString("Volume..."),
new ContextMenuActionListener()
{
public void actionPerformed(ContextMenuItemEvent event) {
VolumeControlJFrame vcjf =
new VolumeControlJFrame(new VolumeChangeListener()
{
public void volumeChanged(float volume) {
controls.setVolume(remotePI, volume);
}
}, remote.getIdentity().getUsername() + " " +
BUNDLE.getString("Volume"));
vcjf.pack();
vcjf.setVisible(true);
}
}),
new SimpleContextMenuItem(BUNDLE.getString("Text_Chat..."),
new ContextMenuActionListener()
{
public void actionPerformed(ContextMenuItemEvent event) {
controls.startTextChat(remote.getIdentity());
}
}),
new SimpleContextMenuItem(BUNDLE.getString("Voice_Chat..."),
new ContextMenuActionListener()
{
public void actionPerformed(ContextMenuItemEvent event) {
controls.startVoiceChat(Collections.singletonList(remotePI),
null);
}