Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.call
Class DTMFHandler

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.call.DTMFHandler
All Implemented Interfaces:
KeyEventDispatcher

public class DTMFHandler
extends Object
implements KeyEventDispatcher

Handles DTMF sending and playing sound notifications for that.

Author:
Damian Minkov

Nested Class Summary
static class DTMFHandler.DTMFToneInfo
          DTMF extended information.
 
Field Summary
static DTMFHandler.DTMFToneInfo[] availableTones
          All available tones and its properties like images for buttons, and sounds to be played during send.
(package private)  ArrayList<Window> parents
          Parent windows we listen key entering on them.
 
Constructor Summary
DTMFHandler()
          Creates DTMF handler for a call.
DTMFHandler(CallPanel callContainer)
          Creates DTMF handler for a call.
 
Method Summary
 void addParent(Window w)
          Add parent on which we listen for key entering.
 boolean dispatchKeyEvent(KeyEvent e)
          This one dispatches key events and if they are on one of our focused parents.
 void startSendingDtmfTone(String toneValue)
          Sends a DTMF tone to the current DTMF operation set.
 void stopSendingDtmfTone()
          Stop sending DTMF tone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parents

ArrayList<Window> parents
Parent windows we listen key entering on them.


availableTones

public static final DTMFHandler.DTMFToneInfo[] availableTones
All available tones and its properties like images for buttons, and sounds to be played during send.

Constructor Detail

DTMFHandler

public DTMFHandler(CallPanel callContainer)
Creates DTMF handler for a call.

Parameters:
callContainer - the CallContainer, where this handler is registered

DTMFHandler

public DTMFHandler()
Creates DTMF handler for a call.

Method Detail

addParent

public void addParent(Window w)
Add parent on which we listen for key entering.

Parameters:
w -

dispatchKeyEvent

public boolean dispatchKeyEvent(KeyEvent e)
This one dispatches key events and if they are on one of our focused parents.

Specified by:
dispatchKeyEvent in interface KeyEventDispatcher
Parameters:
e - the event.
Returns:
whether to continue dispatching this event, for now always return false, so it continues.

startSendingDtmfTone

public void startSendingDtmfTone(String toneValue)
Sends a DTMF tone to the current DTMF operation set.

Parameters:
toneValue - the value of the DTMF tone to send.

stopSendingDtmfTone

public void stopSendingDtmfTone()
Stop sending DTMF tone.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.