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
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
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
getJsObj()
static SyntaxHiliter
getOrCreateRef
(JavaScriptObject jsObj) Highlights the passed in source by applying span style elements to matched tokens and returns it as a string.boolean
void
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, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
SyntaxHiliter
public SyntaxHiliter() -
SyntaxHiliter
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObject
in classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObj
in classBaseClass
-
hilite
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
-