// The tutorial text area gets different processing.
String accessibleName = text.getAccessibleContext().getAccessibleName();
if (accessibleName!= null && accessibleName.equals(TUTORIAL_TEXT_AREA_NAME))
{
TutorialTextProcessor proc = new TutorialTextProcessor();
proc.setText(text.getText());
return proc;
}
EditorProcessor proc = new EditorProcessor();
proc.setPasswordField(text instanceof JPasswordField);
proc.setFocusEvent(true);
proc.setEditable(text.isEditable());
proc.setText(getCurrentLineOfText());
if (this.text.getClass().getName().equals("org.openide.text.QuietEditorPane") &&
accessibleName.matches("Editor for .*?")) {
String[] matches = accessibleName.split("Editor for .*?");
if (matches.length == 2) {
accessibleName = matches[1] + " editor";
accessibleName = accessibleName.replaceAll("\\.", " dot ");
}
}
proc.setAccessibleText(accessibleName);
// If this editor is part of the Help Contents window, strip all the HTML.
if (text.getClass().getName().startsWith("javax.help.")) {
String newText = text.getText().replaceAll("\\<.*?>","");
proc.setEditorText(newText);
} else {
proc.setEditorText(text.getText());
}
proc.setMultiLine(text instanceof JEditorPane);
return proc;
}