Class ScaledIcon

java.lang.Object
org.vanted.scaling.resources.ScaledIcon
All Implemented Interfaces:
Icon

public class ScaledIcon
extends Object
implements Icon
Given a regular Icon this would produce a scaled clone of it.

Note: The idea was that resources are only visible to the relevant Scalers, which use them. It would have meant package-protected visibility. This, however, comes firstly in with JAVA 9, due to Project Jigsaw. Until then the modifier is public.

Author:
D. Garkov
  • Constructor Details

    • ScaledIcon

      public ScaledIcon​(Icon oldIcon, float scaleFactor)
      Calling this would initialize an Icon Object clone of the passed oldIcon, but painted in a scaled environment, determined by the scaleFactor. For more information, check out the paintIcon() method.
      Parameters:
      oldIcon - icon to be scaled
      scaleFactor - the respective factor of scaling
  • Method Details