org.basex.gui.editor
Class SyntaxJSON

java.lang.Object
  extended by org.basex.gui.editor.SyntaxJSON

public final class SyntaxJSON
extends java.lang.Object

This class defines syntax highlighting for JSON files.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
protected static java.awt.Color COMMENT
          Comment color.
protected static java.awt.Color FUNCTION
          Function color.
protected static java.awt.Color KEYWORD
          Keyword color.
protected static java.awt.Color STRING
          String color.
protected static java.awt.Color TEXT
          Standard color.
protected static java.awt.Color VARIABLE
          Variable color.
 
Constructor Summary
SyntaxJSON()
           
 
Method Summary
 byte[] commentEnd()
          Returns the end of a comment.
 byte[] commentOpen()
          Returns the start of a comment.
 java.awt.Color getColor(EditorText text)
          Returns the color for the current token.
 void init()
          Initializes the highlighter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT

protected static final java.awt.Color TEXT
Standard color.


COMMENT

protected static final java.awt.Color COMMENT
Comment color.


STRING

protected static final java.awt.Color STRING
String color.


KEYWORD

protected static final java.awt.Color KEYWORD
Keyword color.


FUNCTION

protected static final java.awt.Color FUNCTION
Function color.


VARIABLE

protected static final java.awt.Color VARIABLE
Variable color.

Constructor Detail

SyntaxJSON

public SyntaxJSON()
Method Detail

init

public void init()
Initializes the highlighter.


getColor

public java.awt.Color getColor(EditorText text)
Returns the color for the current token.

Parameters:
text - tokenizer
Returns:
color

commentOpen

public byte[] commentOpen()
Returns the start of a comment.

Returns:
comment start

commentEnd

public byte[] commentEnd()
Returns the end of a comment.

Returns:
comment end