cpw.mods.fml.client.config

## Class GuiConfigEntries.IntegerEntry

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

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Enclosing class:
    GuiConfigEntries

      public static class GuiConfigEntries.IntegerEntry
      extends GuiConfigEntries.StringEntry

  IntegerEntry Provides a GuiTextField for user input. Input is restricted to ensure the value can be parsed using Integer.parseInteger().

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `beforeValue`

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

      `textFieldValue`

    - ### 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.IntegerEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isChanged()` Has the value of this entry changed?
    `void` | `keyTyped(char eventChar, int eventKey)` Handles user keystrokes for any GuiTextField objects in this entry.
    `boolean` | `saveConfigElement()` Handles saving any changes that have been made to this entry back to the underlying object.
    `void` | `undoChanges()` Handles reverting any changes that have occurred to this entry.

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

      `drawEntry, getCurrentValue, getCurrentValues, isDefault, mouseClicked, setToDefault, updateCursorCounter`

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

      `drawToolTip, enabled, getConfigElement, getEntryRightBound, getLabelWidth, getName, mousePressed, mouseReleased, onGuiClosed`

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

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

- - ### Field Detail

    - #### beforeValue

          protected final int beforeValue

  - ### Constructor Detail

    - #### GuiConfigEntries.IntegerEntry

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

  - ### Method Detail

    - #### 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`
      Overrides:
        `keyTyped` in class `GuiConfigEntries.StringEntry`

    - #### isChanged

          public boolean isChanged()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Has the value of this entry changed?
      Specified by:
        `isChanged` in interface `GuiConfigEntries.IConfigEntry`
      Overrides:
        `isChanged` in class `GuiConfigEntries.StringEntry`
      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`
      Overrides:
        `undoChanges` in class `GuiConfigEntries.StringEntry`

    - #### 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`
      Overrides:
        `saveConfigElement` in class `GuiConfigEntries.StringEntry`