use of org.jabref.gui.fieldeditors.FieldEditorFocusListener in project jabref by JabRef.
the class EntryEditor method setupSourcePanel.
private void setupSourcePanel() {
source = new JTextAreaWithHighlighting();
addSearchListener((SearchQueryHighlightListener) source);
source.setEditable(true);
source.setLineWrap(true);
source.addFocusListener(new FieldEditorFocusListener());
// Add the global focus listener, so a menu item can see if this field was focused when an action was called.
source.addFocusListener(Globals.getFocusListener());
source.setFont(new Font("Monospaced", Font.PLAIN, Globals.prefs.getInt(JabRefPreferences.FONT_SIZE)));
setupJTextComponent(source);
updateSource();
JScrollPane scrollPane = new JScrollPane(source, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
srcPanel.setLayout(new BorderLayout());
srcPanel.add(scrollPane, BorderLayout.CENTER);
}
Aggregations