2
* TestLaTeXDrawCursor.java
7
import java.awt.Graphics2D;
9
import java.awt.Toolkit;
10
import java.awt.image.BufferedImage;
13
import javax.swing.ImageIcon;
15
import junit.framework.TestCase;
17
import org.junit.Test;
20
* This class contains tests the methods of the class <code>TestLaTeXDrawCursor</code>.<br>
22
* This file is part of LaTeXDraw<br>
23
* Copyright (c) 2005-2008 Arnaud BLOUIN<br>
25
* LaTeXDraw is free software; you can redistribute it and/or modify
26
* it under the terms of the GNU General Public License as published by
27
* the Free Software Foundation; either version 2 of the License, or
28
* any later version.<br>
30
* LaTeXDraw is distributed without any warranty; without even the
31
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
32
* PURPOSE. See the GNU General Public License for more details.<br>
36
* @author Arnaud BLOUIN<br>
39
@SuppressWarnings("nls")
40
public class TestLaTeXDrawCursor extends TestCase
44
public void testGetCursor()
47
{//TODO voir pourquoi ca marche pas.
48
// Cursor cursor = LaTeXDrawCursor.getCursor("/res/cursors/RotCWDown.gif", "rotate");//$NON-NLS-1$//$NON-NLS-2$
49
BufferedImage bi = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
50
Graphics2D graphic = (Graphics2D)bi.getGraphics();
52
URL url = getClass().getResource("/res/cursors/RotCWDown.gif");
53
img = new ImageIcon(url);
54
graphic.drawImage(img.getImage(), null, null);
56
assertNotNull(Toolkit.getDefaultToolkit().createCustomCursor(bi,new Point(0,0), "aa"));