Package voxo.client.listeners

Source Code of voxo.client.listeners.ButtonAskForChat

/**
*
*/
package voxo.client.listeners;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

import voxo.client.actions.RequestVoiceAction;
import voxo.client.controllers.ClientController;
import voxo.client.views.MainView;
import voxo.client.views.components.CustomContact;
import voxo.client.views.components.CustomWait;
import voxo.common.packets.VoiceConnexionPacket;

/**
* @author Thierry
*
*/
public class ButtonAskForChat implements ActionListener {

  ClientController    c;
  private CustomContact  cc;

  public ButtonAskForChat(ClientController c, CustomContact cc) {
    this.c = c;
    this.cc = cc;
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {

    VoiceConnexionPacket p = new VoiceConnexionPacket(c.getMe().getUsername(), c.getMe().getIp(), cc.getU().getUsername());
    new RequestVoiceAction(c, cc.getU().getIp(), p);
    cc.getCust().setVisible(true);
    cc.swapChat(true);
    cc.getPhoneCall().setBackground(Color.RED);

  }

}
TOP

Related Classes of voxo.client.listeners.ButtonAskForChat

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.