Package jisa.gui
Interface Field<T>
-
- All Superinterfaces:
SubElement
- All Known Implementing Classes:
DoubleField,StringField,TimeField
public interface Field<T> extends SubElement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voideditValues(java.lang.String... values)Edits the available set of discrete options for this field, if applicable.Tget()Returns the value currently displayed in this input field.java.lang.StringgetText()Returns the text label next to this input field.default TgetValue()Alias for get() for Kotlin property access.booleanisDisabled()Returns whether this field is currently disabled.booleanisVisible()Returns whether this field is visible.default voidloadOtherDefaults(ConfigBlock block)voidremove()Removes this input field from its Fields container.voidset(T value)Sets the value displayed in this input field.voidsetDisabled(boolean disabled)Sets whether this field is disabled.voidsetOnChange(SRunnable onChange)Sets the action to perform when the value of this input field is changed.voidsetText(java.lang.String text)Sets the text label displayed next to this input field.default voidsetValue(T value)Alias for set(T value) for Kotlin property access.voidsetVisible(boolean visible)Sets whether this field should be visible or not.default voidwriteOtherDefaults(ConfigBlock block)
-
-
-
Method Detail
-
set
void set(T value)
Sets the value displayed in this input field.- Parameters:
value- Value to display
-
get
T get()
Returns the value currently displayed in this input field.- Returns:
- Value being displayed
-
getValue
default T getValue()
Alias for get() for Kotlin property access.- Returns:
- Value being displayed
-
setValue
default void setValue(T value)
Alias for set(T value) for Kotlin property access.- Parameters:
value- Value to display
-
setOnChange
void setOnChange(SRunnable onChange)
Sets the action to perform when the value of this input field is changed.- Parameters:
onChange- What to do on change
-
editValues
void editValues(java.lang.String... values)
Edits the available set of discrete options for this field, if applicable.- Parameters:
values- New set of options
-
isDisabled
boolean isDisabled()
Returns whether this field is currently disabled.- Returns:
- Is it disabled
-
setDisabled
void setDisabled(boolean disabled)
Sets whether this field is disabled.- Parameters:
disabled- Should it be disabled?
-
isVisible
boolean isVisible()
Returns whether this field is visible.- Specified by:
isVisiblein interfaceSubElement- Returns:
- Is it visible?
-
setVisible
void setVisible(boolean visible)
Sets whether this field should be visible or not.- Specified by:
setVisiblein interfaceSubElement- Parameters:
visible- Visible?
-
remove
void remove()
Removes this input field from its Fields container.- Specified by:
removein interfaceSubElement
-
getText
java.lang.String getText()
Returns the text label next to this input field.- Returns:
- Text label
-
setText
void setText(java.lang.String text)
Sets the text label displayed next to this input field.- Parameters:
text- Text to display
-
writeOtherDefaults
default void writeOtherDefaults(ConfigBlock block)
-
loadOtherDefaults
default void loadOtherDefaults(ConfigBlock block)
-
-