Class ClipboardHistoryPopup

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

class ClipboardHistoryPopup extends JWindow
A popup window that displays the most recent snippets added to the clipboard of an RSyntaxTextArea. Selecting one pastes that snippet.
Version:
1.0
  • Field Details

  • Constructor Details

    • ClipboardHistoryPopup

      ClipboardHistoryPopup(Window parent, RTextArea textArea)
      Constructor.
      Parameters:
      parent - The parent window containing textArea.
      textArea - The text area to paste into.
  • Method Details

    • getPreferredSize

      public Dimension getPreferredSize()
      Overridden to ensure this popup stays in a specific size range.
      Overrides:
      getPreferredSize in class Container
    • insertSelectedItem

      private void insertSelectedItem()
      Inserts the selected item into the editor and disposes of this popup.
    • installKeyBindings

      private void installKeyBindings()
      Adds key bindings to this popup.
    • setContents

      public void setContents(List<String> contents)
    • setLocation

      private void setLocation()
      Positions this popup to be in the top right-hand corner of the parent editor.
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class Window
    • updateTextAreaCaret

      private void updateTextAreaCaret(boolean visible)
      (Possibly) toggles the "always visible" state of the text area's caret.
      Parameters:
      visible - Whether this popup window was just made visible (as opposed to hidden).