Class TextualContentPanel

    • Field Detail

      • m_Component

        protected JComponent m_Component
        the actual component.
    • Constructor Detail

      • TextualContentPanel

        public TextualContentPanel​(JTextComponent comp,
                                   boolean useScrollPane)
        Initializes the panel with the specified textual component.
        Parameters:
        comp - the component to embed
        useScrollPane - whether to use a scroll pane
      • TextualContentPanel

        public TextualContentPanel​(adams.gui.core.BaseTextAreaWithButtons comp,
                                   boolean useScrollPane)
        Initializes the panel with the specified textual component.
        Parameters:
        comp - the component to embed
        useScrollPane - whether to use a scroll pane
      • TextualContentPanel

        public TextualContentPanel​(adams.gui.core.BaseTextPaneWithButtons comp,
                                   boolean useScrollPane)
        Initializes the panel with the specified textual component.
        Parameters:
        comp - the component to embed
        useScrollPane - whether to use a scroll pane
    • Method Detail

      • initGUI

        protected void initGUI​(JComponent comp,
                               boolean useScrollPane)
        Initializes the panel with the specified component.
        Parameters:
        comp - the component to embed
        useScrollPane - whether to use a scroll pane
      • getComponent

        public JComponent getComponent()
        Returns the embedded component.
        Returns:
        the component
      • createFileChooser

        protected adams.gui.chooser.TextFileChooser createFileChooser()
        Creates the filechooser to use.
        Specified by:
        createFileChooser in class AbstractOutputPanelWithPopupMenu<adams.gui.chooser.TextFileChooser>
        Returns:
        the filechooser
      • save

        protected String save​(File file)
        Saves the content to the specified file.
        Specified by:
        save in class AbstractOutputPanelWithPopupMenu<adams.gui.chooser.TextFileChooser>
        Parameters:
        file - the file to save to
        Returns:
        null if successful, otherwise error message
      • supplyText

        public String supplyText()
        Supplies the text.
        Specified by:
        supplyText in interface adams.core.TextSupporter
        Returns:
        the text, null if none available