Package org.basex.gui.text
Class SyntaxXML
- java.lang.Object
-
- org.basex.gui.text.SyntaxXML
-
public final class SyntaxXML extends Object
This class defines syntax highlighting for XML files.- Author:
- BaseX Team 2005-22, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description SyntaxXML()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
commentEnd()
Returns the end of a comment.byte[]
commentOpen()
Returns the start of a comment.byte[]
format(byte[] string, byte[] spaces)
Returns a formatted version of a string.Color
getColor(org.basex.gui.text.TextIterator iter)
Returns the color for the current token.void
init(Color color)
Initializes the highlighter.
-
-
-
Method Detail
-
init
public void init(Color color)
Initializes the highlighter.- Parameters:
color
- default color
-
getColor
public Color getColor(org.basex.gui.text.TextIterator iter)
Returns the color for the current token.- Parameters:
iter
- iterator- 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
-
format
public byte[] format(byte[] string, byte[] spaces)
Returns a formatted version of a string.- Parameters:
string
- string to be formattedspaces
- spaces- Returns:
- formatted string
-
-