Package adams.gui.goe

Class BaseMarkdownEditor

  • All Implemented Interfaces:
    adams.core.HelpProvider, adams.gui.goe.CustomStringRepresentationHandler, adams.gui.goe.InlineEditorSupport, PropertyEditor

    public class BaseMarkdownEditor
    extends adams.gui.goe.AbstractPropertyEditorSupport
    implements adams.gui.goe.CustomStringRepresentationHandler, adams.gui.goe.InlineEditorSupport
    A PropertyEditor for BaseMarkdown objects.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    BaseMarkdown
    • Field Detail

      • m_CheckLineWrap

        protected adams.gui.core.BaseCheckBox m_CheckLineWrap
        The checkbox for the line wrap.
    • Constructor Detail

      • BaseMarkdownEditor

        public BaseMarkdownEditor()
    • Method Detail

      • toCustomStringRepresentation

        public String toCustomStringRepresentation​(Object obj)
        Returns a custom string representation of the object.
        Specified by:
        toCustomStringRepresentation in interface adams.gui.goe.CustomStringRepresentationHandler
        Parameters:
        obj - the object to turn into a string
        Returns:
        the string representation
      • fromCustomStringRepresentation

        public Object fromCustomStringRepresentation​(String str)
        Returns an object created from the custom string representation.
        Specified by:
        fromCustomStringRepresentation in interface adams.gui.goe.CustomStringRepresentationHandler
        Parameters:
        str - the string to turn into an object
        Returns:
        the object
      • createCustomEditor

        protected JComponent createCustomEditor()
        Gets the custom editor component.
        Specified by:
        createCustomEditor in class adams.gui.goe.AbstractPropertyEditorSupport
        Returns:
        the editor
      • initForDisplay

        protected void initForDisplay()
        Initializes the display of the value.
        Overrides:
        initForDisplay in class adams.gui.goe.AbstractPropertyEditorSupport
      • isInlineEditingAvailable

        public boolean isInlineEditingAvailable()
        Checks whether inline editing is available.
        Specified by:
        isInlineEditingAvailable in interface adams.gui.goe.InlineEditorSupport
        Returns:
        always true
      • setInlineValue

        public void setInlineValue​(String value)
        Sets the value to use.
        Specified by:
        setInlineValue in interface adams.gui.goe.InlineEditorSupport
        Parameters:
        value - the value to use
      • getInlineValue

        public String getInlineValue()
        Returns the current value.
        Specified by:
        getInlineValue in interface adams.gui.goe.InlineEditorSupport
        Returns:
        the current value
      • isInlineValueValid

        public boolean isInlineValueValid​(String value)
        Checks whether the value id valid.
        Specified by:
        isInlineValueValid in interface adams.gui.goe.InlineEditorSupport
        Parameters:
        value - the value to check
        Returns:
        always true