public void restoreDefaults(Font baseFont){
  Color comment=new Color(0,128,0);
  Color docComment=new Color(164,0,0);
  Color keyword=Color.BLUE;
  Color function=new Color(173,128,0);
  Color literalNumber=new Color(100,0,200);
  Color literalString=new Color(220,0,156);
  Color error=new Color(148,148,0);
  if (baseFont == null) {
    baseFont=RSyntaxTextArea.getDefaultFont();
  }
  StyleContext sc=StyleContext.getDefaultStyleContext();
  Font boldFont=sc.getFont(baseFont.getFamily(),Font.BOLD,baseFont.getSize());
  Font italicFont=sc.getFont(baseFont.getFamily(),Font.ITALIC,baseFont.getSize());
  Font commentFont=italicFont;
  Font keywordFont=boldFont;
  styles[Token.COMMENT_EOL]=new Style(comment,null,commentFont);
  styles[Token.COMMENT_MULTILINE]=new Style(comment,null,commentFont);
  styles[Token.COMMENT_DOCUMENTATION]=new Style(docComment,null,commentFont);
  styles[Token.RESERVED_WORD]=new Style(keyword,null,keywordFont);
  styles[Token.FUNCTION]=new Style(function,null);
  styles[Token.LITERAL_BOOLEAN]=new Style(literalNumber,null);
  styles[Token.LITERAL_NUMBER_DECIMAL_INT]=new Style(literalNumber,null);
  styles[Token.LITERAL_NUMBER_FLOAT]=new Style(literalNumber,null);
  styles[Token.LITERAL_NUMBER_HEXADECIMAL]=new Style(literalNumber,null);
  styles[Token.LITERAL_STRING_DOUBLE_QUOTE]=new Style(literalString,null);
  styles[Token.LITERAL_CHAR]=new Style(literalString,null);
  styles[Token.LITERAL_BACKQUOTE]=new Style(literalString,null);
  styles[Token.DATA_TYPE]=new Style(new Color(0,128,128),null);
  styles[Token.VARIABLE]=new Style(new Color(255,153,0),null);
  styles[Token.IDENTIFIER]=new Style(null,null);
  styles[Token.WHITESPACE]=new Style(Color.gray,null);
  styles[Token.SEPARATOR]=new Style(Color.RED,null);
  styles[Token.OPERATOR]=new Style(new Color(128,64,64),null);
  styles[Token.PREPROCESSOR]=new Style(new Color(128,128,128),null);
  styles[Token.MARKUP_TAG_DELIMITER]=new Style(Color.RED,null);
  styles[Token.MARKUP_TAG_NAME]=new Style(Color.BLUE,null);
  styles[Token.MARKUP_TAG_ATTRIBUTE]=new Style(new Color(63,127,127),null);
  styles[Token.ERROR_IDENTIFIER]=new Style(error,null);
  styles[Token.ERROR_NUMBER_FORMAT]=new Style(error,null);
  styles[Token.ERROR_STRING_DOUBLE]=new Style(error,null);
  styles[Token.ERROR_CHAR]=new Style(error,null);
}

public void restoreDefaults ( Font baseFont ) { Color comment = new Color ( 0 , 128 , 0 ) ; Color docComment = new Color ( 164 , 0 , 0 ) ; Color keyword = Color . BLUE ; Color function = new Color ( 173 , 128 , 0 ) ; Color literalNumber = new Color ( 100 , 0 , 200 ) ; Color literalString = new Color ( 220 , 0 , 156 ) ; Color error = new Color ( 148 , 148 , 0 ) ; if ( baseFont == null ) { baseFont = RSyntaxTextArea . getDefaultFont ( ) ; } StyleContext sc = StyleContext . getDefaultStyleContext ( ) ; Font boldFont = sc . getFont ( baseFont . getFamily ( ) , Font . BOLD , baseFont . getSize ( ) ) ; Font italicFont = sc . getFont ( baseFont . getFamily ( ) , Font . ITALIC , baseFont . getSize ( ) ) ; Font commentFont = italicFont ; Font keywordFont = boldFont ; styles [ Token . COMMENT_EOL ] = new Style ( comment , null , commentFont ) ; styles [ Token . COMMENT_MULTILINE ] = new Style ( comment , null , commentFont ) ; styles [ Token . COMMENT_DOCUMENTATION ] = new Style ( docComment , null , commentFont ) ; styles [ Token . RESERVED_WORD ] = new Style ( keyword , null , keywordFont ) ; styles [ Token . FUNCTION ] = new Style ( function , null ) ; styles [ Token . LITERAL_BOOLEAN ] = new Style ( literalNumber , null ) ; styles [ Token . LITERAL_NUMBER_DECIMAL_INT ] = new Style ( literalNumber , null ) ; styles [ Token . LITERAL_NUMBER_FLOAT ] = new Style ( literalNumber , null ) ; styles [ Token . LITERAL_NUMBER_HEXADECIMAL ] = new Style ( literalNumber , null ) ; styles [ Token . LITERAL_STRING_DOUBLE_QUOTE ] = new Style ( literalString , null ) ; styles [ Token . LITERAL_CHAR ] = new Style ( literalString , null ) ; styles [ Token . LITERAL_BACKQUOTE ] = new Style ( literalString , null ) ; styles [ Token . DATA_TYPE ] = new Style ( new Color ( 0 , 128 , 128 ) , null ) ; styles [ Token . VARIABLE ] = new Style ( new Color ( 255 , 153 , 0 ) , null ) ; styles [ Token . IDENTIFIER ] = new Style ( null , null ) ; styles [ Token . WHITESPACE ] = new Style ( Color . gray , null ) ; styles [ Token . SEPARATOR ] = new Style ( Color . RED , null ) ; styles [ Token . OPERATOR ] = new Style ( new Color ( 128 , 64 , 64 ) , null ) ; styles [ Token . PREPROCESSOR ] = new Style ( new Color ( 128 , 128 , 128 ) , null ) ; styles [ Token . MARKUP_TAG_DELIMITER ] = new Style ( Color . RED , null ) ; styles [ Token . MARKUP_TAG_NAME ] = new Style ( Color . BLUE , null ) ; styles [ Token . MARKUP_TAG_ATTRIBUTE ] = new Style ( new Color ( 63 , 127 , 127 ) , null ) ; styles [ Token . ERROR_IDENTIFIER ] = new Style ( error , null ) ; styles [ Token . ERROR_NUMBER_FORMAT ] = new Style ( error , null ) ; styles [ Token . ERROR_STRING_DOUBLE ] = new Style ( error , null ) ; styles [ Token . ERROR_CHAR ] = new Style ( error , null ) ; }
restores all colors and fonts to their default values .
