本文整理了Java中javax.swing.JEditorPane.removeCaretListener()
方法的一些代码示例,展示了JEditorPane.removeCaretListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.removeCaretListener()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:removeCaretListener
暂无
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
public void panelDeactivated () {
if (lastEditor != null)
lastEditor.removeCaretListener (caretListener);
lastEditor = null;
}
代码示例来源:origin: org.nuiton/nuiton-widgets
@Override
public void removeCaretListener(CaretListener listener) {
editor.removeCaretListener(listener);
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra
@Override
public void removeCaretListener(CaretListener listener) {
editor.removeCaretListener(listener);
}
代码示例来源:origin: de.sciss/syntaxpane
@Override
public void deinstall(JEditorPane editor) {
status = Status.DEINSTALLING;
removeMarkers();
pane.removeCaretListener(this);
}
private static final Logger LOG = Logger.getLogger(TokenMarker.class.getName());
代码示例来源:origin: freeplane/freeplane
@Override
public void deinstall(JEditorPane editor) {
status = Status.DEINSTALLING;
deHighlight();
pane.removeCaretListener(this);
pane = null;
}
代码示例来源:origin: de.sciss/jsyntaxpane
@Override
public void deinstall(JEditorPane editor) {
status = Status.DEINSTALLING;
removeMarkers();
pane.removeCaretListener(this);
}
private static final Logger LOG = Logger.getLogger(TokenMarker.class.getName());
代码示例来源:origin: de.sciss/syntaxpane
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("document")) {
pane.removeCaretListener(this);
if (status.equals(Status.INSTALLING)) {
pane.addCaretListener(this);
removeMarkers();
}
}
}
}
代码示例来源:origin: freeplane/freeplane
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("document")) {
pane.removeCaretListener(this);
if (status.equals(Status.INSTALLING)) {
pane.addCaretListener(this);
deHighlight();
}
}
}
代码示例来源:origin: de.sciss/jsyntaxpane
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("document")) {
pane.removeCaretListener(this);
if (status.equals(Status.INSTALLING)) {
pane.addCaretListener(this);
removeMarkers();
}
}
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
private void setCurrentEditor (JEditorPane editor) {
if (caretListener == null)
caretListener = new MyCaretListener ();
if (lastEditor != null)
lastEditor.removeCaretListener (caretListener);
lastEditor = editor;
if (lastEditor != null)
lastEditor.addCaretListener (caretListener);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
protected void componentHidden () {
if (listener != null) {
listener.remove ();
listener = null;
}
if (lastPane != null)
lastPane.removeCaretListener (caretListener);
lastPane = null;
if (lastDocument != null)
lastDocument.removeDocumentListener (documentListener);
lastDocument = null;
highlighting.removeHighlight ();
}
代码示例来源:origin: de.sciss/syntaxpane
@Override
public void deinstall(JEditorPane editor) {
removeMouseListener(mouseListener);
status = Status.DEINSTALLING;
editor.getDocument().removeDocumentListener(this);
editor.removeCaretListener(this);
editor.removePropertyChangeListener(this);
JScrollPane sp = getScrollPane(editor);
if (sp != null) {
sp.setRowHeaderView(null);
}
}
代码示例来源:origin: de.sciss/jsyntaxpane
@Override
public void deinstall(JEditorPane editor) {
removeMouseListener(mouseListener);
status = Status.DEINSTALLING;
this.editor.getDocument().removeDocumentListener(this);
editor.removeCaretListener(this);
editor.removePropertyChangeListener(this);
JScrollPane sp = getScrollPane(editor);
if (sp != null) {
editor.getDocument().removeDocumentListener(this);
sp.setRowHeaderView(null);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
private ASTNode getCurrentRootNode () {
Node[] ns = TopComponent.getRegistry ().getActivatedNodes ();
if (ns.length != 1) return null;
EditorCookie editorCookie = ns [0].getLookup ().
lookup (EditorCookie.class);
if (editorCookie == null) return null;
if (editorCookie.getOpenedPanes () == null) return null;
if (editorCookie.getOpenedPanes ().length < 1) return null;
JEditorPane pane = editorCookie.getOpenedPanes () [0];
if (caretListener == null)
caretListener = new CListener ();
if (lastPane != null && lastPane != pane) {
lastPane.removeCaretListener (caretListener);
lastPane = null;
}
if (lastPane == null) {
pane.addCaretListener (caretListener);
lastPane = pane;
}
Document document = editorCookie.getDocument ();
if (document == null || !(document instanceof NbEditorDocument)) return null;
return ParserManagerImpl.getImpl (document).getAST ();
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
caretListener = new CListener ();
if (lastPane != null && lastPane != pane) {
lastPane.removeCaretListener (caretListener);
lastPane = null;
内容来源于网络,如有侵权,请联系作者删除!