congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DefaultStyledDocument.addDocumentListener
Code IndexAdd Tabnine to your IDE (free)

How to use
addDocumentListener
method
in
javax.swing.text.DefaultStyledDocument

Best Java code snippets using javax.swing.text.DefaultStyledDocument.addDocumentListener (Showing top 14 results out of 315)

origin: groovy/groovy-core

doc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    documentChangedSinceLastRepaint = true;
undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: de.sciss/abc4j

public void startIt()
{
  m_document.addDocumentListener(this);
  m_forceRefresh=true;
  synchronized(m_mutex)
   {
    m_mutex.notify();
   }
}
origin: de.sciss/abc4j

public void setDocument(DefaultStyledDocument doc)
{
  try
  {
 // System.out.println(this.getClass().getName() + " - setDocument(" + doc + ")");
 m_document.removeDocumentListener(this);
 m_document = doc;
 m_tune = m_parser.parse(doc.getText(0, doc.getLength()));
 m_document.addDocumentListener(this);
 }
 catch (Exception e)
 { e.printStackTrace();
 }
}
origin: org.kohsuke.droovy/groovy

undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: org.codehaus.groovy/groovy-all-minimal

undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: org.codehaus.groovy/groovy-jdk14

undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: Multibit-Legacy/multibit-hd

doc.addDocumentListener(listener);
origin: org.codehaus.groovy/groovy-console

doc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    documentChangedSinceLastRepaint = true;
undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

doc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    documentChangedSinceLastRepaint = true;
undoManager.addPropertyChangeListener(redoAction);
doc.addDocumentListener(undoAction);
doc.addDocumentListener(redoAction);
origin: cmu-phil/tetrad

add(b, BorderLayout.CENTER);
doc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    listen();
origin: cmu-phil/tetrad

add(b, BorderLayout.CENTER);
doc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    listen();
origin: Multibit-Legacy/multibit-hd

/**
 * @param listener The document listener for detecting changes to the content
 * @param rows     The number of rows (normally 6)
 * @param columns  The number of columns (normally 60)
 *
 * @return A new read only length limited text field with default theme
 */
public static JTextArea newReadOnlyLengthLimitedTextArea(DocumentListener listener, int rows, int columns) {
 JTextArea textArea = newReadOnlyTextArea(rows, columns);
 // Limit the length of the underlying document
 DefaultStyledDocument doc = new DefaultStyledDocument();
 doc.setDocumentFilter(new DocumentMaxLengthFilter(rows * columns));
 textArea.setDocument(doc);
 // Ensure we monitor changes
 doc.addDocumentListener(listener);
 return textArea;
}
origin: cmu-phil/tetrad

expressionTextDoc.addDocumentListener(new DocumentListener() {
  public void insertUpdate(DocumentEvent documentEvent) {
    listen();
origin: stackoverflow.com

doc = new DefaultStyledDocument();
doc.setDocumentFilter(new DocumentSizeFilter(500));
doc.addDocumentListener(new DocumentListener(){
  @Override
  public void changedUpdate(DocumentEvent e) { updateCount();}
javax.swing.textDefaultStyledDocumentaddDocumentListener

Popular methods of DefaultStyledDocument

  • <init>
  • getLength
  • insertString
  • getText
  • remove
  • setCharacterAttributes
  • setDocumentFilter
  • addUndoableEditListener
  • createPosition
  • getParagraphElement
  • getCharacterElement
  • setParagraphAttributes
  • getCharacterElement,
  • setParagraphAttributes,
  • getDefaultRootElement,
  • insert,
  • addStyle,
  • fireInsertUpdate,
  • fireRemoveUpdate,
  • getEndPosition,
  • getStyle

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now