Package com.smartgwt.client.util

# Class SyntaxHiliter

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

All Implemented Interfaces:
  `HasHandlers`

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, configOnly, factoryCreated, factoryProperties, id, scClassName`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JavaScriptObject`
  `create()`
  `JavaScriptObject`
  `getJsObj()`
  `JavaScriptObject`
  `getOrCreateJsObj()`
  `static SyntaxHiliter`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `hilite(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

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

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

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

- ## Constructor Details

  - ### SyntaxHiliter

    public SyntaxHiliter()

  - ### SyntaxHiliter

    public SyntaxHiliter(JavaScriptObject jsObj)

- ## Method Details

  - ### 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 String hilite(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