cpw.mods.fml.client.config

## Interface GuiConfigEntries.IConfigEntry<T>

- All Superinterfaces:
    GuiListExtended.IGuiListEntry
  All Known Implementing Classes:
    ForgeGuiFactory.ForgeConfigGui.AddModOverrideEntry, ForgeGuiFactory.ForgeConfigGui.ChunkLoaderEntry, ForgeGuiFactory.ForgeConfigGui.GeneralEntry, ForgeGuiFactory.ForgeConfigGui.ModIDEntry, ForgeGuiFactory.ForgeConfigGui.ModOverridesEntry, GuiConfigEntries.ArrayEntry, GuiConfigEntries.BooleanEntry, GuiConfigEntries.ButtonEntry, GuiConfigEntries.CategoryEntry, GuiConfigEntries.ChatColorEntry, GuiConfigEntries.CycleValueEntry, GuiConfigEntries.DoubleEntry, GuiConfigEntries.IntegerEntry, GuiConfigEntries.ListEntryBase, GuiConfigEntries.SelectValueEntry, GuiConfigEntries.StringEntry
  Enclosing class:
    GuiConfigEntries

      public static interface GuiConfigEntries.IConfigEntry<T>
      extends GuiListExtended.IGuiListEntry

  Provides an interface for defining GuiPropertyList.listEntry objects.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `drawToolTip(int mouseX, int mouseY)` Handles drawing any tooltips that apply to this entry.
    `boolean` | `enabled()` Is this list entry enabled?
    `IConfigElement` | `getConfigElement()` Gets the IConfigElement object owned by this entry.
    `T` | `getCurrentValue()` Gets the current value of this entry as a String.
    `T[]` | `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.
    `java.lang.String` | `getName()` Gets the name of the ConfigElement owned by this entry.
    `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.
    `void` | `onGuiClosed()` This method is called when the parent GUI is closed.
    `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 interface net.minecraft.client.gui.GuiListExtended.IGuiListEntry

      `drawEntry, mousePressed, mouseReleased`

- - ### Method Detail

    - #### getConfigElement

          IConfigElement getConfigElement()

      Gets the IConfigElement object owned by this entry.
      Returns:

    - #### getName

          java.lang.String getName()

      Gets the name of the ConfigElement owned by this entry.

    - #### getCurrentValue

          T getCurrentValue()

      Gets the current value of this entry as a String.

    - #### getCurrentValues

          T[] getCurrentValues()

      Gets the current values of this list entry as a String[].

    - #### enabled

          boolean enabled()

      Is this list entry enabled?
      Returns:
        true if this entry's controls should be enabled, false otherwise.

    - #### keyTyped

          void keyTyped(char eventChar,
                      int eventKey)

      Handles user keystrokes for any GuiTextField objects in this entry. Call `GuiTextField.keyTyped()` for any GuiTextField objects that should receive the input provided.

    - #### updateCursorCounter

          void updateCursorCounter()

      Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.

    - #### mouseClicked

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

      Call `GuiTextField.mouseClicked()` for and GuiTextField objects in this entry.

    - #### isDefault

          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.
      Returns:
        true if this entry's value is equal to this entry's default value.

    - #### setToDefault

          void setToDefault()

      Sets this entry's value to the default value.

    - #### undoChanges

          void undoChanges()

      Handles reverting any changes that have occurred to this entry.

    - #### isChanged

          boolean isChanged()

      Has the value of this entry changed?
      Returns:
        true if changes have been made to this entry's value, false otherwise.

    - #### saveConfigElement

          boolean saveConfigElement()

      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.

    - #### drawToolTip

          void drawToolTip(int mouseX,
                         int mouseY)

      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.

    - #### getLabelWidth

          int getLabelWidth()

      Gets this entry's label width.

    - #### getEntryRightBound

          int getEntryRightBound()

      Gets this entry's right-hand x boundary. This value is used to control where the scroll bar is placed.

    - #### onGuiClosed

          void onGuiClosed()

      This method is called when the parent GUI is closed. Most handlers won't need this; it is provided for special cases.