cpw.mods.fml.client.config

## Class GuiConfigEntries.CategoryEntry

- java.lang.Object
- - cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase
  - - cpw.mods.fml.client.config.GuiConfigEntries.CategoryEntry

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Direct Known Subclasses:
    ForgeGuiFactory.ForgeConfigGui.AddModOverrideEntry, ForgeGuiFactory.ForgeConfigGui.ChunkLoaderEntry, ForgeGuiFactory.ForgeConfigGui.GeneralEntry, ForgeGuiFactory.ForgeConfigGui.ModOverridesEntry
  Enclosing class:
    GuiConfigEntries

      public static class GuiConfigEntries.CategoryEntry
      extends GuiConfigEntries.ListEntryBase

  CategoryEntry Provides an entry that consists of a GuiButton for navigating to the child category GuiConfig screen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GuiButtonExt` | `btnSelectCategory`
    `protected GuiScreen` | `childScreen`

    - ### Fields inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase

      `btnDefault, btnUndoChanges, configElement, defaultHoverChecker, defaultToolTip, drawLabel, isValidValue, mc, name, owningEntryList, owningScreen, toolTip, tooltipHoverChecker, undoHoverChecker, undoToolTip`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GuiConfigEntries.CategoryEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected GuiScreen` | `buildChildScreen()` This method is called in the constructor and is used to set the childScreen field.
    `void` | `drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isSelected)`
    `void` | `drawToolTip(int mouseX, int mouseY)` Handles drawing any tooltips that apply to this entry.
    `boolean` | `enabled()` Is this list entry enabled?
    `java.lang.String` | `getCurrentValue()` Gets the current value of this entry as a String.
    `java.lang.String[]` | `getCurrentValues()` Gets the current values of this list entry as a String[].
    `int` | `getEntryRightBound()` Gets this entry's right-hand x boundary.
    `int` | `getLabelWidth()` Gets this entry's label width.
    `boolean` | `isChanged()` Has the value of this entry changed?
    `boolean` | `isDefault()` Is this entry's value equal to the default value? Generally true should be returned if this entry is not a property or category entry.
    `void` | `keyTyped(char eventChar, int eventKey)` Handles user keystrokes for any GuiTextField objects in this entry.
    `void` | `mouseClicked(int x, int y, int mouseEvent)` Call `GuiTextField.mouseClicked()` for and GuiTextField objects in this entry.
    `boolean` | `mousePressed(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)`
    `void` | `mouseReleased(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)`
    `boolean` | `saveConfigElement()` Handles saving any changes that have been made to this entry back to the underlying object.
    `void` | `setToDefault()` Sets this entry's value to the default value.
    `void` | `undoChanges()` Handles reverting any changes that have occurred to this entry.
    `void` | `updateCursorCounter()` Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.

    - ### Methods inherited from class cpw.mods.fml.client.config.GuiConfigEntries.ListEntryBase

      `getConfigElement, getName, onGuiClosed`

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

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

