1 19 20 package org.openide.util; 21 22 import java.awt.Cursor ; 23 import javax.swing.JComponent ; 24 import org.netbeans.junit.NbTestCase; 25 26 30 public class UtilitiesProgressCursorTest extends NbTestCase { 31 32 33 public UtilitiesProgressCursorTest(String testName) { 34 super(testName); 35 } 36 37 public void testProgressCursor () { 38 JComponent testTc = new ProgressCursorComp(); 39 Cursor progressCursor = Utilities.createProgressCursor(testTc); 40 testTc.setCursor(progressCursor); 41 Cursor compCursor = testTc.getCursor(); 43 if (!progressCursor.equals(compCursor)) { 44 fail("Setting of progress cursor don't work: \n" + 45 "Comp cursor: " + compCursor + "\n" + 46 "Progress cursor: " + progressCursor); 47 } 48 } 49 50 52 private static class ProgressCursorComp extends JComponent { 53 54 public String getName () { 55 return "TestProgressCursorComp"; 56 } 57 58 } 59 60 } 61 | Popular Tags |