implement DTMF in gui

cusax-fix
Yana Stamcheva 19 years ago
parent 039915eeb2
commit 4d5848e800

@ -66,6 +66,7 @@ cut=C&ut
date=Date
description=Description
dial=&Dial
dialpad=Dialpad
doNotAskAgain=Don't ask again
dontSupportWebInfo=This contact doesn't support web contact info
duration=Duration

@ -729,7 +729,11 @@ public void addCallPanel(CallPanel callPanel)
*/
public void removeCallPanel(CallPanel callPanel)
{
this.tabbedPane.remove(callPanel);
// Should remove all participant panels explicetly, thus removing also
// all related dialogs (like dialpad for example).
callPanel.removeDialogs();
tabbedPane.remove(callPanel);
Component c = getSelectedTab();

@ -45,7 +45,7 @@ public MainTabbedPane(MainFrame parent) {
callHistoryPanel = new CallListPanel(parent);
dialPanel = new DialPanel(parent);
dialPanel = new DialPanel(parent.getCallManager());
chatRoomsListPanel = new ChatRoomsListPanel(parent);
@ -55,8 +55,7 @@ public MainTabbedPane(MainFrame parent) {
//chatRoomsListPanel);
this.addTab(Messages.getI18NString("callList").getText(),
callHistoryPanel);
this.addTab(Messages.getI18NString("dial").getText(), dialPanel);
this.addTab(Messages.getI18NString("dial").getText(), dialPanel);
}
/**

@ -606,6 +606,19 @@ else if (phoneNumberCombo.isComboFieldEmpty())
public void stateChanged(ChangeEvent e)
{
this.updateButtonsStateAccordingToSelectedPanel();
Component selectedPanel = mainFrame.getSelectedTab();
if (selectedPanel == null || !(selectedPanel instanceof CallPanel))
{
Iterator callPanels = activeCalls.values().iterator();
while(callPanels.hasNext())
{
CallPanel callPanel = (CallPanel) callPanels.next();
callPanel.removeDialogs();
}
}
}
/**

@ -147,10 +147,14 @@ private CallParticipantPanel addCallParticipant(
if(participantPanel == null)
{
participantPanel
= new CallParticipantPanel(participantName);
= new CallParticipantPanel(callManager, participantName);
this.mainPanel.add(participantPanel);
// The participant panel should know when it is removed in order
// to hide all related open dialogs.
this.mainPanel.addContainerListener(participantPanel);
participantPanel.setCallType(callType);
this.participantsPanels.put(
@ -176,10 +180,14 @@ private CallParticipantPanel addCallParticipant(
if(participantPanel == null)
{
participantPanel
= new CallParticipantPanel(participant);
= new CallParticipantPanel(callManager, participant);
this.mainPanel.add(participantPanel);
// The participant panel should know when it is removed in order
// to hide all related open dialogs.
this.mainPanel.addContainerListener(participantPanel);
participantPanel.setCallType(callType);
this.participantsPanels.put(
@ -367,6 +375,7 @@ public void setCall(Call call, String callType)
// Remove all previously added participant panels, because they do not
// correspond to real participants.
this.mainPanel.removeAll();
this.participantsPanels.clear();
Iterator participants = call.getCallParticipants();
@ -416,7 +425,7 @@ public void actionPerformed(ActionEvent e)
//remove the participant panel from the list of panels
participantsPanels.remove(participantWrapper);
}
}
}
/**
@ -429,6 +438,22 @@ public Iterator getParticipantsPanels()
return participantsPanels.values().iterator();
}
/**
* Removes all participant panels and related dialogs.
*/
public void removeDialogs()
{
Iterator i = getParticipantsPanels();
while(i.hasNext())
{
CallParticipantPanel participantPanel
= (CallParticipantPanel) i.next();
participantPanel.removeDialogs();
}
}
/**
* Returns the <tt>CallParticipantPanel</tt>, which correspond to the given
* participant.
@ -507,5 +532,5 @@ private CallParticipantWrapper getParticipantWrapper(
}
return null;
}
}
}

@ -0,0 +1,85 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.main.call;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
/**
* The <tt>ContactInfoPanel</tt> is a popup dialog containing the contact
* detailed info.
*
* @author Yana Stamcheva
*/
public class CallParticipantDialpadDialog
extends JDialog
{
private DialPanel dialPanel;
private BackgroundPanel bgPanel;
/**
* Creates an instance of the <tt>ContactInfoPanel</tt>.
*
* @param owner The frame owner of this dialog.
* @param contactItem The <tt>MetaContact</tt> for the info.
*/
public CallParticipantDialpadDialog(CallManager callManager,
CallParticipant callParticipant)
{
super(callManager.getMainFrame(), false);
dialPanel = new DialPanel(callManager, callParticipant);
this.setUndecorated(true);
this.dialPanel.setOpaque(false);
this.bgPanel = new BackgroundPanel();
this.bgPanel.setLayout(new BorderLayout());
this.bgPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(bgPanel, BorderLayout.CENTER);
this.bgPanel.add(dialPanel, BorderLayout.CENTER);
this.pack();
}
private class BackgroundPanel extends JPanel
{
public void paintComponent(Graphics g)
{
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
GradientPaint p = new GradientPaint(this.getWidth() / 2, 0,
Constants.MOVER_START_COLOR, this.getWidth() / 2,
getHeight(),
Color.WHITE);
g2.setPaint(p);
g2.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
g2.setColor(Constants.LIGHT_GRAY_COLOR);
g2.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 10, 10);
}
}
}

@ -13,6 +13,7 @@
import javax.swing.*;
import javax.swing.Timer;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
@ -23,9 +24,11 @@
*
* @author Yana Stamcheva
*/
public class CallParticipantPanel extends JPanel
public class CallParticipantPanel
extends JPanel
implements ContainerListener
{
private JPanel contactPanel = new JPanel(new BorderLayout());
private JLayeredPane contactPanel = new JLayeredPane();
private JPanel namePanel = new JPanel(new GridLayout(0, 1));
@ -37,6 +40,12 @@ public class CallParticipantPanel extends JPanel
private JLabel photoLabel = new JLabel(new ImageIcon(
ImageLoader.getImage(ImageLoader.DEFAULT_USER_PHOTO)));
private DialButton dialButton;
private JPanel northPanel = new JPanel();
private CallParticipantDialpadDialog dialpadDialog;
private Date callStartTime;
@ -50,29 +59,48 @@ public class CallParticipantPanel extends JPanel
private String participantName;
private CallManager callManager;
private CallParticipant callParticipant;
/**
* Creates a <tt>CallParticipantPanel</tt> for the given call participant.
*
* @param callManager the <tt>CallManager</tt> that manages the call
* @param callParticipant a call participant
*/
public CallParticipantPanel(CallParticipant callParticipant)
public CallParticipantPanel(CallManager callManager,
CallParticipant callParticipant)
{
this(callParticipant.getAddress());
this(callManager, callParticipant.getAddress());
this.callParticipant = callParticipant;
this.stateLabel.setText(callParticipant.getState().getStateString());
dialButton = new DialButton(callManager,
new ImageIcon(ImageLoader.getImage(ImageLoader.DIAL_BUTTON)));
dialButton.setBounds(94, 74, 36, 36);
contactPanel.add(dialButton, new Integer(1));
}
/**
* Creates a <tt>CallParticipantPanel</tt> for the given participant name.
*
* @param callManager the <tt>CallManager</tt> that manages the call
* @param participantName a string representing the participant name
*/
public CallParticipantPanel(String participantName)
{
public CallParticipantPanel(CallManager callManager, String participantName)
{
super(new BorderLayout());
this.callManager = callManager;
// Initialize the call start time. This date is meant to be used in
// the GuiCallParticipantRecord, which is added to the CallList after
// a call.
// a call.
this.callStartTime = new Date(System.currentTimeMillis());
this.participantName = participantName;
@ -92,14 +120,22 @@ public CallParticipantPanel(String participantName)
namePanel.add(nameLabel);
namePanel.add(stateLabel);
namePanel.add(timeLabel);
contactPanel.setPreferredSize(new Dimension(130, 150));
photoLabel.setBounds(20, 0, 90, 100);
namePanel.setBounds(0, 110, 130, 40);
contactPanel.add(photoLabel, BorderLayout.CENTER);
contactPanel.add(namePanel, BorderLayout.SOUTH);
contactPanel.add(photoLabel, new Integer(0));
contactPanel.add(namePanel, new Integer(0));
this.add(contactPanel, BorderLayout.NORTH);
this.setPreferredSize(new Dimension(100, 200));
northPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
northPanel.add(contactPanel);
this.add(northPanel, BorderLayout.NORTH);
}
/**
* Sets the state of the contained call participant.
* @param state the state of the contained call participant
@ -151,7 +187,7 @@ public void actionPerformed(ActionEvent e)
* @return the start time of the conversation
*/
public Date getConversationStartTime()
{
{
return conversationStartTime;
}
@ -212,5 +248,71 @@ public void setCallType(String callType)
public String getParticipantName()
{
return participantName;
}
}
/**
* Customized button for dialpad.
*/
private class DialButton extends JButton
{
private CallManager callManager;
public DialButton(CallManager manager, ImageIcon iconImage)
{
super(iconImage);
this.callManager = manager;
this.setOpaque(false);
this.setToolTipText(Messages.getI18NString("dialpad").getText());
dialpadDialog
= new CallParticipantDialpadDialog(callManager, callParticipant);
this.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
if(!dialpadDialog.isVisible())
{
dialpadDialog.setSize(
callManager.getMainFrame().getWidth() - 20, 200);
dialpadDialog.setLocation(
callManager.getMainFrame().getX() + 10,
getLocationOnScreen().y + getHeight());
dialpadDialog.setVisible(true);
}
else
{
dialpadDialog.setVisible(false);
}
}
});
}
}
public void componentAdded(ContainerEvent e)
{}
/**
* Remove all dialogs open by this participant panel.
*/
public void componentRemoved(ContainerEvent e)
{
this.removeDialogs();
e.getContainer().removeContainerListener(this);
}
/**
* Removes all dialogs open by this participant panel.
*/
public void removeDialogs()
{
if(dialpadDialog != null && dialpadDialog.isVisible())
dialpadDialog.setVisible(false);
}
}

