Class BaseTextPaneWithWordWrap

    • Field Detail

      • m_TextPane

        protected BaseTextPane m_TextPane
        the wrapped text pane.
      • m_PanelWrapper

        protected JPanel m_PanelWrapper
        the wrapper panel.
      • m_ScrollPane

        protected BaseScrollPane m_ScrollPane
        the scroll pane.
      • m_WordWrap

        protected boolean m_WordWrap
        whether wordwrap is on.
    • Constructor Detail

      • BaseTextPaneWithWordWrap

        public BaseTextPaneWithWordWrap()
    • Method Detail

      • initialize

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

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class BasePanel
      • setText

        public void setText​(String value)
        Sets the text to display.
        Specified by:
        setText in interface TextPaneComponent
        Parameters:
        value - the text
      • setEditable

        public void setEditable​(boolean value)
        Sets whether the text pane is editable or not.
        Specified by:
        setEditable in interface TextPaneComponent
        Parameters:
        value - if true the text pane is editable
      • isEditable

        public boolean isEditable()
        Returns whether the text pane is editable or not.
        Specified by:
        isEditable in interface TextPaneComponent
        Returns:
        true if the text pane is editable
      • setWordWrap

        public void setWordWrap​(boolean value)
        Sets the wordwrap state.
        Parameters:
        value - true if to turn wordwrap on
      • getWordWrap

        public boolean getWordWrap()
        Returns whether wordwrap is on.
        Returns:
        true if wordwrap is on
      • append

        public void append​(String text)
        Appends the text at the end.
        Parameters:
        text - the text to append
      • append

        public void append​(String text,
                           AttributeSet a)
        Appends the text at the end.
        Parameters:
        text - the text to append
        a - the attribute set, null if to use current
      • setCaretPosition

        public void setCaretPosition​(int value)
        Sets the position of the cursor.
        Specified by:
        setCaretPosition in interface TextPaneComponent
        Parameters:
        value - the position
      • getCaretPosition

        public int getCaretPosition()
        Returns the current position of the cursor.
        Specified by:
        getCaretPosition in interface TextPaneComponent
        Returns:
        the cursor position