/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ambienteGrafico.ferramentas;

import algoritmo.EspacoDeBusca;
import ambienteGrafico.componentes.Canvas;
import auxiliar.Conversor;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.event.MouseEvent;

/**
 *
 * @author Marília
 */
public class FerramentaNula extends Ferramenta {

    private Cursor cursor;
    private Container painel;
    private Canvas painelCanvas;
    
    public FerramentaNula(Container painel) {
        this.cursor = new Cursor(Cursor.DEFAULT_CURSOR);
        this.painel = painel;
    }
   
    public Container getPainel() {
        return painel;
    }
    
    public void setPainel(Container painel) {
            this.painel = painel;
    }
    
    public Cursor getCursor() {
        return cursor;
    }
    
    @Override
    public void mousePressed(MouseEvent e) {
    }

    @Override
    public void mouseDragged(MouseEvent e) {
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }
    
    public void mouseMoved(MouseEvent e){
        painelCanvas = (Canvas) e.getSource();
        int posicaoX = e.getX();
        int posicaoY = e.getY();
        int posicaoYInvertida = Math.abs(posicaoY - painelCanvas.getHeight());
        EspacoDeBusca espacoDeBusca = EspacoDeBusca.getInstance();

		double[] posicao = Conversor.converterEscalaCanvasParaEscalaMetro(posicaoX,
                                                                  posicaoYInvertida,
                                                                  painelCanvas.getWidth(),
                                                                  painelCanvas.getHeight(),
                                                                  espacoDeBusca.getLimiteMaxCoordX(),
                                                                  espacoDeBusca.getLimiteMaxCoordY());

        //System.out.println("("+posicaoX+","+posicaoYInvertida+")-("+posicao[0]+","+posicao[1]+")");
    }

}
