public class NavBarPanel extends javax.swing.JPanel implements DataProvider, PopupOwner, Disposable, Queryable
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
Queryable.Contributor, Queryable.PrintInfo, Queryable.Util
Modifier and Type | Field and Description |
---|---|
protected Project |
myProject |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
NavBarPanel(Project project,
boolean docked) |
Modifier and Type | Method and Description |
---|---|
void |
addItem(NavBarItem item) |
void |
addNavBarItemFocusListener(java.awt.event.FocusListener l) |
void |
addNotify() |
protected boolean |
allowNavItemsFocus()
Navigation bar entry point to determine if the keyboard/focus behavior should be
compatible with screen readers.
|
void |
clearItems() |
protected NavBarModel |
createModel() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
protected void |
doubleClick(java.lang.Object object) |
void |
enter() |
void |
escape() |
protected void |
fireNavBarItemFocusGained(java.awt.event.FocusEvent e) |
protected void |
fireNavBarItemFocusLost(java.awt.event.FocusEvent e) |
java.awt.Point |
getBestPopupPosition() |
NavBarItem |
getContextObject() |
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
LightweightHint |
getHint() |
java.util.List<NavBarItem> |
getItems() |
NavBarModel |
getModel() |
NavBarUI |
getNavBarUI() |
NavBarPopup |
getNodePopup() |
java.awt.Dimension |
getPreferredSize() |
NavBarPresentation |
getPresentation() |
Project |
getProject() |
NavBarUpdateQueue |
getUpdateQueue() |
protected void |
hideHint(boolean ok) |
void |
installActions(int index,
NavBarItem component) |
boolean |
isDisposed() |
protected boolean |
isDisposeOnRemove() |
boolean |
isFocused() |
boolean |
isInFloatingMode() |
boolean |
isNodePopupActive() |
boolean |
isRebuildUiNeeded() |
void |
moveDown() |
void |
moveEnd() |
void |
moveHome() |
void |
moveLeft() |
void |
moveRight() |
void |
navigate() |
protected void |
navigateInsideBar(int sourceItemIndex,
java.lang.Object object) |
void |
putInfo(java.util.Map<java.lang.String,java.lang.String> info) |
void |
rebuildAndSelectItem(java.util.function.Function<java.util.List<NavBarItem>,java.lang.Integer> indexToSelectCallback,
boolean showPopup) |
void |
rebuildAndSelectTail(boolean requestFocus) |
void |
removeNavBarItemFocusListener(java.awt.event.FocusListener l) |
void |
removeNotify() |
void |
requestSelectedItemFocus() |
protected void |
scrollSelectionToVisible() |
void |
setContextComponent(java.awt.Component contextComponent) |
void |
setUI(javax.swing.plaf.PanelUI ui) |
void |
showHint(Editor editor,
DataContext dataContext) |
protected void |
updateItems() |
void |
updateState(boolean show) |
getAccessibleContext, getUI, getUIClassID, paramString, 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, getMinimumSize, 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, 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, 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, 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 Project myProject
public NavBarPanel(Project project, boolean docked)
protected boolean allowNavItemsFocus()
public boolean isFocused()
public void addNavBarItemFocusListener(java.awt.event.FocusListener l)
public void removeNavBarItemFocusListener(java.awt.event.FocusListener l)
protected void fireNavBarItemFocusGained(java.awt.event.FocusEvent e)
protected void fireNavBarItemFocusLost(java.awt.event.FocusEvent e)
protected NavBarModel createModel()
public NavBarPopup getNodePopup()
public boolean isNodePopupActive()
public LightweightHint getHint()
public NavBarPresentation getPresentation()
public void setContextComponent(java.awt.Component contextComponent)
public NavBarItem getContextObject()
public java.util.List<NavBarItem> getItems()
public void addItem(NavBarItem item)
public void clearItems()
public void setUI(javax.swing.plaf.PanelUI ui)
setUI
in class javax.swing.JPanel
public NavBarUpdateQueue getUpdateQueue()
public void escape()
public void enter()
public void moveHome()
public void navigate()
public void moveDown()
public void moveEnd()
public Project getProject()
public NavBarModel getModel()
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isDisposed()
protected void updateItems()
public void rebuildAndSelectItem(java.util.function.Function<java.util.List<NavBarItem>,java.lang.Integer> indexToSelectCallback, boolean showPopup)
public void rebuildAndSelectTail(boolean requestFocus)
public void requestSelectedItemFocus()
public void moveLeft()
public void moveRight()
protected void scrollSelectionToVisible()
public boolean isInFloatingMode()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public boolean isRebuildUiNeeded()
public void installActions(int index, NavBarItem component)
protected void doubleClick(java.lang.Object object)
protected void navigateInsideBar(int sourceItemIndex, java.lang.Object object)
protected void hideHint(boolean ok)
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 java.awt.Point getBestPopupPosition()
getBestPopupPosition
in interface PopupOwner
public void addNotify()
addNotify
in class javax.swing.JComponent
public void removeNotify()
removeNotify
in class javax.swing.JComponent
protected boolean isDisposeOnRemove()
public void updateState(boolean show)
public void showHint(Editor editor, DataContext dataContext)
public void putInfo(java.util.Map<java.lang.String,java.lang.String> info)
public NavBarUI getNavBarUI()