Class IconBox.DefaultRenderer

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DefaultRenderer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.Icon getIcon​(IconBox iconBox, java.lang.Object value, int index)
      Returns the icon to be displayed for a given list model element.
      int getIconHeight()  
      int getIconWidth()  
      java.lang.String getToolTipText​(IconBox iconBox, java.lang.Object value, int index)
      Returns the tooltip text to be used for a given list model element.
      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
    • Constructor Detail

      • DefaultRenderer

        private DefaultRenderer()
    • Method Detail

      • getIcon

        public javax.swing.Icon getIcon​(IconBox iconBox,
                                        java.lang.Object value,
                                        int index)
        Description copied from interface: IconBox.CellRenderer
        Returns the icon to be displayed for a given list model element.
        Specified by:
        getIcon in interface IconBox.CellRenderer
        Parameters:
        iconBox - component using this renderer
        value - list model element
        index - index in the entry list being rendered
        Returns:
        icon to paint
      • getToolTipText

        public java.lang.String getToolTipText​(IconBox iconBox,
                                               java.lang.Object value,
                                               int index)
        Description copied from interface: IconBox.CellRenderer
        Returns the tooltip text to be used for a given list model element. Null is OK.
        Specified by:
        getToolTipText in interface IconBox.CellRenderer
        Parameters:
        iconBox - component using this renderer
        value - list model element
        index - index in the entry list being rendered
        Returns:
        tooltip for value
      • getIconWidth

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

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

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