Class SNTEditorPane

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
org.fife.ui.rtextarea.RTextAreaBase
org.fife.ui.rtextarea.RTextArea
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
org.scijava.ui.swing.script.EditorPane
sc.fiji.snt.gui.SNTEditorPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Printable, Serializable, EventListener, Accessible, DocumentListener, Scrollable, org.fife.ui.rsyntaxtextarea.SyntaxConstants

public class SNTEditorPane extends org.scijava.ui.swing.script.EditorPane
Implements minor customizations to EditorPane for usage by SNT.
See Also:
  • Constructor Details

    • SNTEditorPane

      public SNTEditorPane(boolean enableCodingOptions)
  • Method Details

    • setSyntaxStyle

      public void setSyntaxStyle(String scriptLanguage)
      Set the language of this SNTEditorPane.
      Parameters:
      scriptLanguage - the language to set the editors language to.
    • getScrollPane

      public org.fife.ui.rtextarea.RTextScrollPane getScrollPane()
      Gets the scroll pane containing this editor.
      Returns:
      the RTextScrollPane instance
    • appendTimeStamp

      public void appendTimeStamp(String prefix, String suffix)
      Appends a timestamp to the editor content.
      Parameters:
      prefix - the text to appear before the timestamp
      suffix - the text to appear after the timestamp
    • lightDarkToggleButton

      public AbstractButton lightDarkToggleButton()
    • toggleTheme

      protected void toggleTheme()
    • timeStampButton

      public AbstractButton timeStampButton(ActionListener al)
    • optionsButton

      public AbstractButton optionsButton(JPopupMenu optionsMenu)
    • applyTheme

      public void applyTheme(String theme) throws IllegalArgumentException
      Overrides:
      applyTheme in class org.scijava.ui.swing.script.EditorPane
      Throws:
      IllegalArgumentException
    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JTextComponent