public class BasePanel extends javax.swing.JPanel implements java.awt.datatransfer.ClipboardOwner, FileUpdateListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
boolean |
coloringByGroup
The group selector component for this database.
|
boolean |
coloringBySearchResults
The group selector component for this database.
|
java.util.HashMap<java.lang.String,EntryEditor> |
entryEditors |
|
groupFilterList |
boolean |
hidingNonHits
The group selector component for this database.
|
MainTable |
mainTable |
RightClickMenu |
rcm |
|
searchFilterList |
static int |
SHOWING_EDITOR |
static int |
SHOWING_NOTHING |
static int |
SHOWING_PREVIEW |
boolean |
showingGroup
The group selector component for this database.
|
boolean |
showingSearch
The group selector component for this database.
|
boolean |
sortingByCiteSeerResults
The group selector component for this database.
|
boolean |
sortingByGroup
The group selector component for this database.
|
boolean |
sortingBySearchResults
The group selector component for this database.
|
MainTableFormat |
tableFormat |
CountingUndoManager |
undoManager |
static int |
WILL_SHOW_EDITOR |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
BasePanel(JabRefFrame frame)
Create a new BasePanel with an empty database.
|
BasePanel(JabRefFrame frame,
BibtexDatabase db,
java.io.File file,
MetaData metaData,
java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
addContentSelectorValuesToAutoCompleters()
For all fields with both autocompletion and content selector, add content selector
values to the autocompleter list:
|
void |
addJournalListToAutoCompleter()
If an autocompleter exists for the "journal" field, add all
journal names in the journal abbreviation list to this autocompleter.
|
void |
adjustSplitter() |
void |
assureStringDialogNotEditing() |
void |
autoGenerateKeysBeforeSaving()
If the relevant option is set, autogenerate keys for all entries that are
lacking keys.
|
void |
changeType(BibtexEntry[] bes,
BibtexEntryType type) |
void |
changeType(BibtexEntry entry,
BibtexEntryType type) |
void |
changeType(BibtexEntryType type) |
void |
cleanUp()
Perform necessary cleanup when this BasePanel is closed.
|
void |
createMainTable() |
BibtexDatabase |
database() |
void |
ensureNotShowing(BibtexEntry be)
Closes the entry editor if it is showing the given entry.
|
boolean |
entryEditorAllowsChange()
Stores the source view in the entry editor, if one is open, has the source view
selected and the source has been edited.
|
void |
entryEditorClosing(EntryEditor editor)
This method is called from an EntryEditor when it should be closed.
|
java.lang.String |
fileMonitorHandle() |
void |
fileRemoved()
The file does no longer exist.
|
void |
fileUpdated()
The file has been updated.
|
JabRefFrame |
frame() |
AbstractAutoCompleter |
getAutoCompleter(java.lang.String fieldName) |
java.util.HashMap<java.lang.String,AbstractAutoCompleter> |
getAutoCompleters() |
EntryEditor |
getCurrentEditor() |
BibtexDatabase |
getDatabase() |
java.lang.String |
getEncoding() |
EntryEditor |
getEntryEditor(BibtexEntry entry)
Get an entry editor ready to edit the given entry.
|
java.io.File |
getFile()
Get the file where this database was last saved to or loaded from, if any.
|
java.lang.String |
getFileMonitorHandle() |
GroupSelector |
getGroupSelector() |
java.lang.String |
getKeysForSelection()
Get a String containing a comma-separated list of the bibtex keys
of the selected entries.
|
int |
getMode() |
BibtexEntry[] |
getSelectedEntries()
Get an array containing the currently selected entries.
|
BibtexEntry |
getShowing() |
SidePaneManager |
getSidePaneManager() |
void |
hideBottomComponent()
Removes the bottom component.
|
void |
highlightEntry(BibtexEntry be)
This method selects the given entry, and scrolls it into view in the table.
|
void |
insertEntry(BibtexEntry bibEntry)
This method is called from JabRefFrame when the user wants to
create a new entry.
|
boolean |
isBaseChanged() |
boolean |
isSaving() |
boolean |
isShowingEditor() |
boolean |
isShowingFilterSearch()
Query whether this BasePanel is in the mode where a filter search result is shown.
|
boolean |
isShowingFloatSearch()
Query whether this BasePanel is in the mode where a float search result is shown.
|
boolean |
isUpdatedExternally() |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents) |
void |
markBaseChanged() |
void |
markChangedOrUnChanged() |
void |
markNonUndoableBaseChanged() |
MetaData |
metaData() |
void |
moveFocusToEntryEditor() |
BibtexEntry |
newEntry(BibtexEntryType type)
This method is called from JabRefFrame when the user wants to
create a new entry.
|
void |
newEntryShowing(BibtexEntry entry)
Update the pointer to the currently shown entry in all cases where the user has
moved to a new entry, except when using Back and Forward commands.
|
void |
output(java.lang.String s) |
void |
preambleEditorClosing() |
JabRefPreferences |
prefs() |
void |
rebuildAllEntryEditors() |
void |
runCommand(java.lang.String _command)
This method is called from JabRefFrame is a database specific
action is requested by the user.
|
void |
saveDividerLocation()
Depending on whether a preview or an entry editor is showing, save the current
divider location in the correct preference setting.
|
void |
selectSingleEntry(int pos)
Selects a single entry, and scrolls the table to center it.
|
void |
setBackAndForwardEnabledState() |
void |
setBaseChanged(boolean baseChanged) |
void |
setEncoding(java.lang.String encoding) |
void |
setEntryEditorEnabled(boolean enabled) |
void |
setFileMonitorHandle(java.lang.String fileMonitorHandle) |
void |
setGroupMatcher( |
void |
setMode(int mode) |
void |
setNonUndoableChange(boolean nonUndoableChange) |
void |
setPreviewActive(boolean enabled)
Activates or deactivates the entry preview, depending on the argument.
|
void |
setSaving(boolean saving) |
void |
setSearchMatcher(SearchMatcher matcher) |
void |
setSelectionListenerEnabled(boolean enabled) |
void |
setUpdatedExternally(boolean b) |
void |
setupMainPanel() |
boolean |
showDeleteConfirmationDialog(int numberOfEntries) |
void |
showEntry(BibtexEntry be) |
void |
showEntryEditor(EntryEditor editor)
Sets the given entry editor as the bottom component in the split pane.
|
void |
showPreview(PreviewPanel preview)
Sets the given preview panel as the bottom component in the split panel.
|
void |
stopShowingGroup() |
void |
stopShowingSearchResults() |
void |
storeCurrentEdit()
If an entry editor is showing, make sure its currently focused field
stores its changes, if any.
|
void |
stringsClosing() |
void |
updateAllContentSelectors()
This method iterates through all existing entry editors in this
BasePanel, telling each to update all its instances of
FieldContentSelector.
|
void |
updateEntryEditorIfShowing() |
void |
updateEntryPreviewToRow(BibtexEntry e) |
void |
updatePreamble() |
void |
updateSearchManager() |
void |
updateStringDialog() |
void |
updateTableFont() |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int SHOWING_NOTHING
public static final int SHOWING_PREVIEW
public static final int SHOWING_EDITOR
public static final int WILL_SHOW_EDITOR
public CountingUndoManager undoManager
public MainTable mainTable
public MainTableFormat tableFormat
publicsearchFilterList
publicgroupFilterList
public RightClickMenu rcm
public java.util.HashMap<java.lang.String,EntryEditor> entryEditors
public boolean showingSearch
public boolean showingGroup
public boolean sortingBySearchResults
public boolean coloringBySearchResults
public boolean hidingNonHits
public boolean sortingByGroup
public boolean sortingByCiteSeerResults
public boolean coloringByGroup
public BasePanel(JabRefFrame frame)
frame
- The application window.public BasePanel(JabRefFrame frame, BibtexDatabase db, java.io.File file, MetaData metaData, java.lang.String encoding)
public boolean isBaseChanged()
public int getMode()
public void setMode(int mode)
public BibtexDatabase database()
public MetaData metaData()
public JabRefFrame frame()
public JabRefPreferences prefs()
public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
public void output(java.lang.String s)
public void runCommand(java.lang.String _command)
_command
- The name of the command to run.public BibtexEntry newEntry(BibtexEntryType type)
type
- The type of the entry to create.public void insertEntry(BibtexEntry bibEntry)
bibEntry
- The new entry.public void updateTableFont()
public void createMainTable()
public void setupMainPanel()
public void updateSearchManager()
public java.util.HashMap<java.lang.String,AbstractAutoCompleter> getAutoCompleters()
public AbstractAutoCompleter getAutoCompleter(java.lang.String fieldName)
public void addContentSelectorValuesToAutoCompleters()
public void addJournalListToAutoCompleter()
public void updatePreamble()
public void assureStringDialogNotEditing()
public void updateStringDialog()
public void updateEntryPreviewToRow(BibtexEntry e)
public void adjustSplitter()
public boolean entryEditorAllowsChange()
public void moveFocusToEntryEditor()
public boolean isShowingEditor()
public void showEntry(BibtexEntry be)
public EntryEditor getEntryEditor(BibtexEntry entry)
entry
- The entry to be edited.public EntryEditor getCurrentEditor()
public void showEntryEditor(EntryEditor editor)
editor
- The entry editor to add.public void showPreview(PreviewPanel preview)
preview
- The preview to show.public void hideBottomComponent()
public void highlightEntry(BibtexEntry be)
public void entryEditorClosing(EntryEditor editor)
editor
- The entry editor to close.public void ensureNotShowing(BibtexEntry be)
be
- a BibtexEntry
valuepublic void updateEntryEditorIfShowing()
public void storeCurrentEdit()
public void updateAllContentSelectors()
public void rebuildAllEntryEditors()
public void markBaseChanged()
public void markNonUndoableBaseChanged()
public void markChangedOrUnChanged()
public void selectSingleEntry(int pos)
pos
- Current position of entry to select.public void setSearchMatcher(SearchMatcher matcher)
public void setGroupMatcher(matcher)
public void stopShowingSearchResults()
public void stopShowingGroup()
public boolean isShowingFloatSearch()
public boolean isShowingFilterSearch()
public BibtexDatabase getDatabase()
public void preambleEditorClosing()
public void stringsClosing()
public void changeType(BibtexEntry entry, BibtexEntryType type)
public void changeType(BibtexEntryType type)
public void changeType(BibtexEntry[] bes, BibtexEntryType type)
public boolean showDeleteConfirmationDialog(int numberOfEntries)
public void autoGenerateKeysBeforeSaving()
public void setPreviewActive(boolean enabled)
enabled
- public void setSelectionListenerEnabled(boolean enabled)
public void saveDividerLocation()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void setEntryEditorEnabled(boolean enabled)
public java.lang.String fileMonitorHandle()
public void fileUpdated()
FileUpdateListener
fileUpdated
in interface FileUpdateListener
public void fileRemoved()
FileUpdateListener
fileRemoved
in interface FileUpdateListener
public void cleanUp()
public void setUpdatedExternally(boolean b)
public BibtexEntry[] getSelectedEntries()
public java.io.File getFile()
public java.lang.String getKeysForSelection()
public GroupSelector getGroupSelector()
public boolean isUpdatedExternally()
public java.lang.String getFileMonitorHandle()
public void setFileMonitorHandle(java.lang.String fileMonitorHandle)
public SidePaneManager getSidePaneManager()
public void setNonUndoableChange(boolean nonUndoableChange)
public void setBaseChanged(boolean baseChanged)
public void setSaving(boolean saving)
public boolean isSaving()
public BibtexEntry getShowing()
public void newEntryShowing(BibtexEntry entry)
entry
- The entry that is now to be shown.public void setBackAndForwardEnabledState()