Class CTextPane

    • Constructor Detail

      • CTextPane

        public CTextPane()
        Constructs a new TextPane (HTML)
      • CTextPane

        public CTextPane​(StyledDocument doc)
        Constructs a new JTextPane with the given document
        Parameters:
        doc - the model to use
      • CTextPane

        public CTextPane​(JTextPane textPane)
        Create a JScrollArea with a JTextEditor
        Parameters:
        textPane -
    • Method Detail

      • setMandatory

        public void setMandatory​(boolean mandatory)
        Set Editor Mandatory
        Specified by:
        setMandatory in interface CEditor
        Parameters:
        mandatory - true, if you have to enter data
      • isMandatory

        public boolean isMandatory()
        Is Field mandatory
        Specified by:
        isMandatory in interface CEditor
        Returns:
        true, if mandatory
      • setReadWrite

        public void setReadWrite​(boolean rw)
        Enable Editor
        Specified by:
        setReadWrite in interface CEditor
        Parameters:
        rw - true, if you can enter/select data
      • isReadWrite

        public boolean isReadWrite()
        Is it possible to edit
        Specified by:
        isReadWrite in interface CEditor
        Returns:
        true, if editable
      • setBackground

        public void setBackground​(boolean error)
        Set Background based on editable / mandatory / error
        Specified by:
        setBackground in interface CEditor
        Parameters:
        error - if true, set background to error color, otherwise mandatory/editable
      • setBackground

        public void setBackground​(Color color)
        Set Background
        Overrides:
        setBackground in class JComponent
        Parameters:
        color - color
      • setForeground

        public void setForeground​(Color color)
        Set Foreground
        Overrides:
        setForeground in class JComponent
        Parameters:
        color - color
      • setContentType

        public void setContentType​(String type)
        Set Content Type
        Parameters:
        type - e.g. text/html
      • setValue

        public void setValue​(Object value)
        Set Editor to value
        Specified by:
        setValue in interface CEditor
        Parameters:
        value - value of the editor
      • getValue

        public Object getValue()
        Return Editor value
        Specified by:
        getValue in interface CEditor
        Returns:
        current value
      • getDisplay

        public String getDisplay()
        Return Display Value
        Specified by:
        getDisplay in interface CEditor
        Returns:
        displayed String value
      • setText

        public void setText​(String text)
        Set Text and position top
        Parameters:
        text -
      • getText

        public String getText()
        Get Text
        Returns:
        text
      • setCaretPosition

        public void setCaretPosition​(int pos)
        Set Caret Position
        Parameters:
        pos - pos
      • getCaretPosition

        public int getCaretPosition()
        Get Caret Position
        Returns:
        position
      • setEditable

        public void setEditable​(boolean edit)
        Set Editable
        Parameters:
        edit - editable
      • isEditable

        public boolean isEditable()
        Editable
        Returns:
        true if editable
      • setMargin

        public void setMargin​(Insets m)
        Set Text Margin
        Parameters:
        m - insets
      • setOpaque

        public void setOpaque​(boolean isOpaque)
        Set Opaque
        Overrides:
        setOpaque in class JComponent
        Parameters:
        isOpaque - opaque