- - ### Field Detail

    - #### childScreen

          protected GuiScreen childScreen

    - #### btnSelectCategory

          protected final GuiButtonExt btnSelectCategory

  - ### Constructor Detail

    - #### GuiConfigEntries.CategoryEntry

          public GuiConfigEntries.CategoryEntry(GuiConfig owningScreen,
                                        GuiConfigEntries owningEntryList,
                                        IConfigElement configElement)

  - ### Method Detail

    - #### buildChildScreen

          protected GuiScreen buildChildScreen()

      This method is called in the constructor and is used to set the childScreen field.

    - #### drawEntry

          public void drawEntry(int slotIndex,
                       int x,
                       int y,
                       int listWidth,
                       int slotHeight,
                       Tessellator tessellator,
                       int mouseX,
                       int mouseY,
                       boolean isSelected)

      Specified by:
        `drawEntry` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `drawEntry` in class `GuiConfigEntries.ListEntryBase`

    - #### drawToolTip

          public void drawToolTip(int mouseX,
                         int mouseY)

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles drawing any tooltips that apply to this entry. This method is called after all other GUI elements have been drawn to the screen, so it could also be used to draw any GUI element that needs to be drawn after all entries have had drawEntry() called.
      Specified by:
        `drawToolTip` in interface `GuiConfigEntries.IConfigEntry`
      Overrides:
        `drawToolTip` in class `GuiConfigEntries.ListEntryBase`

    - #### mousePressed

          public boolean mousePressed(int index,
                             int x,
                             int y,
                             int mouseEvent,
                             int relativeX,
                             int relativeY)

      Specified by:
        `mousePressed` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `mousePressed` in class `GuiConfigEntries.ListEntryBase`

    - #### mouseReleased

          public void mouseReleased(int index,
                           int x,
                           int y,
                           int mouseEvent,
                           int relativeX,
                           int relativeY)

      Specified by:
        `mouseReleased` in interface `GuiListExtended.IGuiListEntry`
      Overrides:
        `mouseReleased` in class `GuiConfigEntries.ListEntryBase`

    - #### isDefault

          public boolean isDefault()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Is this entry's value equal to the default value? Generally true should be returned if this entry is not a property or category entry.
      Specified by:
        `isDefault` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `isDefault` in class `GuiConfigEntries.ListEntryBase`
      Returns:
        true if this entry's value is equal to this entry's default value.

    - #### setToDefault

          public void setToDefault()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Sets this entry's value to the default value.
      Specified by:
        `setToDefault` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `setToDefault` in class `GuiConfigEntries.ListEntryBase`

    - #### keyTyped

          public void keyTyped(char eventChar,
                      int eventKey)

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles user keystrokes for any GuiTextField objects in this entry. Call `GuiTextField.keyTyped()` for any GuiTextField objects that should receive the input provided.
      Specified by:
        `keyTyped` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `keyTyped` in class `GuiConfigEntries.ListEntryBase`

    - #### updateCursorCounter

          public void updateCursorCounter()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.
      Specified by:
        `updateCursorCounter` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `updateCursorCounter` in class `GuiConfigEntries.ListEntryBase`

    - #### mouseClicked

          public void mouseClicked(int x,
                          int y,
                          int mouseEvent)

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Call `GuiTextField.mouseClicked()` for and GuiTextField objects in this entry.
      Specified by:
        `mouseClicked` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `mouseClicked` in class `GuiConfigEntries.ListEntryBase`

    - #### saveConfigElement

          public boolean saveConfigElement()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles saving any changes that have been made to this entry back to the underlying object. It is a good practice to check isChanged() before performing the save action. This method should return true if the element has changed AND REQUIRES A RESTART.
      Specified by:
        `saveConfigElement` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `saveConfigElement` in class `GuiConfigEntries.ListEntryBase`

    - #### isChanged

          public boolean isChanged()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Has the value of this entry changed?
      Specified by:
        `isChanged` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `isChanged` in class `GuiConfigEntries.ListEntryBase`
      Returns:
        true if changes have been made to this entry's value, false otherwise.

    - #### undoChanges

          public void undoChanges()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Handles reverting any changes that have occurred to this entry.
      Specified by:
        `undoChanges` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `undoChanges` in class `GuiConfigEntries.ListEntryBase`

    - #### enabled

          public boolean enabled()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Is this list entry enabled?
      Specified by:
        `enabled` in interface `GuiConfigEntries.IConfigEntry`
      Overrides:
        `enabled` in class `GuiConfigEntries.ListEntryBase`
      Returns:
        true if this entry's controls should be enabled, false otherwise.

    - #### getLabelWidth

          public int getLabelWidth()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets this entry's label width.
      Specified by:
        `getLabelWidth` in interface `GuiConfigEntries.IConfigEntry`
      Overrides:
        `getLabelWidth` in class `GuiConfigEntries.ListEntryBase`

    - #### getEntryRightBound

          public int getEntryRightBound()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets this entry's right-hand x boundary. This value is used to control where the scroll bar is placed.
      Specified by:
        `getEntryRightBound` in interface `GuiConfigEntries.IConfigEntry`
      Overrides:
        `getEntryRightBound` in class `GuiConfigEntries.ListEntryBase`

    - #### getCurrentValue

          public java.lang.String getCurrentValue()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the current value of this entry as a String.
      Specified by:
        `getCurrentValue` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `getCurrentValue` in class `GuiConfigEntries.ListEntryBase`

    - #### getCurrentValues

          public java.lang.String[] getCurrentValues()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the current values of this list entry as a String[].
      Specified by:
        `getCurrentValues` in interface `GuiConfigEntries.IConfigEntry`
      Specified by:
        `getCurrentValues` in class `GuiConfigEntries.ListEntryBase`