Package jisa.gui
Class Button.MenuItemWrapper
- java.lang.Object
-
- jisa.gui.Button.MenuItemWrapper
-
- All Implemented Interfaces:
Button
,SubElement
- Enclosing interface:
- Button
public abstract static class Button.MenuItemWrapper 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 MenuItemWrapper(javafx.scene.control.MenuItem button)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getText()
Returns the text displayed in the button.boolean
isDisabled()
Returns whether the button is disabled (greyed-out and un-clickable).boolean
isVisible()
Returns whether the button is visible or not.void
setDisabled(boolean disabled)
Sets whether the button is disabled or not (greyed-out and un-clickable).void
setOnClick(SRunnable onClick)
Sets what should happen when the button is clicked.void
setText(java.lang.String text)
Changes the text displayed in the button.void
setVisible(boolean visible)
Sets whether the button is visible or not.
-
-
-
Method Detail
-
isDisabled
public boolean isDisabled()
Description copied from interface:Button
Returns whether the button is disabled (greyed-out and un-clickable).- Specified by:
isDisabled
in interfaceButton
- Returns:
- Disabled?
-
setDisabled
public void setDisabled(boolean disabled)
Description copied from interface:Button
Sets whether the button is disabled or not (greyed-out and un-clickable).- Specified by:
setDisabled
in interfaceButton
- Parameters:
disabled
- Disabled?
-
isVisible
public boolean isVisible()
Description copied from interface:Button
Returns whether the button is visible or not.- Specified by:
isVisible
in interfaceButton
- Specified by:
isVisible
in interfaceSubElement
- Returns:
- Visible?
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:Button
Sets whether the button is visible or not.- Specified by:
setVisible
in interfaceButton
- Specified by:
setVisible
in interfaceSubElement
- Parameters:
visible
- Visible?
-
getText
public java.lang.String getText()
Description copied from interface:Button
Returns the text displayed in the button.
-
setText
public void setText(java.lang.String text)
Description copied from interface:Button
Changes the text displayed in the button.
-
setOnClick
public void setOnClick(SRunnable onClick)
Description copied from interface:Button
Sets what should happen when the button is clicked.- Specified by:
setOnClick
in interfaceButton
- Parameters:
onClick
- Lambda
-
-