Package jltk.gui

Class Button


  • public class Button
    extends Labeled
    The Button class represents a button in a gui. A button can be clicked and you can specify a method which should be invoke, if the button is clicked. events: clicked
    Version:
    17.05.2022
    Author:
    ms
    • Field Detail

      • fxButton

        protected javafx.scene.control.Button fxButton
    • Constructor Detail

      • Button

        public Button​(double pLeft,
                      double pTop,
                      double pWidth,
                      double pHeight,
                      String pText)
        Creates the Button
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the button
        pHeight - The height of the button
        pText - The label of the button
      • Button

        public Button​(Window pWindow,
                      double pLeft,
                      double pTop,
                      double pWidth,
                      double pHeight,
                      String pText)
        Creates the Button
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the button
        pHeight - The height of the button
        pWindow - The window, the button should be placed
        pText - The label of the button
    • Method Detail

      • setOnButtonClicked

        public void setOnButtonClicked​(String pMethodName)
        Set the name of the method, which will be invoked, if the button is clicked.