Class DoubleIcon

  • All Implemented Interfaces:
    javax.swing.Icon

    @OpenApiAll
    public class DoubleIcon
    extends java.lang.Object
    implements javax.swing.Icon
    Icon for painting two wrapped icons - icon B on top of icon A.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int deltaX  
      private int deltaY  
      private int height  
      protected javax.swing.Icon iconA  
      protected javax.swing.Icon iconB  
      private int width  
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleIcon​(javax.swing.Icon iconA, javax.swing.Icon iconB)
      Constructor
      DoubleIcon​(javax.swing.Icon iconA, javax.swing.Icon iconB, int iconBDeltaX, int iconBDeltaY)
      Constructor
      DoubleIcon​(javax.swing.Icon iconA, javax.swing.Icon iconB, int iconBDeltaX, int iconBDeltaY, int width, int height)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIconHeight()  
      int getIconWidth()  
      void paintIcon​(java.awt.Component c, java.awt.Graphics g, int x, int y)  
      • Methods inherited from class java.lang.Object

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

      • iconA

        protected javax.swing.Icon iconA
      • iconB

        protected javax.swing.Icon iconB
      • deltaX

        private final int deltaX
      • deltaY

        private final int deltaY
      • width

        private final int width
      • height

        private final int height
    • Constructor Detail

      • DoubleIcon

        public DoubleIcon​(javax.swing.Icon iconA,
                          javax.swing.Icon iconB)
        Constructor
        Parameters:
        iconA - icon below
        iconB - icon above
      • DoubleIcon

        public DoubleIcon​(javax.swing.Icon iconA,
                          javax.swing.Icon iconB,
                          int iconBDeltaX,
                          int iconBDeltaY)
        Constructor
        Parameters:
        iconA - icon below
        iconB - icon above
        iconBDeltaX - iconB translation by X
        iconBDeltaY - iconB translation by Y
      • DoubleIcon

        public DoubleIcon​(javax.swing.Icon iconA,
                          javax.swing.Icon iconB,
                          int iconBDeltaX,
                          int iconBDeltaY,
                          int width,
                          int height)
        Constructor. Allows to specify icon width or height
        Parameters:
        iconA - icon below
        iconB - icon above
        iconBDeltaX - iconB translation by X
        iconBDeltaY - iconB translation by Y
        width - icon width
        height - icon height
    • Method Detail

      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        Specified by:
        paintIcon in interface javax.swing.Icon
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface javax.swing.Icon
      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface javax.swing.Icon