public class GroupSelector extends SidePaneComponent implements javax.swing.event.TreeSelectionListener, java.awt.event.ActionListener, ErrorMessageDisplay
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
javax.swing.AbstractAction |
clearHighlightAction |
close, panel, visible
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
GroupSelector(JabRefFrame frame,
SidePaneManager manager)
The first element for each group defines which field to use for the
quicksearch.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addGroups(GroupTreeNode newGroups,
javax.swing.undo.CompoundEdit ce)
Adds the specified node as a child of the current root.
|
void |
componentClosing()
Override this method if the component needs to make any changes before it
can close.
|
void |
componentOpening()
Override this method if the component needs to do any actions when
opening.
|
void |
concludeAssignment(javax.swing.undo.AbstractUndoableEdit undo,
GroupTreeNode node,
int assignedEntries) |
void |
concludeMoveGroup(javax.swing.undo.AbstractUndoableEdit undo,
GroupTreeNode node)
Concludes the moving of a group tree node by storing the specified
undo information, marking the change, and setting the status line.
|
java.util.Enumeration<javax.swing.tree.TreePath> |
getExpandedPaths() |
GroupsTree |
getGroupsTree() |
GroupTreeNode |
getGroupTreeRoot() |
javax.swing.tree.TreePath |
getSelectionPath() |
boolean |
moveNodeDown(GroupTreeNode node,
boolean checkSingleSelection) |
boolean |
moveNodeLeft(GroupTreeNode node,
boolean checkSingleSelection) |
boolean |
moveNodeRight(GroupTreeNode node,
boolean checkSingleSelection) |
boolean |
moveNodeUp(GroupTreeNode node,
boolean checkSingleSelection) |
void |
reportError(java.lang.String errorMessage)
This method is required by the ErrorMessageDisplay interface, and lets this class
serve as a callback for regular expression exceptions happening in DatabaseSearch.
|
void |
reportError(java.lang.String errorMessage,
java.lang.Exception exception)
This method is required by the ErrorMessageDisplay interface, and lets this class
serve as a callback for regular expression exceptions happening in DatabaseSearch.
|
void |
revalidateGroups()
Revalidate the groups tree (e.g.
|
void |
revalidateGroups(GroupTreeNode node)
Revalidate the groups tree (e.g.
|
void |
revalidateGroups(javax.swing.tree.TreePath[] selectionPaths,
java.util.Enumeration<javax.swing.tree.TreePath> expandedNodes)
Revalidate the groups tree (e.g.
|
void |
revalidateGroups(javax.swing.tree.TreePath[] selectionPaths,
java.util.Enumeration<javax.swing.tree.TreePath> expandedNodes,
GroupTreeNode node)
Revalidate the groups tree (e.g.
|
void |
setActiveBasePanel(BasePanel panel)
panel may be null to indicate that no file is currently open.
|
void |
setGroups(GroupTreeNode groupsRoot) |
void |
showMatchingGroups(BibtexEntry[] entries,
boolean requireAll)
Highlight all groups that contain any/all of the specified entries.
|
protected void |
showOverlappingGroups(java.util.List<BibtexEntry> matches)
Show groups that, if selected, would show at least one
of the entries found in the specified search.
|
void |
updateGroupContentIfEnabled(boolean deletion) |
void |
valueChanged(javax.swing.event.TreeSelectionEvent e) |
getActiveBasePanel, getMinimumSize, hideAway
getContent, getFrameIcon, getHeaderBackground, getTextForeground, getTitle, getToolBar, isSelected, setContent, setFrameIcon, setSelected, setTitle, setToolBar, updateUI
getAccessibleContext, getUI, getUIClassID, paramString, setUI
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, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, 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, 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 GroupSelector(JabRefFrame frame, SidePaneManager manager)
public void updateGroupContentIfEnabled(boolean deletion)
deletion
- != additionpublic void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
in interface javax.swing.event.TreeSelectionListener
public void revalidateGroups(javax.swing.tree.TreePath[] selectionPaths, java.util.Enumeration<javax.swing.tree.TreePath> expandedNodes)
node
- If this is non-null, the view is scrolled to make it visible.public void revalidateGroups(javax.swing.tree.TreePath[] selectionPaths, java.util.Enumeration<javax.swing.tree.TreePath> expandedNodes, GroupTreeNode node)
node
- If this is non-null, the view is scrolled to make it visible.public void revalidateGroups()
public void revalidateGroups(GroupTreeNode node)
node
- If this is non-null, the view is scrolled to make it visible.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void componentOpening()
SidePaneComponent
componentOpening
in class SidePaneComponent
public void componentClosing()
SidePaneComponent
componentClosing
in class SidePaneComponent
public void setGroups(GroupTreeNode groupsRoot)
public void addGroups(GroupTreeNode newGroups, javax.swing.undo.CompoundEdit ce)
public javax.swing.tree.TreePath getSelectionPath()
public boolean moveNodeUp(GroupTreeNode node, boolean checkSingleSelection)
node
- The node to movepublic boolean moveNodeDown(GroupTreeNode node, boolean checkSingleSelection)
node
- The node to movepublic boolean moveNodeLeft(GroupTreeNode node, boolean checkSingleSelection)
node
- The node to movepublic boolean moveNodeRight(GroupTreeNode node, boolean checkSingleSelection)
node
- The node to movepublic void concludeMoveGroup(javax.swing.undo.AbstractUndoableEdit undo, GroupTreeNode node)
undo
- Undo information for the move operation.node
- The node that has been moved.public void concludeAssignment(javax.swing.undo.AbstractUndoableEdit undo, GroupTreeNode node, int assignedEntries)
public GroupTreeNode getGroupTreeRoot()
public java.util.Enumeration<javax.swing.tree.TreePath> getExpandedPaths()
public void setActiveBasePanel(BasePanel panel)
setActiveBasePanel
in class SidePaneComponent
public void reportError(java.lang.String errorMessage)
reportError
in interface ErrorMessageDisplay
errorMessage
- public void reportError(java.lang.String errorMessage, java.lang.Exception exception)
reportError
in interface ErrorMessageDisplay
errorMessage
- exception
- Exception representing the error condition.public void showMatchingGroups(BibtexEntry[] entries, boolean requireAll)
protected void showOverlappingGroups(java.util.List<BibtexEntry> matches)
public GroupsTree getGroupsTree()