Class BaseTextField

    • Field Detail

      • m_AnyChangeListeners

        protected Set<ChangeListener> m_AnyChangeListeners
        the listeners for any changes to the text.
    • Constructor Detail

      • BaseTextField

        public BaseTextField()
        Constructs a new TextField. A default model is created, the initial string is null, and the number of columns is set to 0.
      • BaseTextField

        public BaseTextField​(String text)
        Constructs a new TextField initialized with the specified text. A default model is created and the number of columns is 0.
        Parameters:
        text - the text to be displayed, or null
      • BaseTextField

        public BaseTextField​(int columns)
        Constructs a new empty TextField with the specified number of columns. A default model is created and the initial string is set to null.
        Parameters:
        columns - the number of columns to use to calculate the preferred width; if columns is set to zero, the preferred width will be whatever naturally results from the component implementation
      • BaseTextField

        public BaseTextField​(String text,
                             int columns)
        Constructs a new TextField initialized with the specified text and columns. A default model is created.
        Parameters:
        text - the text to be displayed, or null
        columns - the number of columns to use to calculate the preferred width; if columns is set to zero, the preferred width will be whatever naturally results from the component implementation
      • BaseTextField

        public BaseTextField​(Document doc,
                             String text,
                             int columns)
        Constructs a new BaseTextField that uses the given text storage model and the given number of columns. This is the constructor through which the other constructors feed. If the document is null, a default model is created.
        Parameters:
        doc - the text storage to use; if this is null, a default will be provided by calling the createDefaultModel method
        text - the initial string to display, or null
        columns - the number of columns to use to calculate the preferred width >= 0; if columns is set to zero, the preferred width will be whatever naturally results from the component implementation
        Throws:
        IllegalArgumentException - if columns < 0
    • Method Detail

      • initTextField

        protected void initTextField()
        Initializes members.
      • notifyAnyChangeListeners

        protected void notifyAnyChangeListeners()
        Notifies all listeners that some change to the text occurred.