Package hec.util

Class TextDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class TextDialog extends JDialog implements ActionListener
See Also:
  • Field Details

    • _parent

      protected Component _parent
    • _textPane

      protected SearchableJEditorPane _textPane
    • _textContainer

      protected TextContainer _textContainer
    • _fileName

      protected String _fileName
    • _configurationManagerHelpString

      protected String _configurationManagerHelpString
    • _menuBar

      protected JMenuBar _menuBar
    • _fileMenu

      protected JMenu _fileMenu
    • _saveItem

      protected JMenuItem _saveItem
    • _saveAsItem

      protected JMenuItem _saveAsItem
    • _saveAsTxtItem

      protected JMenuItem _saveAsTxtItem
    • _insertItem

      protected JMenuItem _insertItem
    • _fontItem

      protected JMenuItem _fontItem
    • _printSetupItem

      protected JMenuItem _printSetupItem
    • _printItem

      protected JMenuItem _printItem
    • _exitItem

      protected JMenuItem _exitItem
    • _findMenuItem

      protected JMenuItem _findMenuItem
    • _findNextMenuItem

      protected JMenuItem _findNextMenuItem
    • _editMode

      protected boolean _editMode
    • _modal

      protected boolean _modal
    • _saved

      protected boolean _saved
    • _savedAs

      protected boolean _savedAs
    • _cmdPanel

      protected ButtonCmdPanel _cmdPanel
    • _saveButton

      protected JButton _saveButton
    • _font

      protected Font _font
    • _saveSet

      protected boolean _saveSet
    • _saveAsSet

      protected boolean _saveAsSet
  • Constructor Details

    • TextDialog

      public TextDialog(JFrame parent, boolean modal)
      Text Dialog - a general dialog to show and edit text Text can be either read from a file or text container
      Parameters:
      parent - JFrame
    • TextDialog

      public TextDialog(JDialog parent, boolean modal)
    • TextDialog

      public TextDialog(Component parent)
    • TextDialog

      public TextDialog(Component parent, String configurationManagerHelpString)
  • Method Details

    • buildMenu

      protected void buildMenu()
    • initialize

      public void initialize(TextContainer textContainer, boolean editMode)
    • initialize

      public void initialize(String fileName, boolean editMode) throws Exception
      Throws:
      Exception
    • setEditMode

      public void setEditMode(boolean editMode)
    • showMenuItems

      public void showMenuItems(boolean save, boolean saveAs, boolean insert, boolean print)
    • buildFrame

      protected void buildFrame()
    • save

      protected void save()
    • saveAs

      protected void saveAs()
    • saved

      public boolean saved()
    • savedAs

      public boolean savedAs()
    • find

      protected void find()
    • findNext

      protected void findNext()
    • saveAsTxt

      protected void saveAsTxt()
    • insertTxtFile

      protected void insertTxtFile()
    • cancel

      protected void cancel()
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • Exit_Action

      protected void Exit_Action()
    • terminate

      protected void terminate()
    • fontDialog

      protected void fontDialog()
    • printSetup

      public void printSetup()
    • print

      public void print()
    • buildHelpSet

      protected void buildHelpSet(String helpOverviewConstant, String ConfigurationManagerHelpString)
    • setHelpSetLabel

      protected void setHelpSetLabel(String helpsetLabel)
      sets the label of the main helpset
    • setHelpSetName

      protected void setHelpSetName(String helpsetName)
      sets the name of the main helpset
    • getHelpSetLabel

      protected String getHelpSetLabel()
      get the label of the main helpset
      Returns:
      HELPSET_NAME
    • getHelpSetName

      protected String getHelpSetName()
      get the name of the main helpset
      Returns:
      HELPSET_NAME
    • getApplicationHelpSetName

      protected String getApplicationHelpSetName()
      return the name of the application help set. This is the name that is passed to Help.findHelpSet(Classloader, helpsetName) Subclasses that want to provide application help should override this method.
      Returns:
      null by default
    • getAppOverviewHelpMenu

      protected JMenuItem getAppOverviewHelpMenu()
      return the JMenuItem that is for Application Overview Help. This is a MenuItem that is added to the Help Menu for Application Overview help.
      Subclasses that want to provide application overview help should override this method.
      Returns:
      null by default
    • getAppOverviewHelpFilename

      protected String getAppOverviewHelpFilename()
      return the name of the file that holds the Application overview help file. This is the name passed to CSH.setHelpIDString(JMenuItem, helpFilename)
      Subclasses that want to provide application overview help should override this method.
      Returns:
      null by default.
    • getHelpMenu

      public JMenu getHelpMenu()
    • addHelpMenu

      public void addHelpMenu(JMenuItem helpMenuItem)