Package jisa.gui
Interface Button
-
- All Superinterfaces:
SubElement
- All Known Implementing Classes:
Button.ButtonWrapper,Button.MenuItemWrapper
public interface Button extends SubElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classButton.ButtonWrapperstatic classButton.MenuItemWrapper
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetText()Returns the text displayed in the button.booleanisDisabled()Returns whether the button is disabled (greyed-out and un-clickable).booleanisVisible()Returns whether the button is visible or not.voidremove()Removes the button from the GUI.voidsetDisabled(boolean disabled)Sets whether the button is disabled or not (greyed-out and un-clickable).voidsetOnClick(SRunnable onClick)Sets what should happen when the button is clicked.voidsetText(java.lang.String text)Changes the text displayed in the button.voidsetVisible(boolean visible)Sets whether the button is visible or not.
-
-
-
Method Detail
-
isDisabled
boolean isDisabled()
Returns whether the button is disabled (greyed-out and un-clickable).- Returns:
- Disabled?
-
setDisabled
void setDisabled(boolean disabled)
Sets whether the button is disabled or not (greyed-out and un-clickable).- Parameters:
disabled- Disabled?
-
isVisible
boolean isVisible()
Returns whether the button is visible or not.- Specified by:
isVisiblein interfaceSubElement- Returns:
- Visible?
-
setVisible
void setVisible(boolean visible)
Sets whether the button is visible or not.- Specified by:
setVisiblein interfaceSubElement- Parameters:
visible- Visible?
-
getText
java.lang.String getText()
Returns the text displayed in the button.- Returns:
- Text in button
-
setText
void setText(java.lang.String text)
Changes the text displayed in the button.- Parameters:
text- New text to display
-
setOnClick
void setOnClick(SRunnable onClick)
Sets what should happen when the button is clicked.- Parameters:
onClick- Lambda
-
remove
void remove()
Removes the button from the GUI.- Specified by:
removein interfaceSubElement
-
-