## org.eclipse.jst.pagedesigner.converter
Interface ITagConverter

All Known Implementing Classes:
  AbstractTagConverter, DefaultUnknownTagConverter, DumDeepTagConverter, DumDescriptionTagConverter, DumTagConverter, HiddenTagConverter, HiddenTagConverter2, HTMLStringTagConverter, TagConverterToDumBlock, TagConverterToInlineBlock, TagConverterToSpan

    public interface ITagConverter

ITagConverter is used to convert a custom tag to a HTML tag. Each ITagConverter instance will be dedicated to a single custom tag element.

Version:
  1.5

Method Summary
`void` `convertRefresh(java.lang.Object context)` refresh the internal state of this ITagConverter.
`void` `dispose()` API contract needed here
`java.util.List` `getChildModeList()`
`ConvertPosition` `getChildVisualPosition(org.w3c.dom.Node childModel)` For child nodes that need further convert, return their position in the converted DOM tree.
`org.w3c.dom.Element` `getHostElement()`
`java.util.List` `getNonVisualChildren()`
`org.w3c.dom.Element` `getResultElement()`
`Image` `getVisualImage()` if isVisualByHTML() return false, then this method should return an image to be displayed in designer.
`boolean` `isMultiLevel()` When the convert result in multi-level element.
`boolean` `isVisualByHTML()` for some tags, they don't convert to HTML.
`boolean` `isWidget()`
`void` `setDestDocument(IDOMDocument document)` Set the target document where the converted node should belong to.
`void` `setMode(int mode)`

Method Detail

### setDestDocument

    void setDestDocument(IDOMDocument document)

  Set the target document where the converted node should belong to.

  Parameters:
    `document` -

### convertRefresh

    void convertRefresh(java.lang.Object context)

  refresh the internal state of this ITagConverter. This method normally is called when the host element change.

  Parameters:
    `context` -

### getHostElement

    org.w3c.dom.Element getHostElement()

  Returns:
    The host element being converted.

### isVisualByHTML

    boolean isVisualByHTML()

  for some tags, they don't convert to HTML. In that case, this method should return false for them. And if this method return false, then should return an image in `getVisualImage()` for displaying in the designer.

  Returns:
    true if the tag represents something that will be rendered visually at runtime

### getVisualImage

    Image getVisualImage()

  if isVisualByHTML() return false, then this method should return an image to be displayed in designer. Normally this image will be a shared image for those hidden elements. It is this class's responsibility to dispose the image if the image is not a shared one.

  Returns:
    the placeholder image for non-visual tags

### getResultElement

    org.w3c.dom.Element getResultElement()

  Returns:
    the result element after conversion

### getChildModeList

    java.util.List getChildModeList()

  Returns:
    the list of children that should be continuely converted.

### getNonVisualChildren

    java.util.List getNonVisualChildren()

  Returns:
    a list of Element tags that map to non-visual children Type should be always be Element.

### getChildVisualPosition

    ConvertPosition getChildVisualPosition(org.w3c.dom.Node childModel)

  For child nodes that need further convert, return their position in the converted DOM tree.

  Parameters:
    `childModel` -
  Returns:
    the position of child nodes

### isMultiLevel

    boolean isMultiLevel()

  When the convert result in multi-level element. If this method return false, then the caller should not use child nodes of `getHostElement()`

  Returns:
    true if the host element has convertable children

### isWidget

    boolean isWidget()

  Returns:
    true if the host element is a widget

### dispose

    void dispose()

  API contract needed here

### setMode

    void setMode(int mode)

  Parameters:
    `mode` -