Class GUIHelper.InputPanelWithTextArea

    • Field Detail

      • m_LabelMessage

        protected JLabel m_LabelMessage
        the label for the message.
      • m_TextArea

        protected BaseTextArea m_TextArea
        the text area.
      • m_History

        protected StringHistory m_History
        the string history to use in the popup.
    • Constructor Detail

      • InputPanelWithTextArea

        public InputPanelWithTextArea​(String msg,
                                      String initial,
                                      int minCols,
                                      int minRows)
        Initializes the panel.
        Parameters:
        msg - the message to display
        initial - the initial value to use for the input value
        minCols - the minimum number of columns in the text box
        minRows - the minimum number of rows in the text box
      • InputPanelWithTextArea

        public InputPanelWithTextArea​(String msg,
                                      String initial,
                                      int minCols,
                                      int minRows,
                                      String icon)
        Initializes the panel.
        Parameters:
        msg - the message to display
        initial - the initial value to use for the input value
        minCols - the minimum number of columns in the text box
        minRows - the minimum number of rows in the text box
        icon - the icon to use, null for none
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • createPopupMenu

        protected JPopupMenu createPopupMenu​(MouseEvent e)
        Creates the right-click popup menu.
        Parameters:
        e - the mouse event that triggered the menu
        Returns:
        the popup menu
      • getTextArea

        public BaseTextArea getTextArea()
        Gives access to the underlying textarea.
        Returns:
        the textarea in use
      • setHistory

        public void setHistory​(StringHistory value)
        Sets the underlying history, null to turn off.
        Parameters:
        value - the history
      • getHistory

        public StringHistory getHistory()
        Returns the underlying history, if any.
        Returns:
        the history
      • applyDimensions

        protected void applyDimensions​(String initial,
                                       int minCols,
                                       int minRows)
        Applies the required dimensions.
        Parameters:
        initial - the initial text
        minCols - the minimum number of columns to use
        minRows - the minimum number of rows to use