Class GUIImageLoader


  • public class GUIImageLoader
    extends java.lang.Object
    This class serves as an image-loader and image-cache. Images are often requested during a blackjack-game, and for convenience- as well as performance-purposes these images are loaded and cached by this class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static javax.swing.UIDefaults icons
      The image icons.
    • Constructor Summary

      Constructors 
      Constructor Description
      GUIImageLoader()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getCardIconHeight()
      Get bthe height of the icons.
      static javax.swing.ImageIcon getImage​(java.lang.String card)
      Load the image of the card passed as a parameter
      static void main​(java.lang.String[] args)
      Main for testing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • icons

        public static final javax.swing.UIDefaults icons
        The image icons.
    • Constructor Detail

      • GUIImageLoader

        public GUIImageLoader()
    • Method Detail

      • getImage

        public static javax.swing.ImageIcon getImage​(java.lang.String card)
        Load the image of the card passed as a parameter
        Parameters:
        card - String-representation of the card to load the image for, cardName == fileName
      • main

        public static void main​(java.lang.String[] args)
        Main for testing.
      • getCardIconHeight

        public static int getCardIconHeight()
        Get bthe height of the icons.