Class IconResizer

  • All Implemented Interfaces:
    java.io.Serializable, javax.accessibility.Accessible, javax.swing.Icon

    public class IconResizer
    extends javax.swing.ImageIcon
    Draws the icon associated with a label with the correct scale.
    Version:
    3.0.0
    Author:
    R.Bacher
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.ImageIcon

        javax.swing.ImageIcon.AccessibleImageIcon
    • Field Summary

      • Fields inherited from class javax.swing.ImageIcon

        component, tracker
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void paintIcon​(java.awt.Component component, java.awt.Graphics graphics, int x, int y)
      Paints the resized icon attached to a JLabel
      • Methods inherited from class javax.swing.ImageIcon

        getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IconResizer

        public IconResizer​(ApplicationResizeManager applicationResizeManager,
                           java.awt.Component referenceComponent)
        Constructor
        Parameters:
        referenceComponent - reference component to be resized
    • Method Detail

      • paintIcon

        public void paintIcon​(java.awt.Component component,
                              java.awt.Graphics graphics,
                              int x,
                              int y)
        Paints the resized icon attached to a JLabel
        Specified by:
        paintIcon in interface javax.swing.Icon
        Overrides:
        paintIcon in class javax.swing.ImageIcon