@ -13,13 +13,14 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.audionotifier.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
/**
* The <tt>DialPanel</tt> is the panel that contains the buttons to
* dial a phone number.
* The <tt>DialPanel</tt> is the panel that contains the buttons to dial a
* phone number.
*
* @author Yana Stamcheva
*/
@ -29,71 +30,84 @@ public class DialPanel
implements ActionListener,
MouseListener
{
private Logger logger = Logger.getLogger(DialPanel.class);
private JComboBox phoneNumberCombo;
private JButton oneButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.ONE_DIAL_BUTTON)));
.getImage(ImageLoader.ONE_DIAL_BUTTON)));
private JButton twoButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.TWO_DIAL_BUTTON)));
.getImage(ImageLoader.TWO_DIAL_BUTTON)));
private JButton threeButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.THREE_DIAL_BUTTON)));
.getImage(ImageLoader.THREE_DIAL_BUTTON)));
private JButton fourButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.FOUR_DIAL_BUTTON)));
.getImage(ImageLoader.FOUR_DIAL_BUTTON)));
private JButton fiveButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.FIVE_DIAL_BUTTON)));
.getImage(ImageLoader.FIVE_DIAL_BUTTON)));
private JButton sixButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.SIX_DIAL_BUTTON)));
.getImage(ImageLoader.SIX_DIAL_BUTTON)));
private JButton sevenButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.SEVEN_DIAL_BUTTON)));
.getImage(ImageLoader.SEVEN_DIAL_BUTTON)));
private JButton eightButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.EIGHT_DIAL_BUTTON)));
.getImage(ImageLoader.EIGHT_DIAL_BUTTON)));
private JButton nineButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.NINE_DIAL_BUTTON)));
.getImage(ImageLoader.NINE_DIAL_BUTTON)));
private JButton starButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.STAR_DIAL_BUTTON)));
.getImage(ImageLoader.STAR_DIAL_BUTTON)));
private JButton zeroButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.ZERO_DIAL_BUTTON)));
.getImage(ImageLoader.ZERO_DIAL_BUTTON)));
private JButton diezButton = new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.DIEZ_DIAL_BUTTON)));
.getImage(ImageLoader.DIEZ_DIAL_BUTTON)));
private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, 5, 5));
private MainFrame mainFrame;
private CallManager callManager;
private CallParticipant callParticipant;
/**
* Creates an instance of <tt>DialPanel</tt>.
*/
public DialPanel(MainFrame mainFrame) {
public DialPanel(CallManager callManager)
{
super(new FlowLayout(FlowLayout.CENTER));
this.mainFrame = mainFrame;
this.callManager = callManager;
this.phoneNumberCombo = mainFrame.getCallManager()
.getCallComboBox();
this.dialPadPanel.setOpaque(false);
this.phoneNumberCombo = callManager.getCallComboBox();
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.dialPadPanel.setPreferredSize(new Dimension(140, 140));
this.init();
}
public DialPanel(CallManager callManager, CallParticipant callParticipant)
{
this(callManager);
this.callParticipant = callParticipant;
}
/**
* Initializes this panel by adding all dial buttons to it.
*/
public void init() {
oneButton.setLayout(null);
public void init()
{
oneButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
twoButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
threeButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
@ -106,7 +120,7 @@ public void init() {
zeroButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
diezButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
starButton.setAlignmentY(JButton.LEFT_ALIGNMENT);
oneButton.setName("one");
twoButton.setName("two");
threeButton.setName("three");
@ -132,7 +146,7 @@ public void init() {
zeroButton.addActionListener(this);
diezButton.addActionListener(this);
starButton.addActionListener(this);
oneButton.addMouseListener(this);
twoButton.addMouseListener(this);
threeButton.addMouseListener(this);
@ -146,6 +160,19 @@ public void init() {
diezButton.addMouseListener(this);
starButton.addMouseListener(this);
oneButton.setOpaque(false);
twoButton.setOpaque(false);
threeButton.setOpaque(false);
fourButton.setOpaque(false);
fiveButton.setOpaque(false);
sixButton.setOpaque(false);
sevenButton.setOpaque(false);
eightButton.setOpaque(false);
nineButton.setOpaque(false);
zeroButton.setOpaque(false);
diezButton.setOpaque(false);
starButton.setOpaque(false);
dialPadPanel.add(oneButton);
dialPadPanel.add(twoButton);
dialPadPanel.add(threeButton);
@ -163,54 +190,133 @@ public void init() {
}
/**
* Handles the <tt>ActionEvent</tt> triggered when user presses one of
* the dial buttons.
* Handles the <tt>ActionEvent</tt> triggered when user presses one of the
* dial buttons.
*/
public void actionPerformed(ActionEvent e) {
public void actionPerformed(ActionEvent e)
{
JButton button = (JButton) e.getSource();
String buttonName = button.getName();
String phoneNumber = "";
OperationSetDTMF dtmfOpSet = null;
DTMFTone dtmfTone = null;
if(callParticipant != null
&& callParticipant.getProtocolProvider()
.getOperationSet(OperationSetDTMF.class) != null)
{
dtmfOpSet = (OperationSetDTMF) callParticipant.getProtocolProvider()
.getOperationSet(OperationSetDTMF.class);
}
if (this.phoneNumberCombo.getEditor().getItem() != null)
phoneNumber = (String) this.phoneNumberCombo.getEditor().getItem();
if (buttonName.equals("one")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "1");
if (buttonName.equals("one"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_1;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "1");
}
else if (buttonName.equals("two")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "2");
else if (buttonName.equals("two"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_2;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "2");
}
else if (buttonName.equals("three")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "3");
else if (buttonName.equals("three"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_3;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "3");
}
else if (buttonName.equals("four")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "4");
else if (buttonName.equals("four"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_4;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "4");
}
else if (buttonName.equals("five")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "5");
else if (buttonName.equals("five"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_5;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "5");
}
else if (buttonName.equals("six")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "6");
else if (buttonName.equals("six"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_6;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "6");
}
else if (buttonName.equals("seven")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "7");
else if (buttonName.equals("seven"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_7;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "7");
}
else if (buttonName.equals("eight")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "8");
else if (buttonName.equals("eight"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_8;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "8");
}
else if (buttonName.equals("nine")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "9");
else if (buttonName.equals("nine"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_9;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "9");
}
else if (buttonName.equals("zero")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "0");
else if (buttonName.equals("zero"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_0;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "0");
}
else if (buttonName.equals("diez")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "#");
else if (buttonName.equals("diez"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_SHARP;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "#");
}
else if (buttonName.equals("star")) {
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "*");
else if (buttonName.equals("star"))
{
if(dtmfOpSet != null)
dtmfTone = DTMFTone.DTMF_STAR;
else
this.phoneNumberCombo.getEditor().setItem(phoneNumber + "*");
}
this.phoneNumberCombo.requestFocus();
if(dtmfTone != null)
try
{
dtmfOpSet.sendDTMF(callParticipant, dtmfTone);
}
catch (NullPointerException e1)
{
logger.error("Failed to send a DTMF tone.", e1);
}
catch (ClassCastException e1)
{
logger.error("Failed to send a DTMF tone.", e1);
}
catch (OperationFailedException e1)
{
logger.error("Failed to send a DTMF tone.", e1);
}
else
this.phoneNumberCombo.requestFocus();
}
public void mouseClicked(MouseEvent e)
@ -218,11 +324,11 @@ public void mouseClicked(MouseEvent e)
}
public void mouseEntered(MouseEvent e)
{
{
}
public void mouseExited(MouseEvent e)
{
{
}
public void mousePressed(MouseEvent e)
@ -231,46 +337,58 @@ public void mousePressed(MouseEvent e)
String buttonName = button.getName();
AudioNotifierService audioNotifier = GuiActivator.getAudioNotifier();
if (buttonName.equals("one")) {
if (buttonName.equals("one"))
{
audioNotifier.createAudio(Sounds.DIAL_ONE).play();
}
else if (buttonName.equals("two")) {
else if (buttonName.equals("two"))
{
audioNotifier.createAudio(Sounds.DIAL_TWO).play();
}
else if (buttonName.equals("three")) {
else if (buttonName.equals("three"))
{
audioNotifier.createAudio(Sounds.DIAL_THREE).play();
}
else if (buttonName.equals("four")) {
else if (buttonName.equals("four"))
{
audioNotifier.createAudio(Sounds.DIAL_FOUR).play();
}
else if (buttonName.equals("five")) {
else if (buttonName.equals("five"))
{
audioNotifier.createAudio(Sounds.DIAL_FIVE).play();
}
else if (buttonName.equals("six")) {
else if (buttonName.equals("six"))
{
audioNotifier.createAudio(Sounds.DIAL_SIX).play();
}
else if (buttonName.equals("seven")) {
else if (buttonName.equals("seven"))
{
audioNotifier.createAudio(Sounds.DIAL_SEVEN).play();
}
else if (buttonName.equals("eight")) {
else if (buttonName.equals("eight"))
{
audioNotifier.createAudio(Sounds.DIAL_EIGHT).play();
}
else if (buttonName.equals("nine")) {
else if (buttonName.equals("nine"))
{
audioNotifier.createAudio(Sounds.DIAL_NINE).play();
}
else if (buttonName.equals("zero")) {
else if (buttonName.equals("zero"))
{
audioNotifier.createAudio(Sounds.DIAL_ZERO).play();
}
else if (buttonName.equals("diez")) {
else if (buttonName.equals("diez"))
{
audioNotifier.createAudio(Sounds.DIAL_DIEZ).play();
}
else if (buttonName.equals("star")) {
else if (buttonName.equals("star"))
{
audioNotifier.createAudio(Sounds.DIAL_STAR).play();
}
}
public void mouseReleased(MouseEvent e)
{
{
}
}

@ -6,15 +6,17 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/yana"
sodipodi:docname="dialNumbers.svg">
inkscape:version="0.45"
sodipodi:docbase="/home/yana/workspace/DtmfGui4Sc/src/net/java/sip/communicator/impl/gui/resources/buttons/src"
sodipodi:docname="dialNumbers.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="true">
<defs
id="defs4" />
<sodipodi:namedview
@ -76,11 +78,11 @@
sodipodi:role="line"
id="tspan2055"
x="217.97327"
y="387.20770"
y="387.2077"
style="font-size:10.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">xyz</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;line-height:125.00000%;fill:#4c4c4c;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
style="font-size:12.000000px;font-style:normal;font-weight:normal;line-height:125.00000%;fill:#ac9393;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
x="60.989277"
y="257.87888"
id="text2783"
@ -92,7 +94,7 @@
id="tspan2785"
x="60.989277"
y="257.87888"
style="font-size:16.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#4c4c4c;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">1</tspan></text>
style="font-size:16.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ac9393;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">1</tspan></text>
<text
xml:space="preserve"
style="font-size:12.000000px;font-style:normal;font-weight:normal;line-height:125.00000%;fill:#4c4c4c;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
@ -165,7 +167,7 @@
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2809"
x="56.881020"
x="56.88102"
y="322.71796"
style="font-size:16.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#4c4c4c;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">4</tspan></text>
<text
@ -181,7 +183,7 @@
sodipodi:role="line"
id="tspan2813"
x="68.912621"
y="322.24670"
y="322.2467"
style="font-size:10.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">ghi</tspan></text>
<text
xml:space="preserve"
@ -195,7 +197,7 @@
inkscape:export-ydpi="90.000000"><tspan
sodipodi:role="line"
id="tspan2817"
x="56.452370"
x="56.45237"
y="385.87946"
style="font-size:16.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#4c4c4c;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">7</tspan></text>
<text
@ -211,7 +213,7 @@
sodipodi:role="line"
id="tspan2821"
x="66.483986"
y="385.40820"
y="385.4082"
style="font-size:10.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#080505;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">pqrs</tspan></text>
<text
xml:space="preserve"
@ -226,7 +228,7 @@
sodipodi:role="line"
id="tspan2825"
x="193.40056"
y="262.10880"
y="262.1088"
style="font-size:16.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#4c4c4c;fill-opacity:1.0000000;font-family:Bitstream Vera Sans">3</tspan></text>
<text
xml:space="preserve"

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@ -354,6 +354,12 @@ public class ImageLoader {
public static final ImageID DIEZ_DIAL_BUTTON
= new ImageID("DIEZ_DIAL_BUTTON");
/**
* A dial button icon. The icon shown in the CallParticipant panel.
*/
public static final ImageID DIAL_BUTTON
= new ImageID("DIAL_BUTTON");
/**
* The image used, when a contact has no photo specified.
*/

@ -60,6 +60,7 @@ TEXT_UNDERLINED_BUTTON=net/java/sip/communicator/impl/gui/resources/buttons/text
TEXT_BOLD_ROLLOVER_BUTTON=net/java/sip/communicator/impl/gui/resources/buttons/textBoldRollover.png
TEXT_ITALIC_ROLLOVER_BUTTON=net/java/sip/communicator/impl/gui/resources/buttons/textItalicRollover.png
TEXT_UNDERLINED_ROLLOVER_BUTTON=net/java/sip/communicator/impl/gui/resources/buttons/textUnderlinedRollover.png
DIAL_BUTTON=net/java/sip/communicator/impl/gui/resources/buttons/dialButton.png
MSG_TOOLBAR_BUTTON_BG=net/java/sip/communicator/impl/gui/resources/buttons/msgToolbarBg.png
MSG_TOOLBAR_ROLLOVER_BUTTON_BG=net/java/sip/communicator/impl/gui/resources/buttons/msgToolBarRolloverBg.png

Loading…
Cancel
Save