cpw.mods.fml.client.config

## Class DummyConfigElement<T>

- java.lang.Object
- - cpw.mods.fml.client.config.DummyConfigElement<T>

- All Implemented Interfaces:
    IConfigElement<T>
  Direct Known Subclasses:
    DummyConfigElement.DummyCategoryElement, DummyConfigElement.DummyListElement

      public class DummyConfigElement<T>
      extends java.lang.Object
      implements IConfigElement<T>

  This class's main purpose is to provide the necessary objects for a sample Config GUI for FML, although there may be practical uses for the objects defined here such as using the DummyCategoryElement object as a wrapper for a custom IGuiConfigListEntry object that opens a special screen.

- - ### Property Summary

    Properties
    Type | Property and Description
    --- | ---
    `boolean` | `is` [Property, Category] Is this object a property object?

  - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DummyConfigElement.DummyCategoryElement<T>` This class provides a Dummy Category IConfigElement.
    `static class` | `DummyConfigElement.DummyListElement<T>` This class provides a dummy array-type IConfigElement.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry>` | `arrayEntryClass`
    `protected java.util.List<IConfigElement>` | `childElements`
    `protected java.lang.Class<? extends GuiConfigEntries.IConfigEntry>` | `configEntryClass`
    `protected java.lang.Object` | `defaultValue`
    `protected T[]` | `defaultValues`
    `protected boolean` | `isList`
    `protected boolean` | `isListFixedLength`
    `protected boolean` | `isProperty`
    `protected java.lang.String` | `langKey`
    `protected int` | `maxListLength`
    `protected T` | `maxValue`
    `protected T` | `minValue`
    `protected java.lang.String` | `name`
    `protected boolean` | `requiresMcRestart`
    `protected boolean` | `requiresWorldRestart`
    `protected ConfigGuiType` | `type`
    `protected java.util.regex.Pattern` | `validStringPattern`
    `protected java.lang.String[]` | `validValues`
    `protected java.lang.Object` | `value`
    `protected T[]` | `values`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DummyConfigElement(java.lang.String name, T defaultValue, ConfigGuiType type, java.lang.String langKey)`
    `DummyConfigElement(java.lang.String name, T defaultValue, ConfigGuiType type, java.lang.String langKey, java.util.regex.Pattern validStringPattern)`
    `DummyConfigElement(java.lang.String name, T defaultValue, ConfigGuiType type, java.lang.String langKey, java.lang.String[] validValues)`
    `DummyConfigElement(java.lang.String name, T defaultValue, ConfigGuiType type, java.lang.String langKey, java.lang.String[] validValues, java.util.regex.Pattern validStringPattern, T minValue, T maxValue)`
    `DummyConfigElement(java.lang.String name, T defaultValue, ConfigGuiType type, java.lang.String langKey, T minValue, T maxValue)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `get()` [Property] Gets this property value.
    `java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry>` | `getArrayEntryClass()` This method returns a class that implements `IArrayEntry`.
    `java.util.List<IConfigElement>` | `getChildElements()` [Category] Gets this category's child categories/properties.
    `java.lang.String` | `getComment()` [Property, Category] Gets the comment for this object.
    `java.lang.Class<? extends GuiConfigEntries.IConfigEntry>` | `getConfigEntryClass()` This method returns a class that implements `IConfigEntry` or null.
    `java.lang.Object` | `getDefault()` [Property] Gets this property's default value.
    `T[]` | `getDefaults()` [Property] Gets this property's default values.
    `java.lang.String` | `getLanguageKey()` [Property, Category] Gets a language key for localization of config GUI entry names.
    `T[]` | `getList()` [Property] Gets this property value as a list.
    `int` | `getMaxListLength()` [Property] Gets the max length of this list property, or -1 if the length is unlimited.
    `T` | `getMaxValue()` [Property] Gets this property's maximum value.
    `T` | `getMinValue()` [Property] Gets this property's minimum value.
    `java.lang.String` | `getName()` [Property, Category] Gets the name of this object.
    `java.lang.String` | `getQualifiedName()` [Category] Gets the qualified name of this object.
    `ConfigGuiType` | `getType()` [Property, Category] Gets the ConfigGuiType value corresponding to the type of this property object, or CONFIG_CATEGORY if this is a category object.
    `java.util.regex.Pattern` | `getValidationPattern()` [Property] Gets a Pattern object used in String property input validation.
    `java.lang.String[]` | `getValidValues()` [Property] Gets a String array of valid values for this property.
    `boolean` | `isDefault()` [Property] Is this property value equal to the default value?
    `boolean` | `isList()` [Property] Is this property object a list?
    `boolean` | `isListLengthFixed()` [Property] Does this list property have to remain a fixed length?
    `boolean` | `isProperty()` [Property, Category] Is this object a property object?
    `boolean` | `requiresMcRestart()` [Property, Category] Whether or not this element requires Minecraft to be restarted when changed.
    `boolean` | `requiresWorldRestart()` [Property, Category] Whether or not this element is safe to modify while a world is running.
    `void` | `set(T value)` [Property] Sets this property's value.
    `void` | `set(T[] aVal)` [Property] Sets this property's value to the specified array.
    `IConfigElement` | `setArrayEntryClass(java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> clazz)`
    `IConfigElement` | `setConfigEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)`
    `DummyConfigElement` | `setCustomListEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)`
    `IConfigElement<T>` | `setRequiresMcRestart(boolean requiresMcRestart)`
    `IConfigElement<T>` | `setRequiresWorldRestart(boolean requiresWorldRestart)`
    `void` | `setToDefault()` [Property] Sets this property's value to the default value.
    `boolean` | `showInGui()` [Property, Category] Whether or not this element should be allowed to show on config GUIs.

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

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

