All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit Maven / Gradle / Ivy

/*
 * 08/29/2004
 *
 * RSyntaxTextAreaEditorKit.java - The editor kit used by RSyntaxTextArea.
 * 
 * This library is distributed under a modified BSD license.  See the included
 * RSyntaxTextArea.License.txt file for details.
 */
package org.fife.ui.rsyntaxtextarea;

import javax.swing.text.Document;

import org.fife.ui.rtextarea.RTextAreaEditorKit;


/**
 * An extension of RTextAreaEditorKit that adds functionality for
 * programming-specific stuff.  There are currently subclasses to handle:
 *
 * 
    *
  • Toggling code folds.
  • *
  • Aligning "closing" curly braces with their matches, if the current * programming language uses curly braces to identify code blocks.
  • *
  • Copying the current selection as RTF.
  • *
  • Block indentation (increasing the indent of one or multiple lines)
  • *
  • Block un-indentation (decreasing the indent of one or multiple lines) *
  • *
  • Inserting a "code template" when a configurable key (e.g. a space) is * pressed
  • *
  • Decreasing the point size of all fonts in the text area
  • *
  • Increasing the point size of all fonts in the text area
  • *
  • Moving the caret to the "matching bracket" of the one at the current * caret position
  • *
  • Toggling whether the currently selected lines are commented out.
  • *
  • Better selection of "words" on mouse double-clicks for programming * languages.
  • *
  • Better keyboard navigation via Ctrl+arrow keys for programming * languages.
  • *
* * @author Robert Futrell * @version 0.5 */ public class RSyntaxTextAreaEditorKit extends RTextAreaEditorKit { private static final long serialVersionUID = 1L; /** * Returns the default document used by RSyntaxTextAreas. * * @return The document. */ public Document createDefaultDocument() { return new RSyntaxDocument(SyntaxConstants.SYNTAX_STYLE_NONE); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy