本文整理了Java中javax.swing.text.StyledDocument.removeDocumentListener()
方法的一些代码示例,展示了StyledDocument.removeDocumentListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StyledDocument.removeDocumentListener()
方法的具体详情如下:
包路径:javax.swing.text.StyledDocument
类名称:StyledDocument
方法名:removeDocumentListener
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync
private void removeDocumentListener() {
if (styledDocument != null && documentListenerAdded.compareAndSet(true, false)) {
styledDocument.removeDocumentListener(this);
}
}
代码示例来源:origin: Wimmics/corese
@Override
public void redo()
{
editor.getStyledDocument().addDocumentListener( this );
super.redo();
editor.getStyledDocument().removeDocumentListener( this );
}
代码示例来源:origin: fr.inria.wimmics/kggui
@Override
public void redo()
{
editor.getStyledDocument().addDocumentListener( this );
super.redo();
editor.getStyledDocument().removeDocumentListener( this );
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void run() {
try {
doc.removeDocumentListener(getListener());
doc.remove(0, doc.getLength()); // remove all text
doc.addDocumentListener(getListener());
} catch(BadLocationException ble) {
ErrorManager.getDefault().notify(
ErrorManager.INFORMATIONAL, ble);
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void run() {
try {
doc.removeDocumentListener(getListener());
doc.remove(0, doc.getLength()); // remove all text
doc.addDocumentListener(getListener());
} catch(BadLocationException ble) {
ErrorManager.getDefault().notify(
ErrorManager.INFORMATIONAL, ble);
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
doc.removeDocumentListener(getListener());
try {
loadExc = null;
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
doc.removeDocumentListener(getListener());
try {
loadExc = null;
代码示例来源:origin: org.netbeans.api/org-openide-text
doc.removeDocumentListener(docL);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Is called under getLock () to close the document.
*/
private void doCloseDocument () {
prepareTask = null;
// notifies the support that
env ().removePropertyChangeListener(getListener());
notifyUnmodified ();
if (doc != null) {
doc.removeUndoableEditListener (getUndoRedo ());
doc.removeDocumentListener(getListener());
}
if (positionManager != null) {
positionManager.documentClosed ();
documentStatus = DOCUMENT_NO;
fireDocumentChange(doc, true);
}
documentStatus = DOCUMENT_NO;
doc = null;
kit = null;
getUndoRedo().discardAllEdits();
updateLineSet (true);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Is called under getLock () to close the document.
*/
private void doCloseDocument () {
prepareTask = null;
// notifies the support that
env ().removePropertyChangeListener(getListener());
notifyUnmodified ();
if (doc != null) {
doc.removeUndoableEditListener (getUndoRedo ());
doc.removeDocumentListener(getListener());
}
if (positionManager != null) {
positionManager.documentClosed ();
documentStatus = DOCUMENT_NO;
fireDocumentChange(doc, true);
}
documentStatus = DOCUMENT_NO;
doc = null;
kit = null;
getUndoRedo().discardAllEdits();
updateLineSet (true);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Refreshes the current line.
*
* @deprecated since 1.20. */
synchronized void refreshState () {
StyledDocument doc = pos.getCloneableEditorSupport ().getDocument ();
if (doc != null) {
// the document is in memory, mark the state
if (docL != null) {
doc.removeDocumentListener (docL);
}
// error line
if (error) {
NbDocument.markError (doc, pos.getOffset ());
doc.addDocumentListener (docL = org.openide.util.WeakListeners.document (listener, doc));
return;
}
// current line
if (current) {
NbDocument.markCurrent (doc, pos.getOffset ());
return;
}
// breakpoint line
if (breakpoint) {
NbDocument.markBreakpoint (doc, pos.getOffset ());
return;
}
NbDocument.markNormal (doc, pos.getOffset ());
return;
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Refreshes the current line.
*
* @deprecated since 1.20. */
synchronized void refreshState () {
StyledDocument doc = pos.getCloneableEditorSupport ().getDocument ();
if (doc != null) {
// the document is in memory, mark the state
if (docL != null) {
doc.removeDocumentListener (docL);
}
// error line
if (error) {
NbDocument.markError (doc, pos.getOffset ());
doc.addDocumentListener (docL = org.openide.util.WeakListeners.document (listener, doc));
return;
}
// current line
if (current) {
NbDocument.markCurrent (doc, pos.getOffset ());
return;
}
// breakpoint line
if (breakpoint) {
NbDocument.markBreakpoint (doc, pos.getOffset ());
return;
}
NbDocument.markNormal (doc, pos.getOffset ());
return;
}
}
内容来源于网络,如有侵权,请联系作者删除!