void (Document document) { if (myDocument != null) { uninstallDocumentListener(true); } myDocument = document; installDocumentListener(); if (myEditorField == null) return; myEditorField.setDocument(document); }