public static class GuiConfigEntries.StringEntry extends GuiConfigEntries.ListEntryBase
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
beforeValue |
protected GuiTextField |
textFieldValue |
btnDefault, btnUndoChanges, configElement, defaultHoverChecker, defaultToolTip, drawLabel, isValidValue, mc, name, owningEntryList, owningScreen, toolTip, tooltipHoverChecker, undoHoverChecker, undoToolTip
Constructor and Description |
---|
StringEntry(GuiConfig owningScreen,
GuiConfigEntries owningEntryList,
IConfigElement configElement) |
Modifier and Type | Method and Description |
---|---|
void |
drawEntry(int slotIndex,
int x,
int y,
int listWidth,
int slotHeight,
int mouseX,
int mouseY,
boolean isSelected,
float partial) |
java.lang.Object |
getCurrentValue()
Gets the current value of this entry.
|
java.lang.Object[] |
getCurrentValues()
Gets the current values of this list 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(int, int, int) 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. |
drawToolTip, enabled, getConfigElement, getEntryRightBound, getLabelWidth, getName, mousePressed, mouseReleased, onGuiClosed, updatePosition
protected final GuiTextField textFieldValue
protected final java.lang.String beforeValue
public StringEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
drawEntry
in interface GuiListExtended.IGuiListEntry
drawEntry
in class GuiConfigEntries.ListEntryBase
public void keyTyped(char eventChar, int eventKey)
GuiConfigEntries.IConfigEntry
GuiTextField.textboxKeyTyped(char, int)
for any GuiTextField
objects that should receive the input provided.keyTyped
in interface GuiConfigEntries.IConfigEntry
keyTyped
in class GuiConfigEntries.ListEntryBase
public void updateCursorCounter()
GuiConfigEntries.IConfigEntry
GuiTextField.updateCursorCounter()
for any GuiTextField objects in this entry.updateCursorCounter
in interface GuiConfigEntries.IConfigEntry
updateCursorCounter
in class GuiConfigEntries.ListEntryBase
public void mouseClicked(int x, int y, int mouseEvent)
GuiConfigEntries.IConfigEntry
GuiTextField.mouseClicked(int, int, int)
for and GuiTextField objects in this entry.mouseClicked
in interface GuiConfigEntries.IConfigEntry
mouseClicked
in class GuiConfigEntries.ListEntryBase
public boolean isDefault()
GuiConfigEntries.IConfigEntry
isDefault
in interface GuiConfigEntries.IConfigEntry
isDefault
in class GuiConfigEntries.ListEntryBase
public void setToDefault()
GuiConfigEntries.IConfigEntry
setToDefault
in interface GuiConfigEntries.IConfigEntry
setToDefault
in class GuiConfigEntries.ListEntryBase
public boolean isChanged()
GuiConfigEntries.IConfigEntry
isChanged
in interface GuiConfigEntries.IConfigEntry
isChanged
in class GuiConfigEntries.ListEntryBase
public void undoChanges()
GuiConfigEntries.IConfigEntry
undoChanges
in interface GuiConfigEntries.IConfigEntry
undoChanges
in class GuiConfigEntries.ListEntryBase
public boolean saveConfigElement()
GuiConfigEntries.IConfigEntry
saveConfigElement
in interface GuiConfigEntries.IConfigEntry
saveConfigElement
in class GuiConfigEntries.ListEntryBase
public java.lang.Object getCurrentValue()
GuiConfigEntries.IConfigEntry
getCurrentValue
in interface GuiConfigEntries.IConfigEntry
getCurrentValue
in class GuiConfigEntries.ListEntryBase
public java.lang.Object[] getCurrentValues()
GuiConfigEntries.IConfigEntry
getCurrentValues
in interface GuiConfigEntries.IConfigEntry
getCurrentValues
in class GuiConfigEntries.ListEntryBase