public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
/** * Overridden so we can track when code folding is enabled/disabled. */ @Override public void setTextArea(RTextArea textArea) { if (this.textArea!=null) { this.textArea.removePropertyChangeListener( RSyntaxTextArea.CODE_FOLDING_PROPERTY, listener); } super.setTextArea(textArea); if (this.textArea!=null) { this.textArea.addPropertyChangeListener( RSyntaxTextArea.CODE_FOLDING_PROPERTY, listener); } }
public void install(RTextArea textArea) { if (installed) { uninstall(); } textArea.addComponentListener(this); textArea.getDocument().addDocumentListener(this); textArea.addPropertyChangeListener(this); if (textArea instanceof RSyntaxTextArea) { RSyntaxTextArea rsta = (RSyntaxTextArea)textArea; rsta.addActiveLineRangeListener(this); rsta.getFoldManager().addPropertyChangeListener(this); } installed = true; }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
public void install(RTextArea textArea) { if (installed) { uninstall(); } textArea.addComponentListener(this); textArea.getDocument().addDocumentListener(this); textArea.addPropertyChangeListener(this); installed = true; }
/** * Overridden so we can track when code folding is enabled/disabled. */ @Override public void setTextArea(RTextArea textArea) { if (this.textArea!=null) { this.textArea.removePropertyChangeListener( RSyntaxTextArea.CODE_FOLDING_PROPERTY, listener); } super.setTextArea(textArea); if (this.textArea!=null) { this.textArea.addPropertyChangeListener( RSyntaxTextArea.CODE_FOLDING_PROPERTY, listener); } }
public void install(RTextArea textArea) { if (installed) { uninstall(); } textArea.addComponentListener(this); textArea.getDocument().addDocumentListener(this); textArea.addPropertyChangeListener(this); installed = true; }
public void install(RTextArea textArea) { if (installed) { uninstall(); } textArea.addComponentListener(this); textArea.getDocument().addDocumentListener(this); textArea.addPropertyChangeListener(this); if (textArea instanceof RSyntaxTextArea) { RSyntaxTextArea rsta = (RSyntaxTextArea)textArea; rsta.addActiveLineRangeListener(this); rsta.getFoldManager().addPropertyChangeListener(this); } installed = true; }