- - ### Property Detail

    - #### is

      Specified by:
        `isProperty` in interface `IConfigElement<T>`

  - ### Field Detail

    - #### isProperty

          protected boolean isProperty

    - #### isList

          protected boolean isList

    - #### type

          protected ConfigGuiType type

    - #### name

          protected java.lang.String name

    - #### langKey

          protected java.lang.String langKey

    - #### value

          protected java.lang.Object value

    - #### defaultValue

          protected java.lang.Object defaultValue

    - #### values

          protected T[] values

    - #### defaultValues

          protected T[] defaultValues

    - #### validValues

          protected java.lang.String[] validValues

    - #### validStringPattern

          protected java.util.regex.Pattern validStringPattern

    - #### minValue

          protected T minValue

    - #### maxValue

          protected T maxValue

    - #### requiresWorldRestart

          protected boolean requiresWorldRestart

    - #### requiresMcRestart

          protected boolean requiresMcRestart

    - #### isListFixedLength

          protected boolean isListFixedLength

    - #### maxListLength

          protected int maxListLength

    - #### childElements

          protected java.util.List<IConfigElement> childElements

    - #### configEntryClass

          protected java.lang.Class<? extends GuiConfigEntries.IConfigEntry> configEntryClass

    - #### arrayEntryClass

          protected java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> arrayEntryClass

  - ### Constructor Detail

    - #### DummyConfigElement

          public DummyConfigElement(java.lang.String name,
                            T defaultValue,
                            ConfigGuiType type,
                            java.lang.String langKey,
                            java.lang.String[] validValues,
                            java.util.regex.Pattern validStringPattern,
                            T minValue,
                            T maxValue)

    - #### DummyConfigElement

          public DummyConfigElement(java.lang.String name,
                            T defaultValue,
                            ConfigGuiType type,
                            java.lang.String langKey,
                            java.util.regex.Pattern validStringPattern)

    - #### DummyConfigElement

          public DummyConfigElement(java.lang.String name,
                            T defaultValue,
                            ConfigGuiType type,
                            java.lang.String langKey,
                            java.lang.String[] validValues)

    - #### DummyConfigElement

          public DummyConfigElement(java.lang.String name,
                            T defaultValue,
                            ConfigGuiType type,
                            java.lang.String langKey)

    - #### DummyConfigElement

          public DummyConfigElement(java.lang.String name,
                            T defaultValue,
                            ConfigGuiType type,
                            java.lang.String langKey,
                            T minValue,
                            T maxValue)

  - ### Method Detail

    - #### setCustomListEntryClass

          public DummyConfigElement setCustomListEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)

    - #### isProperty

          public boolean isProperty()

      Description copied from interface: `IConfigElement`
      [Property, Category] Is this object a property object?
      Specified by:
        `isProperty` in interface `IConfigElement<T>`

    - #### setConfigEntryClass

          public IConfigElement setConfigEntryClass(java.lang.Class<? extends GuiConfigEntries.IConfigEntry> clazz)

    - #### getConfigEntryClass

          public java.lang.Class<? extends GuiConfigEntries.IConfigEntry> getConfigEntryClass()

      Description copied from interface: `IConfigElement`
      This method returns a class that implements `IConfigEntry` or null. This class MUST provide a constructor with the following parameter types: `GuiConfig`, `GuiConfigEntries`, `IConfigElement`
      Specified by:
        `getConfigEntryClass` in interface `IConfigElement<T>`

    - #### setArrayEntryClass

          public IConfigElement setArrayEntryClass(java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> clazz)

    - #### getArrayEntryClass

          public java.lang.Class<? extends GuiEditArrayEntries.IArrayEntry> getArrayEntryClass()

      Description copied from interface: `IConfigElement`
      This method returns a class that implements `IArrayEntry`. This class MUST provide a constructor with the following parameter types: `GuiEditArray`, `GuiEditArrayEntries`, `IConfigElement`, `Object`
      Specified by:
        `getArrayEntryClass` in interface `IConfigElement<T>`

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `IConfigElement`
      [Property, Category] Gets the name of this object.
      Specified by:
        `getName` in interface `IConfigElement<T>`

    - #### getQualifiedName

          public java.lang.String getQualifiedName()

      Description copied from interface: `IConfigElement`
      [Category] Gets the qualified name of this object. This is typically only used for category objects.
      Specified by:
        `getQualifiedName` in interface `IConfigElement<T>`

    - #### getLanguageKey

          public java.lang.String getLanguageKey()

      Description copied from interface: `IConfigElement`
      [Property, Category] Gets a language key for localization of config GUI entry names. If the same key is specified with .tooltip appended to the end, that key will return a localized tooltip when the mouse hovers over the property label/category button.
      Specified by:
        `getLanguageKey` in interface `IConfigElement<T>`

    - #### getComment

          public java.lang.String getComment()

      Description copied from interface: `IConfigElement`
      [Property, Category] Gets the comment for this object. Used for the tooltip if getLanguageKey() + ".tooltip" is not defined in the .lang file.
      Specified by:
        `getComment` in interface `IConfigElement<T>`

    - #### getChildElements

          public java.util.List<IConfigElement> getChildElements()

      Description copied from interface: `IConfigElement`
      [Category] Gets this category's child categories/properties.
      Specified by:
        `getChildElements` in interface `IConfigElement<T>`

    - #### getType

          public ConfigGuiType getType()

      Description copied from interface: `IConfigElement`
      [Property, Category] Gets the ConfigGuiType value corresponding to the type of this property object, or CONFIG_CATEGORY if this is a category object.
      Specified by:
        `getType` in interface `IConfigElement<T>`

    - #### isList

          public boolean isList()

      Description copied from interface: `IConfigElement`
      [Property] Is this property object a list?
      Specified by:
        `isList` in interface `IConfigElement<T>`

    - #### isListLengthFixed

          public boolean isListLengthFixed()

      Description copied from interface: `IConfigElement`
      [Property] Does this list property have to remain a fixed length?
      Specified by:
        `isListLengthFixed` in interface `IConfigElement<T>`

    - #### getMaxListLength

          public int getMaxListLength()

      Description copied from interface: `IConfigElement`
      [Property] Gets the max length of this list property, or -1 if the length is unlimited.
      Specified by:
        `getMaxListLength` in interface `IConfigElement<T>`

    - #### isDefault

          public boolean isDefault()

      Description copied from interface: `IConfigElement`
      [Property] Is this property value equal to the default value?
      Specified by:
        `isDefault` in interface `IConfigElement<T>`

    - #### getDefault

          public java.lang.Object getDefault()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property's default value. If this element is an array, this method should return a String representation of that array using Arrays.toString()
      Specified by:
        `getDefault` in interface `IConfigElement<T>`

    - #### getDefaults

          public T[] getDefaults()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property's default values.
      Specified by:
        `getDefaults` in interface `IConfigElement<T>`

    - #### setToDefault

          public void setToDefault()

      Description copied from interface: `IConfigElement`
      [Property] Sets this property's value to the default value.
      Specified by:
        `setToDefault` in interface `IConfigElement<T>`

    - #### setRequiresWorldRestart

          public IConfigElement<T> setRequiresWorldRestart(boolean requiresWorldRestart)

    - #### requiresWorldRestart

          public boolean requiresWorldRestart()

      Description copied from interface: `IConfigElement`
      [Property, Category] Whether or not this element is safe to modify while a world is running. For Categories return false if ANY properties in the category are modifiable while a world is running, true if all are not.
      Specified by:
        `requiresWorldRestart` in interface `IConfigElement<T>`

    - #### showInGui

          public boolean showInGui()

      Description copied from interface: `IConfigElement`
      [Property, Category] Whether or not this element should be allowed to show on config GUIs.
      Specified by:
        `showInGui` in interface `IConfigElement<T>`

    - #### setRequiresMcRestart

          public IConfigElement<T> setRequiresMcRestart(boolean requiresMcRestart)

    - #### requiresMcRestart

          public boolean requiresMcRestart()

      Description copied from interface: `IConfigElement`
      [Property, Category] Whether or not this element requires Minecraft to be restarted when changed.
      Specified by:
        `requiresMcRestart` in interface `IConfigElement<T>`

    - #### getValidValues

          public java.lang.String[] getValidValues()

      Description copied from interface: `IConfigElement`
      [Property] Gets a String array of valid values for this property. This is generally used for String properties to allow the user to select a value from a list of valid values.
      Specified by:
        `getValidValues` in interface `IConfigElement<T>`

    - #### getValidationPattern

          public java.util.regex.Pattern getValidationPattern()

      Description copied from interface: `IConfigElement`
      [Property] Gets a Pattern object used in String property input validation.
      Specified by:
        `getValidationPattern` in interface `IConfigElement<T>`

    - #### get

          public java.lang.Object get()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property value.
      Specified by:
        `get` in interface `IConfigElement<T>`

    - #### getList

          public T[] getList()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property value as a list. Generally you should be sure of whether the property is a list before calling this.
      Specified by:
        `getList` in interface `IConfigElement<T>`

    - #### set

          public void set(T value)

      Description copied from interface: `IConfigElement`
      [Property] Sets this property's value.
      Specified by:
        `set` in interface `IConfigElement<T>`

    - #### set

          public void set(T[] aVal)

      Description copied from interface: `IConfigElement`
      [Property] Sets this property's value to the specified array.
      Specified by:
        `set` in interface `IConfigElement<T>`

    - #### getMinValue

          public T getMinValue()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property's minimum value.
      Specified by:
        `getMinValue` in interface `IConfigElement<T>`

    - #### getMaxValue

          public T getMaxValue()

      Description copied from interface: `IConfigElement`
      [Property] Gets this property's maximum value.
      Specified by:
        `getMaxValue` in interface `IConfigElement<T>`