Package snap.viewx

Class MarkDownView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable, ViewHost

public class MarkDownView extends ChildView
This view class renders mark down.
  • Constructor Details

    • MarkDownView

      public MarkDownView()
      Constructor.
  • Method Details

    • getSourceUrl

      public WebURL getSourceUrl()
      Returns the Source URL.
    • setSourceUrl

      public void setSourceUrl(WebURL sourceUrl)
      Sets the Source URL.
    • setMarkDown

      public void setMarkDown(String markDown)
      Sets MarkDown.
    • isDirectiveSet

      public boolean isDirectiveSet(String aKey)
      Returns the directive value.
    • getDirectiveValue

      public String getDirectiveValue(String aKey)
      Returns the directive value.
    • setDirectiveValue

      public void setDirectiveValue(String aKey, String aValue)
      Sets the directive value.
    • getSelCodeBlockNode

      public MDNode getSelCodeBlockNode()
      Returns the selected code block node.
    • addViewForNode

      protected void addViewForNode(MDNode markNode)
      Adds a view for given node.
    • addViewForSeparatorNode

      protected void addViewForSeparatorNode()
      Adds a separator view.
    • createViewForNode

      protected View createViewForNode(MDNode markNode)
      Creates view for node.
    • createViewForHeaderNode

      protected View createViewForHeaderNode(MDNode headerNode)
      Creates a view for header node.
    • createViewForSeparatorNode

      protected View createViewForSeparatorNode()
      Creates a view for separator node.
    • createViewForTextNode

      protected View createViewForTextNode(MDNode contentNode)
      Creates a view for text node.
    • createViewForLinkNode

      protected View createViewForLinkNode(MDNode linkNode)
      Creates a view for link node.
    • addLinkToLinkView

      protected void addLinkToLinkView(View linkNodeView, String urlAddr)
      Adds a link to link view.
    • handleLinkClick

      protected void handleLinkClick(String urlAddr)
      Called when link is clicked.
    • createViewForImageNode

      protected View createViewForImageNode(MDNode imageNode)
      Creates a view for image node.
    • getUrlForAddress

      protected WebURL getUrlForAddress(String urlAddr)
      Returns a URL for given url address.
    • createViewForListNode

      protected ChildView createViewForListNode(MDNode listNode)
      Creates a view for list node.
    • createViewForListItemNode

      protected ChildView createViewForListItemNode(MDNode listItemNode)
      Creates a view for list item node.
    • createViewForCodeBlockNode

      protected TextArea createViewForCodeBlockNode(MDNode codeNode)
      Creates a view for code block.
    • createViewForRunnableNode

      protected View createViewForRunnableNode(MDNode codeNode)
      Creates a view for Runnable block.
    • createViewForDirectiveNode

      protected View createViewForDirectiveNode(MDNode directiveNode)
      Creates a view for directive.
    • createViewForMixedNode

      protected RowView createViewForMixedNode(MDNode mixedNode)
      Creates a view for mixed node (children are Text, Link, Image or CodeBlock).
    • getPrefWidthImpl

      protected double getPrefWidthImpl(double aH)
      Returns the preferred width.
      Overrides:
      getPrefWidthImpl in class View
    • getPrefHeightImpl

      protected double getPrefHeightImpl(double aW)
      Returns the preferred height.
      Overrides:
      getPrefHeightImpl in class View
    • layoutImpl

      protected void layoutImpl()
      Override to layout children with ColView layout.
      Overrides:
      layoutImpl in class ParentView