IconGroup
Date: 2017-02-11

org.fife.ui.rtextarea

## Class IconGroup

- java.lang.Object
- - org.fife.ui.rtextarea.IconGroup

-     public class IconGroup
      extends java.lang.Object

  This class encapsulates the location, properties, etc. of an icon set used for an instance of `RTextArea`. If the location of the icon group is invalid in any way, any attempt to retrieve icons from an icon group will return `null`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IconGroup(java.lang.String name, java.lang.String path)` Creates an icon set without "large versions" of the icons.
    `IconGroup(java.lang.String name, java.lang.String path, java.lang.String largeIconSubDir)` Constructor.
    `IconGroup(java.lang.String name, java.lang.String path, java.lang.String largeIconSubDir, java.lang.String extension)` Constructor.
    `IconGroup(java.lang.String name, java.lang.String path, java.lang.String largeIconSubDir, java.lang.String extension, java.lang.String jar)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o2)` Returns whether two icon groups are equal.
    `javax.swing.Icon` | `getIcon(java.lang.String name)` Returns the icon from this icon group with the specified name.
    `javax.swing.Icon` | `getLargeIcon(java.lang.String name)` Returns the large icon from this icon group with the specified name.
    `java.lang.String` | `getName()` Returns the name of this icon group.
    `int` | `hashCode()` Overridden since we also override `equals(Object)`, to honor the invariant that equal objects must have equal hashcodes.
    `boolean` | `hasSeparateLargeIcons()` Returns whether a separate directory for the large icons exists.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IconGroup

          public IconGroup(java.lang.String name,
                   java.lang.String path)

      Creates an icon set without "large versions" of the icons.
      Parameters:
        `name` - The name of the icon group.
        `path` - The directory containing the icon group.

    - #### IconGroup

          public IconGroup(java.lang.String name,
                   java.lang.String path,
                   java.lang.String largeIconSubDir)

      Constructor.
      Parameters:
        `name` - The name of the icon group.
        `path` - The directory containing the icon group.
        `largeIconSubDir` - The subdirectory containing "large versions" of the icons. If no subdirectory exists, pass in `null`.

    - #### IconGroup

          public IconGroup(java.lang.String name,
                   java.lang.String path,
                   java.lang.String largeIconSubDir,
                   java.lang.String extension)

      Constructor.
      Parameters:
        `name` - The name of the icon group.
        `path` - The directory containing the icon group.
        `largeIconSubDir` - The subdirectory containing "large versions" of the icons. If no subdirectory exists, pass in `null`.
        `extension` - The extension of the icons (one of `gif`, `jpg`, or `png`).

    - #### IconGroup

          public IconGroup(java.lang.String name,
                   java.lang.String path,
                   java.lang.String largeIconSubDir,
                   java.lang.String extension,
                   java.lang.String jar)

      Constructor.
      Parameters:
        `name` - The name of the icon group.
        `path` - The directory containing the icon group.
        `largeIconSubDir` - The subdirectory containing "large versions" of the icons. If no subdirectory exists, pass in `null`.
        `extension` - The extension of the icons (one of `gif`, `jpg`, or `png`).
        `jar` - The Jar file containing the icons, or `null` if the icons are on the local file system. If a Jar is specified, the value of `path` must be a path in the Jar file. If this is not a valid Jar file, then no Jar file will be used, meaning all icons returned from this icon group will be `null`.

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object o2)

      Returns whether two icon groups are equal.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `o2` - The object to check against.
      Returns:
        Whether `o2` represents the same icons as this icon group.

    - #### getIcon

          public javax.swing.Icon getIcon(java.lang.String name)

      Returns the icon from this icon group with the specified name.
      Parameters:
        `name` - The name of the icon. For example, if you want the icon specified in `new.gif`, this value should be `new`.
      Returns:
        The icon, or `null` if it could not be found or loaded.
      See Also:
        `getLargeIcon(java.lang.String)`

    - #### getLargeIcon

          public javax.swing.Icon getLargeIcon(java.lang.String name)

      Returns the large icon from this icon group with the specified name. If this icon group does not have large icons, `null` is returned.
      Parameters:
        `name` - The name of the icon. For example, if you want the icon specified in `new.gif`, this value should be `new`.
      Returns:
        The icon, or `null` if it could not be found or loaded.
      See Also:
        `getLargeIcon(java.lang.String)`

    - #### getName

          public java.lang.String getName()

      Returns the name of this icon group.
      Returns:
        This icon group's name.

    - #### hasSeparateLargeIcons

          public boolean hasSeparateLargeIcons()

      Returns whether a separate directory for the large icons exists.
      Returns:
        Whether a directory containing "large versions" ov the icons exists.
      See Also:
        `getLargeIcon(String)`

    - #### hashCode

          public int hashCode()

      Overridden since we also override `equals(Object)`, to honor the invariant that equal objects must have equal hashcodes. This also keeps FindBugs happy.
      Overrides:
        `hashCode` in class `java.lang.Object`