Top Inners Fields Constructors Methods
org.jabref.gui.entryeditor

public Class SourceTab

extends EntryEditorTab
Class Inheritance
Imports
java.io.IOException, .StringReader, .StringWriter, java.util.Map, .Objects, .Optional, java.util.regex.Matcher, .Pattern, javax.swing.undo.UndoManager, javafx.beans.InvalidationListener, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.geometry.Point2D, javafx.scene.control.ContextMenu, .Tooltip, javafx.scene.input.InputMethodRequests, .KeyEvent, org.jabref.gui.DialogService, .StateManager, org.jabref.gui.actions.ActionFactory, .SimpleCommand, .StandardActions, org.jabref.gui.icon.IconTheme, org.jabref.gui.keyboard.CodeAreaKeyBindings, .KeyBindingRepository, org.jabref.gui.undo.CountingUndoManager, .NamedCompound, .UndoableChangeType, .UndoableFieldChange, org.jabref.gui.util.UiTaskExecutor, org.jabref.logic.bibtex.BibEntryWriter, .FieldPreferences, .FieldWriter, .InvalidFieldValueException, org.jabref.logic.exporter.BibWriter, org.jabref.logic.importer.ImportFormatPreferences, .ParserResult, org.jabref.logic.importer.fileformat.BibtexParser, org.jabref.logic.l10n.Localization, org.jabref.logic.search.SearchQuery, org.jabref.logic.util.OS, org.jabref.model.database.BibDatabase, .BibDatabaseContext, .BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.entry.field.Field, org.jabref.model.util.FileUpdateMonitor, de.saxsys.mvvmfx.utils.validation.ObservableRuleBasedValidator, de.saxsys.mvvmfx.utils.validation.ValidationMessage, de.saxsys.mvvmfx.utils.validation.ValidationStatus, org.fxmisc.flowless.VirtualizedScrollPane, org.fxmisc.richtext.CodeArea, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class

Field Summary

Modifier and TypeField and Description
private org.fxmisc.richtext.CodeArea
private final DialogService
private final BibEntryTypesManager
private final FieldPreferences
private final FileUpdateMonitor
private final ImportFormatPreferences
private final KeyBindingRepository
private static final Logger
private final BibDatabaseMode
private BibEntry
private Optional<Pattern>
private final ObjectProperty<de.saxsys.mvvmfx.utils.validation.ValidationMessage>
private final de.saxsys.mvvmfx.utils.validation.ObservableRuleBasedValidator
private final UndoManager
Inherited from org.jabref.gui.entryeditor.EntryEditorTab:
currentEntry

Constructor Summary

AccessConstructor and Description
public
SourceTab(BibDatabaseContext bibDatabaseContext, CountingUndoManager undoManager, FieldPreferences fieldPreferences, ImportFormatPreferences importFormatPreferences, FileUpdateMonitor fileMonitor, DialogService dialogService, StateManager stateManager, BibEntryTypesManager entryTypesManager, KeyBindingRepository keyBindingRepository)

Method Summary

