com.smartgwt.client.util

## Class SyntaxHiliter

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.util.SyntaxHiliter

- Direct Known Subclasses:
    JSSyntaxHiliter, XMLSyntaxHiliter

      public class SyntaxHiliter
      extends BaseClass

  Abstract base class for regular expression-based source code colorizer.

  An instance of this class is never instantiated. Instead, use one of the source-specific subclasses: `XMLSyntaxHiliter` or `JSSyntaxHiliter`.

  NOTE: This class exists only for use with the Smart GWT Feature Explorer and SmartGWT Showcases and cannot be used in any other environment.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SyntaxHiliter()`
    `SyntaxHiliter(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JavaScriptObject` | `create()`
    `JavaScriptObject` | `getJsObj()`
    `JavaScriptObject` | `getOrCreateJsObj()`
    `static SyntaxHiliter` | `getOrCreateRef(JavaScriptObject jsObj)`
    `java.lang.String` | `hilite(java.lang.String source)` Highlights the passed in source by applying span style elements to matched tokens and returns it as a string.
    `boolean` | `isCreated()`
    `void` | `setJavaScriptObject(JavaScriptObject jsObj)`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `applyFactoryProperties, asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getScClassName, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setScClassName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SyntaxHiliter

          public SyntaxHiliter()

    - #### SyntaxHiliter

          public SyntaxHiliter(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static SyntaxHiliter getOrCreateRef(JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `BaseClass`

    - #### create

          public JavaScriptObject create()

      Specified by:
        `create` in class `BaseClass`

    - #### isCreated

          public boolean isCreated()

      Overrides:
        `isCreated` in class `BaseClass`

    - #### getJsObj

          public JavaScriptObject getJsObj()

      Overrides:
        `getJsObj` in class `BaseClass`

    - #### getOrCreateJsObj

          public JavaScriptObject getOrCreateJsObj()

      Overrides:
        `getOrCreateJsObj` in class `BaseClass`

    - #### hilite

          public java.lang.String hilite(java.lang.String source)

      Highlights the passed in source by applying span style elements to matched tokens and returns it as a string.
      Parameters:
        `source` - the source to be colorized
      Returns:
        the marked-up source as HTML