T
- List item type. Must implement equals()/hashCode()
correctly.public abstract class FinderRecursivePanel<T> extends OnePixelSplitter implements DataProvider, UserDataHolder, Disposable
Modifier and Type | Class and Description |
---|---|
protected static class |
FinderRecursivePanel.DisposablePanel
FinderRecursivePanel disposes right component on selection change if it is disposable. |
Splitter.DividerImpl, Splitter.DividerPositionStrategy, Splitter.LackOfSpaceStrategy
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
java.awt.Container.AccessibleAWTContainer
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
protected JBList<T> |
myList |
protected CollectionListModel<T> |
myListModel |
myDivider, myProportion, PROP_ORIENTATION, PROP_PROPORTION
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
protected |
FinderRecursivePanel(FinderRecursivePanel<?> parent) |
protected |
FinderRecursivePanel(Project project,
FinderRecursivePanel<?> parent,
java.lang.String groupId) |
protected |
FinderRecursivePanel(Project project,
java.lang.String groupId) |
Modifier and Type | Method and Description |
---|---|
protected javax.swing.JComponent |
createDefaultRightComponent() |
protected javax.swing.JComponent |
createLeftComponent() |
protected JBList<T> |
createList() |
protected javax.swing.ListCellRenderer<T> |
createListCellRenderer() |
protected javax.swing.JComponent |
createRightComponent(T t) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
protected void |
doCustomizeCellRenderer(SimpleColoredComponent comp,
javax.swing.JList list,
T value,
int index,
boolean selected,
boolean hasFocus) |
void |
doLayout() |
protected VirtualFile |
getContainingFile(T t)
To determine item list background color (if enabled).
|
protected AnAction[] |
getCustomListActions() |
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
protected int |
getFirstComponentPreferredSize() |
protected java.lang.String |
getGroupId() |
protected javax.swing.Icon |
getItemIcon(T t) |
protected abstract java.lang.String |
getItemText(T t) |
protected java.lang.String |
getItemTooltipText(T t)
Returns tooltip text for the given list item or null if no tooltip is available.
|
protected java.lang.String |
getListEmptyText() |
protected abstract java.util.List<T> |
getListItems()
Called in read action.
|
FinderRecursivePanel<?> |
getParentPanel() |
Project |
getProject() |
T |
getSelectedValue() |
<U> U |
getUserData(Key<U> key) |
protected abstract boolean |
hasChildren(T t) |
protected boolean |
hasFixedSizeListElements()
Whether this list contains "fixed size" elements.
|
void |
initPanel() |
protected boolean |
isDisposed() |
protected boolean |
isEditable() |
boolean |
isMergeListItemsRunning() |
protected boolean |
isNonBlockingLoad() |
protected boolean |
isRootPanel() |
protected void |
mergeListItems(CollectionListModel<T> listModel,
javax.swing.JList<? extends T> list,
java.util.List<? extends T> newItems) |
protected boolean |
performEditAction() |
<U> void |
putUserData(Key<U> key,
U value)
Add a new user data value to this object.
|
protected void |
setMergeListItemsRunning(boolean isListMergeRunning) |
protected void |
setNonBlockingLoad(boolean nonBlockingLoad) |
void |
updatePanel() |
void |
updateRightComponent(boolean force) |
void |
updateSelectedPath(java.lang.Object... pathToSelect)
Performs recursive update selecting given values.
|
createDivider, getBlindZone, init, setBlindZone
addNotify, getSplitterProportionKey, loadProportion, saveProportion, setAndLoadSplitterProportionKey, setProportion, setSplitterProportionKey
add, asComponent, getDivider, getDividerPositionStrategy, getDividerWidth, getFirstComponent, getLackOfSpaceStrategy, getMinimumSize, getMinProportion, getOrientation, getOtherComponent, getPreferredSize, getProportion, getProportionForFirstSize, getProportionForSecondSize, getSecondComponent, isHonorMinimumSize, isShowDividerControls, isShowDividerIcon, isVertical, isVisible, reshape, setAllowSwitchOrientationByMouseClick, setDividerPositionStrategy, setDividerWidth, setDragging, setFirstComponent, setHonorComponentsMinimumSize, setLackOfSpaceStrategy, setOrientation, setResizeEnabled, setSecondComponent, setShowDividerControls, setShowDividerIcon, skipNextLayout, swapComponents
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, 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, 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, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected final CollectionListModel<T> myListModel
protected FinderRecursivePanel(FinderRecursivePanel<?> parent)
protected FinderRecursivePanel(Project project, java.lang.String groupId)
protected FinderRecursivePanel(Project project, FinderRecursivePanel<?> parent, java.lang.String groupId)
protected boolean isNonBlockingLoad()
protected void setNonBlockingLoad(boolean nonBlockingLoad)
public void initPanel()
protected abstract java.util.List<T> getListItems()
protected java.lang.String getListEmptyText()
protected abstract java.lang.String getItemText(T t)
protected javax.swing.Icon getItemIcon(T t)
protected java.lang.String getItemTooltipText(T t)
This method is invoked by panel's list cell render in order to set a tooltip text for the list cell render component.
It is invoked before doCustomizeCellRenderer(SimpleColoredComponent, JList, Object, int, boolean, boolean)
,
thus the tooltip may still be reset in doCustomizeCellRenderer
.
t
- the list itemprotected abstract boolean hasChildren(T t)
protected VirtualFile getContainingFile(T t)
t
- Current item.protected boolean isEditable()
protected javax.swing.JComponent createRightComponent(T t)
protected javax.swing.JComponent createDefaultRightComponent()
protected javax.swing.JComponent createLeftComponent()
protected AnAction[] getCustomListActions()
protected boolean performEditAction()
protected javax.swing.ListCellRenderer<T> createListCellRenderer()
protected void doCustomizeCellRenderer(SimpleColoredComponent comp, javax.swing.JList list, T value, int index, boolean selected, boolean hasFocus)
protected boolean hasFixedSizeListElements()
public java.lang.Object getData(java.lang.String dataId)
DataProvider
PlatformDataKeys
class.getData
in interface DataProvider
dataId
- the data identifier for which the value is requested.public <U> U getUserData(Key<U> key)
getUserData
in interface UserDataHolder
public <U> void putUserData(Key<U> key, U value)
UserDataHolder
putUserData
in interface UserDataHolder
public void dispose()
Disposable
dispose
in interface Disposable
dispose
in class Splitter
protected boolean isDisposed()
public T getSelectedValue()
public void updateSelectedPath(java.lang.Object... pathToSelect)
pathToSelect
- Values to select.public Project getProject()
public FinderRecursivePanel<?> getParentPanel()
protected java.lang.String getGroupId()
public void updatePanel()
protected void mergeListItems(CollectionListModel<T> listModel, javax.swing.JList<? extends T> list, java.util.List<? extends T> newItems)
public boolean isMergeListItemsRunning()
protected void setMergeListItemsRunning(boolean isListMergeRunning)
public void updateRightComponent(boolean force)
protected boolean isRootPanel()
protected int getFirstComponentPreferredSize()