package voi.ui;
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.net.URL;
import javax.swing.border.*;

/**
This class is used to create Tdf icons. The constructor takes as parameter image, toolTip and edge
**/

public class TdfIcon extends JButton
{
	public TdfIcon ()
	{
		super ();
	}
	
	/**
	This function just creates the TdfIcon taking image, toolTip and edge as aparameter
	**/ 
	public TdfIcon (String image, String toolTip, Border edge)
	{	
		URL imageURL = voi.ui.TdfToolBar.class.getResource (image);
		setToolTipText (toolTip);
		setBorder (edge);
		if (imageURL != null)
		{
			setIcon (new ImageIcon (imageURL));
		}
		else 
		{
			System.err.println ("Resources not found ");
		}	
	}
}
