Package com.eteks.sweethome3d.swing

Examples of com.eteks.sweethome3d.swing.IconManager.clear()


 
  public void testIconManager()
      throws NoSuchFieldException, IllegalAccessException, InterruptedException, BrokenBarrierException, ClassNotFoundException {
    // Stop iconsLoader of iconManager
    IconManager iconManager = IconManager.getInstance();
    iconManager.clear();
    // Replace icon manager by an executor that controls the start of a task with a barrier
    final CyclicBarrier iconLoadingStartBarrier = new CyclicBarrier(2);
    final ThreadPoolExecutor replacingIconsLoader =
      new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>()) {
        @Override
View Full Code Here


    // Check errorIcon is loaded directly without proxy
    Icon errorIcon = iconManager.getIcon(errorIconContent, HEIGHT, null);
    assertNotSame("Error icon loaded with IconProxy", errorIcon.getClass(), iconProxyClass);

    // For other tests, replace again iconLoader by an executor that let icon loading complete normally
    iconManager.clear();
  }

  /**
   * Test how an icon is loaded by IconManager.
   */
 
View Full Code Here

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.