Class HistoryTextField

    • Constructor Detail

      • HistoryTextField

        public HistoryTextField()
        Creates a new history text field.
        Since:
        jEdit 3.2pre5
      • HistoryTextField

        public HistoryTextField​(String name)
        Creates a new history text field.
        Parameters:
        name - The history model name
      • HistoryTextField

        public HistoryTextField​(String name,
                                boolean instantPopups)
        Creates a new history text field.
        Parameters:
        name - The history model name
        instantPopups - If true, selecting a value from the history popup will immediately fire an ActionEvent. If false, the user will have to press 'Enter' first
        Since:
        jEdit 2.2pre5
      • HistoryTextField

        public HistoryTextField​(String name,
                                boolean instantPopups,
                                boolean enterAddsToHistory)
        Creates a new history text field.
        Parameters:
        name - The history model name
        instantPopups - If true, selecting a value from the history popup will immediately fire an ActionEvent. If false, the user will have to press 'Enter' first
        enterAddsToHistory - If true, pressing the Enter key will automatically add the currently entered text to the history.
        Since:
        jEdit 2.6pre5
    • Method Detail

      • setInstantPopups

        public void setInstantPopups​(boolean instantPopups)
        Sets if selecting a value from the popup should immediately fire an ActionEvent.
        Since:
        jEdit 4.0pre3
      • getInstantPopups

        public boolean getInstantPopups()
        Returns if selecting a value from the popup should immediately fire an ActionEvent.
        Since:
        jEdit 4.0pre3
      • setEnterAddsToHistory

        public void setEnterAddsToHistory​(boolean enterAddsToHistory)
        Sets if pressing Enter should automatically add the currently entered text to the history.
        Since:
        jEdit 4.0pre3
      • setEnterAddsToHistory

        public boolean setEnterAddsToHistory()
        Returns if pressing Enter should automatically add the currently entered text to the history.
        Since:
        jEdit 4.0pre3
      • setSelectAllOnFocus

        public void setSelectAllOnFocus​(boolean selectAllOnFocus)
        Sets if all text should be selected when the field gets focus.
        Since:
        jEdit 4.0pre3
      • setSelectAllOnFocus

        public boolean setSelectAllOnFocus()
        Returns if all text should be selected when the field gets focus.
        Since:
        jEdit 4.0pre3
      • getModel

        public HistoryModel getModel()
        Returns the underlying history model.
      • setModel

        public void setModel​(String name)
        Sets the history list model.
        Parameters:
        name - The model name
        Since:
        jEdit 2.3pre3
      • addCurrentToHistory

        public void addCurrentToHistory()
        Adds the currently entered item to the history.
      • isPopupTrigger

        public static boolean isPopupTrigger​(MouseEvent evt)
        Returns if the specified event is the popup trigger event. This implements precisely defined behavior, as opposed to MouseEvent.isPopupTrigger().
        Parameters:
        evt - The event
        Since:
        jEdit 4.3pre7
      • isRightButton

        public static boolean isRightButton​(int modifiers)
        Parameters:
        modifiers - The modifiers flag from a mouse event
        Returns:
        true if the modifier match the right button
        Since:
        jEdit 4.3pre7