Package org.tomighty.resources.cache

Examples of org.tomighty.resources.cache.Cache.store()


    canvas.fontSize((float) size.height * 0.58f);
    canvas.paintGradient(colors.background());
    canvas.drawBorder(colors.background().darker().darker().darker());
    canvas.drawCentralizedText(time.shortestString());

    cache.store(canvas.image(), iconName);

    return canvas.image();
  }

  private String iconNameFor(Time time) {
View Full Code Here


    Cache cache = caches.of(Images.class);
    String name = getClass().getSimpleName() + "_" + colors.getClass().getSimpleName();
    Image image = cache.get(name);
    if(image == null) {
      paint(canvas, look);
      cache.store(canvas.image(), name);
    } else {
      canvas.paint(image);
    }
  }
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.