Class CloseTabIcon

  • All Implemented Interfaces:
    Icon

    public class CloseTabIcon
    extends Object
    implements Icon
    The class which generates the 'X' icon for the tabs. The constructor accepts an icon which is extra to the 'X' icon, so you can have tabs like in JBuilder. This value is null if no extra icon is required.
    • Constructor Detail

      • CloseTabIcon

        public CloseTabIcon​(boolean mouseOverIcon,
                            boolean mousePressed)
        Creates a new instance of CloseTabIcon
    • Method Detail

      • paintIcon

        public void paintIcon​(Component c,
                              Graphics gorg,
                              int x,
                              int y)
        Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
        Specified by:
        paintIcon in interface Icon
        Parameters:
        c - the component which the icon belongs to
        gorg - the graphic object to draw on
        x - the upper left point of the icon in the x direction
        y - the upper left point of the icon in the y direction
      • getIconWidth

        public int getIconWidth()
        Returns the icon's width.
        Specified by:
        getIconWidth in interface Icon
        Returns:
        an int specifying the fixed width of the icon.
      • getIconHeight

        public int getIconHeight()
        Returns the icon's height.
        Specified by:
        getIconHeight in interface Icon
        Returns:
        an int specifying the fixed height of the icon.