Modifier and TypeMethod and Description
protected void
bindToEntry(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Updates the view with the contents of the given entry.

private String
private void
private void
private void
public boolean
shouldShow(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.shouldShow.

Decide whether to show this tab for the given entry.

private void
storeSource(BibEntry outOfFocusEntry, String text)

private void
Inherited from org.jabref.gui.entryeditor.EntryEditorTab:
handleFocusnotifyAboutFocus

Field Detail

codeAreaback to summary
private org.fxmisc.richtext.CodeArea codeArea
dialogServiceback to summary
private final DialogService dialogService
entryTypesManagerback to summary
private final BibEntryTypesManager entryTypesManager
fieldPreferencesback to summary
private final FieldPreferences fieldPreferences
fileMonitorback to summary
private final FileUpdateMonitor fileMonitor
importFormatPreferencesback to summary
private final ImportFormatPreferences importFormatPreferences
keyBindingRepositoryback to summary
private final KeyBindingRepository keyBindingRepository
LOGGERback to summary
private static final Logger LOGGER
modeback to summary
private final BibDatabaseMode mode
previousEntryback to summary
private BibEntry previousEntry
searchHighlightPatternback to summary
private Optional<Pattern> searchHighlightPattern
sourceIsValidback to summary
private final ObjectProperty<de.saxsys.mvvmfx.utils.validation.ValidationMessage> sourceIsValid
sourceValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.ObservableRuleBasedValidator sourceValidator
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

SourceTabback to summary
public SourceTab(BibDatabaseContext bibDatabaseContext, CountingUndoManager undoManager, FieldPreferences fieldPreferences, ImportFormatPreferences importFormatPreferences, FileUpdateMonitor fileMonitor, DialogService dialogService, StateManager stateManager, BibEntryTypesManager entryTypesManager, KeyBindingRepository keyBindingRepository)

Method Detail

bindToEntryback to summary
protected void bindToEntry(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Doc from org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Updates the view with the contents of the given entry.

Annotations
@Override
getSourceStringback to summary
private String getSourceString(BibEntry entry, BibDatabaseMode type, FieldPreferences fieldPreferences) throws IOException
highlightSearchPatternback to summary
private void highlightSearchPattern()
listenForSaveKeybindingback to summary
private void listenForSaveKeybinding(KeyEvent event)
setupSourceEditorback to summary
private void setupSourceEditor()
shouldShowback to summary
public boolean shouldShow(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.shouldShow.

Doc from org.jabref.gui.entryeditor.EntryEditorTab.shouldShow.

Decide whether to show this tab for the given entry.

Annotations
@Override
storeSourceback to summary
private void storeSource(BibEntry outOfFocusEntry, String text)
updateCodeAreaback to summary
private void updateCodeArea()
org.jabref.gui.entryeditor back to summary

private Class SourceTab.EditAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final StandardActions
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

commandback to summary
private final StandardActions command

Constructor Detail

EditActionback to summary
public EditAction(StandardActions command)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.entryeditor back to summary

private Class SourceTab.InputMethodRequestsObject

extends Object
implements InputMethodRequests
Class Inheritance
  • java.lang.Object
  • org.jabref.gui.entryeditor.SourceTab.InputMethodRequestsObject
All Implemented Interfaces
javafx.scene.input.InputMethodRequests

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
cancelLatestCommittedText()

Implements javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Gets the latest committed text from the text editing node and removes it from the node's text body.

public int
getLocationOffset(int
the absolute x coordinate on screen
x
,
int
the absolute y coordinate on screen
y
)

Implements javafx.scene.input.InputMethodRequests.getLocationOffset.

Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.

public String
getSelectedText()

Implements javafx.scene.input.InputMethodRequests.getSelectedText.

Gets the currently selected text from the text editing node.

public Point2D
getTextLocation(int
the offset within the composed text, if there is composed text; null otherwise
offset
)

Implements javafx.scene.input.InputMethodRequests.getTextLocation.

Gets the location of a specified offset in the current composed text, or of the selection in committed text.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InputMethodRequestsObjectback to summary
private InputMethodRequestsObject()

Method Detail

cancelLatestCommittedTextback to summary
public void cancelLatestCommittedText()

Implements javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Doc from javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Gets the latest committed text from the text editing node and removes it from the node's text body. This is used for the "Undo Commit" feature in some input methods, where the committed text reverts to its previous composed state. The composed text will be sent to the node using an InputMethodEvent.

Annotations
@Override
getLocationOffsetback to summary
public int getLocationOffset(int x, int y)

Implements javafx.scene.input.InputMethodRequests.getLocationOffset.

Doc from javafx.scene.input.InputMethodRequests.getLocationOffset.

Gets the offset within the composed text for the specified absolute x and y coordinates on the screen. This information is used, for example to handle mouse clicks and the mouse cursor. The offset is relative to the composed text, so offset 0 indicates the beginning of the composed text.

Parameters
x:int

the absolute x coordinate on screen

y:int

the absolute y coordinate on screen

Returns:int

the offset in the composed text.

Annotations
@Override
getSelectedTextback to summary
public String getSelectedText()

Implements javafx.scene.input.InputMethodRequests.getSelectedText.

Doc from javafx.scene.input.InputMethodRequests.getSelectedText.

Gets the currently selected text from the text editing node. This may be used for a variety of purposes. One of them is the "Reconvert" feature in some input methods. In this case, the input method will typically send an input method event to replace the selected text with composed text. Depending on the input method's capabilities, this may be the original composed text for the selected text, the latest composed text entered anywhere in the text, or a version of the text that's converted back from the selected text.

Returns:String

the latest committed text, or null when the "Undo Commit" feature is not supported

Annotations
@Override
getTextLocationback to summary
public Point2D getTextLocation(int offset)

Implements javafx.scene.input.InputMethodRequests.getTextLocation.

Doc from javafx.scene.input.InputMethodRequests.getTextLocation.

Gets the location of a specified offset in the current composed text, or of the selection in committed text. This information is, for example, used to position the candidate window near the composed text, or a composition window near the location where committed text will be inserted.

Parameters
offset:int

the offset within the composed text, if there is composed text; null otherwise

Returns:Point2D

a point representing the screen location of the offset

Annotations
@Override