コード例 #1
0
 /**
  * Sets the syntax style being used for syntax highlighting in this document. You should call this
  * method if you've created a custom token maker for a language not normally supported by <code>
  * RSyntaxTextArea</code>.
  *
  * @param tokenMaker The new token maker to use.
  */
 public void setSyntaxStyle(TokenMaker tokenMaker) {
   tokenMaker.setWhitespaceVisible(isWhitespaceVisible());
   this.tokenMaker = tokenMaker;
   updateSyntaxHighlightingInformation();
 }
コード例 #2
0
 /**
  * Sets whether whitespace is visible. This property is actually setting whether the tokens
  * generated from this document "paint" something when they represent whitespace.
  *
  * @param visible Whether whitespace should be visible.
  * @see #isWhitespaceVisible()
  */
 public void setWhitespaceVisible(boolean visible) {
   tokenMaker.setWhitespaceVisible(visible);
 }
コード例 #3
0
 /**
  * Sets the syntax style being used for syntax highlighting in this document. What styles are
  * supported by a document is determined by its {@link TokenMakerFactory}. By default, all <code>
  * RSyntaxDocument</code>s support all languages built into <code>RSyntaxTextArea</code>.
  *
  * @param styleKey The new style to use, such as {@link SyntaxConstants#SYNTAX_STYLE_JAVA}. If
  *     this style is not known or supported by this document, then {@link
  *     SyntaxConstants#SYNTAX_STYLE_NONE} is used.
  */
 public void setSyntaxStyle(String styleKey) {
   boolean wsVisible = isWhitespaceVisible();
   tokenMaker = tokenMakerFactory.getTokenMaker(styleKey);
   tokenMaker.setWhitespaceVisible(wsVisible);
   updateSyntaxHighlightingInformation();
 }