cpw.mods.fml.client.config

## Class GuiConfigEntries.ListEntryBase

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

- All Implemented Interfaces:
    GuiConfigEntries.IConfigEntry, GuiListExtended.IGuiListEntry
  Direct Known Subclasses:
    GuiConfigEntries.ButtonEntry, GuiConfigEntries.CategoryEntry, GuiConfigEntries.StringEntry
  Enclosing class:
    GuiConfigEntries

      public abstract static class GuiConfigEntries.ListEntryBase
      extends java.lang.Object
      implements GuiConfigEntries.IConfigEntry

  ListEntryBase Provides a base entry for others to extend. Handles drawing the prop label (if drawLabel == true) and the Undo/Default buttons.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GuiButtonExt` | `btnDefault`
    `protected GuiButtonExt` | `btnUndoChanges`
    `protected IConfigElement` | `configElement`
    `protected HoverChecker` | `defaultHoverChecker`
    `protected java.util.List` | `defaultToolTip`
    `protected boolean` | `drawLabel`
    `protected boolean` | `isValidValue`
    `protected Minecraft` | `mc`
    `protected java.lang.String` | `name`
    `protected GuiConfigEntries` | `owningEntryList`
    `protected GuiConfig` | `owningScreen`
    `protected java.util.List` | `toolTip`
    `protected HoverChecker` | `tooltipHoverChecker`
    `protected HoverChecker` | `undoHoverChecker`
    `protected java.util.List` | `undoToolTip`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GuiConfigEntries.ListEntryBase(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)`
    `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.
    `abstract java.lang.Object` | `getCurrentValue()` Gets the current value of this entry as a String.
    `abstract java.lang.Object[]` | `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.
    `abstract boolean` | `isChanged()` Has the value of this entry changed?
    `abstract 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.
    `abstract void` | `keyTyped(char eventChar, int eventKey)` Handles user keystrokes for any GuiTextField objects in this entry.
    `abstract 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)`
    `void` | `onGuiClosed()` This method is called when the parent GUI is closed.
    `abstract boolean` | `saveConfigElement()` Handles saving any changes that have been made to this entry back to the underlying object.
    `abstract void` | `setToDefault()` Sets this entry's value to the default value.
    `abstract void` | `undoChanges()` Handles reverting any changes that have occurred to this entry.
    `abstract void` | `updateCursorCounter()` Call `GuiTextField.updateCursorCounter()` for any GuiTextField objects in this entry.

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

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

- - ### Field Detail

    - #### owningScreen

          protected final GuiConfig owningScreen

    - #### owningEntryList

          protected final GuiConfigEntries owningEntryList

    - #### configElement

          protected final IConfigElement configElement

    - #### mc

          protected final Minecraft mc

    - #### name

          protected final java.lang.String name

    - #### btnUndoChanges

          protected final GuiButtonExt btnUndoChanges

    - #### btnDefault

          protected final GuiButtonExt btnDefault

    - #### toolTip

          protected java.util.List toolTip

    - #### undoToolTip

          protected java.util.List undoToolTip

    - #### defaultToolTip

          protected java.util.List defaultToolTip

    - #### isValidValue

          protected boolean isValidValue

    - #### tooltipHoverChecker

          protected HoverChecker tooltipHoverChecker

    - #### undoHoverChecker

          protected HoverChecker undoHoverChecker

    - #### defaultHoverChecker

          protected HoverChecker defaultHoverChecker

    - #### drawLabel

          protected boolean drawLabel

  - ### Constructor Detail

    - #### GuiConfigEntries.ListEntryBase

          public GuiConfigEntries.ListEntryBase(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`

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

    - #### mousePressed

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

      Specified by:
        `mousePressed` in interface `GuiListExtended.IGuiListEntry`

    - #### mouseReleased

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

      Specified by:
        `mouseReleased` in interface `GuiListExtended.IGuiListEntry`

    - #### isDefault

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

    - #### setToDefault

          public abstract void setToDefault()

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

    - #### keyTyped

          public abstract 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`

    - #### updateCursorCounter

          public abstract 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`

    - #### mouseClicked

          public abstract 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`

    - #### isChanged

          public abstract boolean isChanged()

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

    - #### undoChanges

          public abstract 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`

    - #### saveConfigElement

          public abstract 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`

    - #### enabled

          public boolean enabled()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Is this list entry enabled?
      Specified by:
        `enabled` in interface `GuiConfigEntries.IConfigEntry`
      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`

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

    - #### getConfigElement

          public IConfigElement getConfigElement()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the IConfigElement object owned by this entry.
      Specified by:
        `getConfigElement` in interface `GuiConfigEntries.IConfigEntry`
      Returns:

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      Gets the name of the ConfigElement owned by this entry.
      Specified by:
        `getName` in interface `GuiConfigEntries.IConfigEntry`

    - #### getCurrentValue

          public abstract 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`

    - #### getCurrentValues

          public abstract 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`

    - #### onGuiClosed

          public void onGuiClosed()

      Description copied from interface: `GuiConfigEntries.IConfigEntry`
      This method is called when the parent GUI is closed. Most handlers won't need this; it is provided for special cases.
      Specified by:
        `onGuiClosed` in interface `GuiConfigEntries.IConfigEntry`