Package jisa.gui.fields
Class StringField
- java.lang.Object
-
- jisa.gui.fields.StringField
-
- All Implemented Interfaces:
Field<java.lang.String>,SubElement
public abstract class StringField extends java.lang.Object implements Field<java.lang.String>
-
-
Constructor Summary
Constructors Constructor Description StringField(javafx.scene.control.Label label, javafx.scene.control.TextField field)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voideditValues(java.lang.String... values)Edits the available set of discrete options for this field, if applicable.java.lang.Stringget()Returns the value currently displayed in this input field.java.lang.StringgetText()Returns the text label next to this input field.booleanisDisabled()Returns whether this field is currently disabled.booleanisVisible()Returns whether this field is visible.abstract voidremove()Removes this input field from its Fields container.voidset(java.lang.String 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.voidsetVisible(boolean visible)Sets whether this field should be visible or not.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jisa.gui.Field
getValue, loadOtherDefaults, setValue, writeOtherDefaults
-
-
-
-
Method Detail
-
set
public void set(java.lang.String value)
Description copied from interface:FieldSets the value displayed in this input field.
-
get
public java.lang.String get()
Description copied from interface:FieldReturns the value currently displayed in this input field.
-
setOnChange
public void setOnChange(SRunnable onChange)
Description copied from interface:FieldSets the action to perform when the value of this input field is changed.- Specified by:
setOnChangein interfaceField<java.lang.String>- Parameters:
onChange- What to do on change
-
editValues
public void editValues(java.lang.String... values)
Description copied from interface:FieldEdits the available set of discrete options for this field, if applicable.- Specified by:
editValuesin interfaceField<java.lang.String>- Parameters:
values- New set of options
-
isDisabled
public boolean isDisabled()
Description copied from interface:FieldReturns whether this field is currently disabled.- Specified by:
isDisabledin interfaceField<java.lang.String>- Returns:
- Is it disabled
-
isVisible
public boolean isVisible()
Description copied from interface:FieldReturns whether this field is visible.- Specified by:
isVisiblein interfaceField<java.lang.String>- Specified by:
isVisiblein interfaceSubElement- Returns:
- Is it visible?
-
remove
public abstract void remove()
Description copied from interface:FieldRemoves this input field from its Fields container.- Specified by:
removein interfaceField<java.lang.String>- Specified by:
removein interfaceSubElement
-
getText
public java.lang.String getText()
Description copied from interface:FieldReturns the text label next to this input field.
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:FieldSets whether this field should be visible or not.- Specified by:
setVisiblein interfaceField<java.lang.String>- Specified by:
setVisiblein interfaceSubElement- Parameters:
visible- Visible?
-
setText
public void setText(java.lang.String text)
Description copied from interface:FieldSets the text label displayed next to this input field.
-
setDisabled
public void setDisabled(boolean disabled)
Description copied from interface:FieldSets whether this field is disabled.- Specified by:
setDisabledin interfaceField<java.lang.String>- Parameters:
disabled- Should it be disabled?
-
-