Class ClipboardHistory

    • Method Detail

      • add

        public void add​(String str)
        Adds an entry to the clipboard history.
        Parameters:
        str - The text to add.
        See Also:
        getHistory()
      • get

        public static final ClipboardHistory get()
        Returns the singleton instance of this class, lazily creating it if necessary.

        This method should only be called on the EDT.

        Returns:
        The singleton instance of this class.
      • getHistory

        public List<String> getHistory()
        Returns the clipboard history, in most-recently-used order.
        Returns:
        The clipboard history.
      • getMaxSize

        public int getMaxSize()
        Returns the maximum number of clipboard values remembered.
        Returns:
        The maximum number of clipboard values remembered.
        See Also:
        setMaxSize(int)
      • setMaxSize

        public void setMaxSize​(int maxSize)
        Sets the maximum number of clipboard values remembered.
        Parameters:
        maxSize - The maximum number of clipboard values to remember.
        Throws:
        IllegalArgumentException - If maxSize is not greater than zero.
        See Also:
        getMaxSize()