JEditorPane ed = new JEditorPane(); ScEditorKit ek = new ScEditorKit(); ed.setEditorKit( ek ); ek.readSyntaxColorDescriptor( "sql.prop" ); ed.setText( ... )
|
token_op=(:):+:-:/:*:,:=:^:=:!=:&&:||:<:>:.: token_number1=_NUMBER_ token_cst=PI:E:x:y color_op=150:150:20 color_number1=blue color_cst=red |
Key |
Role |
token_ID |
Define a list of keywords and
link it to ID |
color_ID |
Define a color for ID |
underline_ID |
Decide to underline or not ID
with the color of ID or the default one |
border_ID |
Decide to draw a rectangle
around ID with the color of ID or the default one |
tokenMatchIni |
Set of characters before a token
for validiting it |
tokenMatchEnd |
Set of characters after a token
for validating it |
ignoreTokenMatch_ID | We ignore the characters before
or after the tokens from token_ID |
info |
Target of the current property file. This is
mainly useful for the GUI usage. |
token_keywords1=CREATE:TABLE:IF:NOT:EXISTS:DEFAULT:NULL:INDEX_NONE:BIT:REAL:CHAR:TEXT:DATE:TIME:FLOAT:STRING:NUMERIC:INTEGER:VARCHAR:PRIMARY:FOREIGN:KEY:UNIQUE: ALTER:ADD:DROP:VIEW token_keywords2=INSERT:INTO:VALUES:SET:DELETE:FROM:WHERE:LIMIT:UPDATE:SELECT:GROUP BY:HAVING:ORDER BY:JOIN:AS:ASC: DESC :COMMIT:ROLLBACK:LIKE: OR : AND :CONCAT token_litteral1=[';'] token_op=(:):+:-:/:*:,:= token_number1=_NUMBER_ color_keywords1=blue color_keywords2=blue color_litteral1=50:150:50 color_number1=red color_op=150:150:20 ignoreCase=true tokenMatchIni=\ \t([ tokenMatchEnd=\ \t)];= ignoreTokenMatch_op=true ignoreTokenMatch_litteral1=true |