Class TextFeaturePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TextFeaturePanel extends JPanel
This is a JPanel that wraps a JTextPane in order to add common features such as a Search Bar and a Goto Line Dialog.
See Also:
  • Field Details

  • Constructor Details

    • TextFeaturePanel

      public TextFeaturePanel(com.fishlib.io.logger.Logger log, String fontKey)
  • Method Details

    • getTextPane

      public JTextPane getTextPane()
    • getUndoManager

      public MergedUndoManager getUndoManager()
    • setTextFont

      public void setTextFont(String fontKey)
    • getTextFont

      public Font getTextFont()
    • setToolBar

      public void setToolBar(JToolBar toolBar)
      Sets the tool bar at the top of the panel.
      Parameters:
      toolBar - the tool bar to set
    • getMenuItems

      public List<JMenuItem> getMenuItems()
    • performSearch

      public void performSearch()
      Performs a search on currently selected text.
    • addKeyBinding

      public void addKeyBinding(KeyStroke keyStroke, KeyBindingActionNames name)
      Adds a key binding for a specific action.
      Parameters:
      keyStroke - the keystroke to bind
      name - the name of the action