Package jltk.gui

Class TextField


  • public class TextField
    extends TextComponent
    In a textfield you can put one single line of text. events: confirmed, selectionChanged, contentChanged
    Version:
    23.05.2022
    Author:
    ms
    • Field Detail

      • fxTextField

        protected javafx.scene.control.TextField fxTextField
    • Constructor Detail

      • TextField

        public TextField​(double pLeft,
                         double pTop,
                         double pWidth,
                         double pHeight)
        Creates an empty text field on the specified postion on the default window.
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the text field
        pHeight - The height of the text field
      • TextField

        public TextField​(double pLeft,
                         double pTop,
                         double pWidth,
                         double pHeight,
                         String pText)
        Creates an text field on the specified postion on the default window.
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the text field
        pHeight - The height of the text field
        pText - The text of the text field
      • TextField

        public TextField​(Window pWindow,
                         double pLeft,
                         double pTop,
                         double pWidth,
                         double pHeight,
                         String pText)
        Creates an text field on the specified postion.
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the text field
        pHeight - The height of the text field
        pWindow - The window, the text field should be placed
        pText - The label of the text field
    • Method Detail

      • setContent

        public void setContent​(String pContent)
        The text field gets a new String as content
        Overrides:
        setContent in class TextComponent
        Parameters:
        pText - The new char for the text component.