Package jisa.gui
Class Button.ButtonWrapper
- java.lang.Object
-
- jisa.gui.Button.ButtonWrapper
-
- All Implemented Interfaces:
Button,SubElement
- Enclosing interface:
- Button
public abstract static class Button.ButtonWrapper extends java.lang.Object implements Button
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.gui.Button
Button.ButtonWrapper, Button.MenuItemWrapper
-
-
Constructor Summary
Constructors Constructor Description ButtonWrapper(javafx.scene.control.Button button)
-
Method Summary
All Methods Instance Methods Concrete 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.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
public boolean isDisabled()
Description copied from interface:ButtonReturns whether the button is disabled (greyed-out and un-clickable).- Specified by:
isDisabledin interfaceButton- Returns:
- Disabled?
-
setDisabled
public void setDisabled(boolean disabled)
Description copied from interface:ButtonSets whether the button is disabled or not (greyed-out and un-clickable).- Specified by:
setDisabledin interfaceButton- Parameters:
disabled- Disabled?
-
isVisible
public boolean isVisible()
Description copied from interface:ButtonReturns whether the button is visible or not.- Specified by:
isVisiblein interfaceButton- Specified by:
isVisiblein interfaceSubElement- Returns:
- Visible?
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:ButtonSets whether the button is visible or not.- Specified by:
setVisiblein interfaceButton- Specified by:
setVisiblein interfaceSubElement- Parameters:
visible- Visible?
-
getText
public java.lang.String getText()
Description copied from interface:ButtonReturns the text displayed in the button.
-
setText
public void setText(java.lang.String text)
Description copied from interface:ButtonChanges the text displayed in the button.
-
setOnClick
public void setOnClick(SRunnable onClick)
Description copied from interface:ButtonSets what should happen when the button is clicked.- Specified by:
setOnClickin interfaceButton- Parameters:
onClick- Lambda
-
-