Package jisa.gui

Class Button.MenuItemWrapper

  • All Implemented Interfaces:
    Button, SubElement
    Enclosing interface:
    Button

    public abstract static class Button.MenuItemWrapper
    extends java.lang.Object
    implements Button
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MenuItemWrapper

        public MenuItemWrapper​(javafx.scene.control.MenuItem button)
    • 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 interface Button
        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 interface Button
        Parameters:
        disabled - Disabled?
      • isVisible

        public boolean isVisible()
        Description copied from interface: Button
        Returns whether the button is visible or not.
        Specified by:
        isVisible in interface Button
        Specified by:
        isVisible in interface SubElement
        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 interface Button
        Specified by:
        setVisible in interface SubElement
        Parameters:
        visible - Visible?
      • getText

        public java.lang.String getText()
        Description copied from interface: Button
        Returns the text displayed in the button.
        Specified by:
        getText in interface Button
        Returns:
        Text in button
      • setText

        public void setText​(java.lang.String text)
        Description copied from interface: Button
        Changes the text displayed in the button.
        Specified by:
        setText in interface Button
        Parameters:
        text - New text to display
      • setOnClick

        public void setOnClick​(SRunnable onClick)
        Description copied from interface: Button
        Sets what should happen when the button is clicked.
        Specified by:
        setOnClick in interface Button
        Parameters:
        onClick - Lambda