cpw.mods.fml.client.config

## Class GuiConfigEntries.StringEntry

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

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Direct Known Subclasses:
    GuiConfigEntries.DoubleEntry, GuiConfigEntries.IntegerEntry
  Enclosing class:
    GuiConfigEntries

      public static class GuiConfigEntries.StringEntry
      extends GuiConfigEntries.ListEntryBase

  StringEntry Provides a GuiTextField for user input.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `beforeValue`
    `protected GuiTextField` | `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.StringEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement<?> configElement)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isSelected)`
    `java.lang.Object` | `getCurrentValue()` Gets the current value of this entry as a String.
    `java.lang.Object[]` | `getCurrentValues()` Gets the current values of this list entry as a String[].
    `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` | `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

      `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

    - #### textFieldValue

          protected final GuiTextField textFieldValue

    - #### beforeValue

          protected final java.lang.String beforeValue

  - ### Constructor Detail

    - #### GuiConfigEntries.StringEntry

          public GuiConfigEntries.StringEntry(GuiConfig owningScreen,
                                      GuiConfigEntries owningEntryList,
                                      IConfigElement<?> configElement)

  - ### Method Detail

    - #### 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`

    - #### 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`

    - #### 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`

    - #### 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`

    - #### 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`

    - #### getCurrentValue

          public java.lang.Object 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.Object[] 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`