Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
282,500
SeparatorWithText () { return mySeparatorComponent; }
getSeparator
282,501
GroupedElementsRenderer () { return renderer; }
getRenderer
282,502
AccessibleContext () { return myRendererComponent.getAccessibleContext(); }
getAccessibleContext
282,503
void (ListDataEvent e) { updateButtons(); }
intervalAdded
282,504
void (ListDataEvent e) { updateButtons(); }
intervalRemoved
282,505
void (ListDataEvent e) { updateButtons(); }
contentsChanged
282,506
void () { myRemoveAction = __ -> { ListUtil.removeSelectedItems(myList); updateButtons(); }; myUpAction = __ -> { ListUtil.moveSelectedItemsUp(myList); updateButtons(); }; myDownAction = __ -> { ListUtil.moveSelectedItemsDown(myList); updateButtons(); }; }
createActions
282,507
JComponent () { return myList; }
getComponent
282,508
void () { final CommonActionsPanel p = getActionsPanel(); if (p != null) { boolean someElementSelected; if (myList.isEnabled()) { final int index = myList.getSelectedIndex(); someElementSelected = 0 <= index && index < myList.getModel().getSize(); if (someElementSelected) { final boolean downEnable = myList.getMaxSelectionIndex() < myList.getModel().getSize() - 1; final boolean upEnable = myList.getMinSelectionIndex() > 0; final boolean editEnabled = myList.getSelectedIndices().length == 1; p.setEnabled(CommonActionsPanel.Buttons.EDIT, editEnabled); p.setEnabled(CommonActionsPanel.Buttons.UP, upEnable); p.setEnabled(CommonActionsPanel.Buttons.DOWN, downEnable); } else { p.setEnabled(CommonActionsPanel.Buttons.EDIT, false); p.setEnabled(CommonActionsPanel.Buttons.UP, false); p.setEnabled(CommonActionsPanel.Buttons.DOWN, false); } p.setEnabled(CommonActionsPanel.Buttons.ADD, true); } else { someElementSelected = false; p.setEnabled(CommonActionsPanel.Buttons.ADD, false); p.setEnabled(CommonActionsPanel.Buttons.UP, false); p.setEnabled(CommonActionsPanel.Buttons.DOWN, false); } p.setEnabled(CommonActionsPanel.Buttons.REMOVE, someElementSelected); updateExtraElementActions(someElementSelected); } }
updateButtons
282,509
ToolbarDecorator (int rowCount) { myList.setVisibleRowCount(rowCount); return this; }
setVisibleRowCount
282,510
boolean () { return myEditableModel != null || myList.getModel() instanceof EditableModel; }
isModelEditable
282,511
void () { RowsDnDSupport.install(myList, myEditableModel != null ? myEditableModel : (EditableModel)myList.getModel()); }
installDnDSupport
282,512
void (@Nullable @Nls String text) { String oldAccessibleName = null; if (accessibleContext != null) { oldAccessibleName = accessibleContext.getAccessibleName(); } if (text == null) { text = ""; } myText = text; myHighlightedRegions = new ArrayList<>(4); if ((accessibleContext != null) && !StringUtil.equals(accessibleContext.getAccessibleName(), oldAccessibleName)) { accessibleContext.firePropertyChange( AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, oldAccessibleName, accessibleContext.getAccessibleName()); } }
setText
282,513
String () { return myText; }
getText
282,514
void (@Nullable Icon icon) { myIcon = icon; updateDslVisualPaddings(); invalidate(); repaint(); }
setIcon
282,515
void (int startOffset, int endOffset, TextAttributes attributes) { addHighlighter(0, startOffset, endOffset, attributes); }
addHighlighter
282,516
void (int startIndex, int startOffset, int endOffset, TextAttributes attributes) { if (startOffset < 0) startOffset = 0; if (endOffset > myText.length()) endOffset = myText.length(); if (startOffset >= endOffset) return; if (myHighlightedRegions.isEmpty()){ myHighlightedRegions.add(new HighlightedRegion(startOffset, endOffset, attributes)); } else{ for(int i = startIndex; i < myHighlightedRegions.size(); i++){ HighlightedRegion hRegion = myHighlightedRegions.get(i); // must be before if (startOffset < hRegion.startOffset && endOffset <= hRegion.startOffset){ myHighlightedRegions.add(i, new HighlightedRegion(startOffset, endOffset, attributes)); break; } // must be after if (startOffset >= hRegion.endOffset){ if (i == myHighlightedRegions.size() - 1){ myHighlightedRegions.add(new HighlightedRegion(startOffset, endOffset, attributes)); break; } } // must be before and overlap if (startOffset < hRegion.startOffset) { if (endOffset < hRegion.endOffset){ myHighlightedRegions.add(i, new HighlightedRegion(startOffset, hRegion.startOffset, attributes)); myHighlightedRegions.add(i + 1, new HighlightedRegion(hRegion.startOffset, endOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); hRegion.startOffset = endOffset; } else if (endOffset == hRegion.endOffset){ myHighlightedRegions.remove(hRegion); myHighlightedRegions.add(i, new HighlightedRegion(startOffset, hRegion.startOffset, attributes)); myHighlightedRegions.add(i + 1, new HighlightedRegion(hRegion.startOffset, endOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); } else { // endOffset > hRegion.endOffset myHighlightedRegions.remove(hRegion); myHighlightedRegions.add(i, new HighlightedRegion(startOffset, hRegion.startOffset, attributes)); myHighlightedRegions.add(i + 1, new HighlightedRegion(hRegion.startOffset, hRegion.endOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); if (i < myHighlightedRegions.size() - 1){ addHighlighter(i + 1, hRegion.endOffset, endOffset, attributes); } else{ myHighlightedRegions.add(i + 2, new HighlightedRegion(hRegion.endOffset, endOffset, attributes)); } } break; } // must be after and overlap or full overlap if (startOffset < hRegion.endOffset){ int oldEndOffset = hRegion.endOffset; hRegion.endOffset = startOffset; if (endOffset < oldEndOffset){ myHighlightedRegions.add(i + 1, new HighlightedRegion(startOffset, endOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); myHighlightedRegions.add(i + 2, new HighlightedRegion(endOffset, oldEndOffset, hRegion.textAttributes)); if (startOffset == hRegion.startOffset){ myHighlightedRegions.remove(hRegion); } break; } if (endOffset == oldEndOffset){ myHighlightedRegions.add(i + 1, new HighlightedRegion(startOffset, oldEndOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); if (startOffset == hRegion.startOffset){ myHighlightedRegions.remove(hRegion); } break; } myHighlightedRegions.add(i + 1, new HighlightedRegion(startOffset, oldEndOffset, TextAttributes.merge(hRegion.textAttributes, attributes))); if (i < myHighlightedRegions.size() - 1){ addHighlighter(i + 1, oldEndOffset, endOffset, attributes); } else{ myHighlightedRegions.add(i + 2, new HighlightedRegion(hRegion.endOffset, endOffset, attributes)); } if (startOffset == hRegion.startOffset){ myHighlightedRegions.remove(hRegion); } break; } } } }
addHighlighter
282,517
void (int gap) { myIconTextGap = Math.max(gap, 2); }
setIconTextGap
282,518
int () { return myIconTextGap; }
getIconTextGap
282,519
void (Color bg) { myEnforcedBackground = bg; }
enforceBackgroundOutsideText
282,520
void (final boolean b) { myDoNotHighlight = b; }
setDoNotHighlight
282,521
void (Graphics g) { // determine color of background Color bgColor; Color fgColor; boolean paintHighlightsBackground; boolean paintHighlightsForeground; if (myIsSelected && (myHasFocus || myPaintUnfocusedSelection)) { bgColor = UIUtil.getTreeSelectionBackground(); fgColor = UIUtil.getTreeSelectionForeground(); paintHighlightsBackground = false; paintHighlightsForeground = false; } else { bgColor = myEnforcedBackground == null ? UIUtil.getTreeBackground() : myEnforcedBackground; fgColor = getForeground(); paintHighlightsBackground = isOpaque(); paintHighlightsForeground = true; } if (myDoNotHighlight) { paintHighlightsForeground = false; } // paint background int textOffset = getTextOffset(); int offset = textOffset; if (isOpaque()) { g.setColor(getBackground()); g.fillRect(0, 0, Math.max(0, textOffset - 2), getHeight()); g.setColor(bgColor); g.fillRect(Math.max(0, textOffset - 2), 0, getWidth(), getHeight()); } // paint icon if (myIcon != null) { int x = getIconOffset(); myIcon.paintIcon(this, g, x, (getHeight() - myIcon.getIconHeight()) / 2); } // paint text applyRenderingHints(g); FontMetrics defFontMetrics = getFontMetrics(getFont()); if (myText == null) { myText = ""; } // center text inside the component: final int yOffset = (getHeight() - defFontMetrics.getMaxAscent() - defFontMetrics.getMaxDescent()) / 2 + defFontMetrics.getMaxAscent(); if (myHighlightedRegions.isEmpty()){ g.setColor(fgColor); g.drawString(myText, textOffset, yOffset/*defFontMetrics.getMaxAscent()*/); } else{ int endIndex = 0; for (HighlightedRegion hRegion : myHighlightedRegions) { String text = myText.substring(endIndex, hRegion.startOffset); endIndex = hRegion.endOffset; // draw plain text if (!text.isEmpty()) { g.setColor(fgColor); g.setFont(defFontMetrics.getFont()); g.drawString(text, offset, yOffset/*defFontMetrics.getMaxAscent()*/); offset += getStringWidth(text, defFontMetrics); } Font regFont = getFont().deriveFont(hRegion.textAttributes.getFontType()); FontMetrics fontMetrics = getFontMetrics(regFont); text = myText.substring(hRegion.startOffset, hRegion.endOffset); // paint highlight background if (hRegion.textAttributes.getBackgroundColor() != null && paintHighlightsBackground) { g.setColor(hRegion.textAttributes.getBackgroundColor()); g.fillRect(offset, 0, getStringWidth(text, fontMetrics), fontMetrics.getHeight() + fontMetrics.getLeading()); } // draw highlight text if (hRegion.textAttributes.getForegroundColor() != null && paintHighlightsForeground) { g.setColor(hRegion.textAttributes.getForegroundColor()); } else { g.setColor(fgColor); } g.setFont(fontMetrics.getFont()); g.drawString(text, offset, yOffset/*fontMetrics.getMaxAscent()*/); // draw highlight underscored line if (hRegion.textAttributes.getEffectType() != null && hRegion.textAttributes.getEffectColor() != null) { g.setColor(hRegion.textAttributes.getEffectColor()); int y = yOffset/*fontMetrics.getMaxAscent()*/ + 2; LinePainter2D.paint((Graphics2D)g, offset, y, offset + getStringWidth(text, fontMetrics) - 1, y); } // draw highlight border if (hRegion.textAttributes.getEffectColor() != null && hRegion.textAttributes.getEffectType() == EffectType.BOXED) { g.setColor(hRegion.textAttributes.getEffectColor()); g.drawRect(offset, 0, getStringWidth(text, fontMetrics) - 1, fontMetrics.getHeight() + fontMetrics.getLeading() - 1); } offset += getStringWidth(text, fontMetrics); } String text = myText.substring(endIndex); if (!text.isEmpty()){ g.setColor(fgColor); g.setFont(defFontMetrics.getFont()); g.drawString(text, offset, yOffset/*defFontMetrics.getMaxAscent()*/); } } // paint border if (myIsSelected){ g.setColor(UIUtil.getTreeSelectionBorderColor()); UIUtil.drawDottedRectangle(g, textOffset - 2, 0, getWidth() - 1, getHeight() - 1); } super.paintComponent(g); }
paintComponent
282,522
void (Graphics g) { UISettings.setupAntialiasing(g); }
applyRenderingHints
282,523
int () { if (myIcon == null || isIconAtRight()) { return 2; } return myIcon.getIconWidth() + myIconTextGap; }
getTextOffset
282,524
int () { return isIconAtRight() ? getWidth() - myIcon.getIconWidth() : 0; }
getIconOffset
282,525
Dimension () { FontMetrics defFontMetrics = getFontMetrics(getFont()); int width = getTextOffset(); if (!myText.isEmpty()){ if (myHighlightedRegions.isEmpty()){ width += getStringWidth(myText, defFontMetrics); } else{ int endIndex = 0; for (HighlightedRegion hRegion : myHighlightedRegions) { width += getStringWidth(myText.substring(endIndex, hRegion.startOffset), defFontMetrics); endIndex = hRegion.endOffset; String text = getRegionText(hRegion); Font regFont = getFont().deriveFont(hRegion.textAttributes.getFontType()); FontMetrics fontMetrics = getFontMetrics(regFont); width += getStringWidth(text, fontMetrics); } width += getStringWidth(myText.substring(endIndex), defFontMetrics); } } int height = defFontMetrics.getHeight() + defFontMetrics.getLeading(); if (myIcon != null){ height = Math.max(myIcon.getIconHeight() + defFontMetrics.getLeading(), height); width += myIcon.getIconWidth(); } return new Dimension(width + 2, height); }
getPreferredSize
282,526
int (@Nls String text, FontMetrics fontMetrics) { return fontMetrics.stringWidth(text); }
getStringWidth
282,527
ArrayList<HighlightedRegion> () { return myHighlightedRegions; }
getHighlightedRegions
282,528
AccessibleContext () { if (accessibleContext == null) { accessibleContext = new AccessibleHighlightable(); } return accessibleContext; }
getAccessibleContext
282,529
boolean () { return myIconAtRight; }
isIconAtRight
282,530
void (boolean iconAtRight) { myIconAtRight = iconAtRight; updateDslVisualPaddings(); }
setIconAtRight
282,531
String () { return myText; }
getAccessibleName
282,532
AccessibleRole () { return AccessibleRole.LABEL; }
getAccessibleRole
282,533
void () { int left = myIcon == null || isIconAtRight() ? getTextOffset() : 0; putClientProperty(DslComponentProperty.VISUAL_PADDINGS, UnscaledGapsKt.UnscaledGaps(0, left, 0 ,0)); }
updateDslVisualPaddings
282,534
void (@NotNull JComponent c, boolean draggable) { c.putClientProperty(DRAGGABLE_MARKER, draggable ? Boolean.TRUE : null); }
setComponentDraggable
282,535
boolean (@NotNull Component c) { return c instanceof JComponent && ((JComponent)c).getClientProperty(DRAGGABLE_MARKER) == Boolean.TRUE; }
isComponentDraggable
282,536
boolean (@Nullable InputEvent event) { if (event == null || !UISettings.getInstance().getDndWithPressedAltOnly()) { return true; } return (event.getModifiers() & InputEvent.ALT_MASK) != 0; }
checkModifiers
282,537
void () { if (myGlassPane != null) { return; } UiNotifyConnector.installOn(myDragComponent, new Activatable() { @Override public void showNotify() { attach(); } @Override public void hideNotify() { detach(true); } }); Disposer.register(myParentDisposable, () -> stop()); }
start
282,538
void () { attach(); }
showNotify
282,539
void () { detach(true); }
hideNotify
282,540
void () { if (myDetachPostponed) { myDetachPostponed = false; return; } if (myStopped || myGlassPane != null) { return; } myGlassPane = IdeGlassPaneUtil.find(myDragComponent); myGlassPaneListenersDisposable = Disposer.newDisposable("myGlassPaneListeners"); Disposer.register(myParentDisposable, myGlassPaneListenersDisposable); myGlassPane.addMousePreprocessor(this, myGlassPaneListenersDisposable); myGlassPane.addMouseMotionPreprocessor(this, myGlassPaneListenersDisposable); KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this); }
attach
282,541
void () { myStopped = true; detach(false); }
stop
282,542
void (boolean canPostponeDetach) { if (canPostponeDetach && myDraggingNow) { myDetachPostponed = true; return; } if (myGlassPane != null) { Disposer.dispose(myGlassPaneListenersDisposable); myGlassPaneListenersDisposable = Disposer.newDisposable(); KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(this); myGlassPane = null; } }
detach
282,543
double () { return 2; }
getWeight
282,544
void (final MouseEvent e) { if (!canStartDragging(e) || ourLastDragHash == System.identityHashCode(e)) return; myPressPointScreen = new RelativePoint(e).getScreenPoint(); myPressedOnScreenPoint = new Point(myPressPointScreen); processMousePressed(e); ourLastDragHash = System.identityHashCode(e); }
mousePressed
282,545
void (final MouseEvent e) { if (myCancelled) { myCancelled = false; return; } if (myDraggingNow && !canFinishDragging(e)) { cancelDragging(); e.consume(); myPressedOnScreenPoint = null; myCancelled = false; return; } boolean wasDragging = myDraggingNow; myPressPointScreen = null; myDraggingNow = false; myDragJustStarted = false; if (wasDragging) { try { if (myDetachingMode) { processDragOutFinish(e); } else { processDragFinish(e, false); } } finally { myPressedOnScreenPoint = null; resetDragState(); e.consume(); if (myDetachPostponed) { myDetachPostponed = false; detach(false); } } } }
mouseReleased
282,546
void () { myDraggingNow = false; myDragJustStarted = false; myPressPointScreen = null; myDetachingMode = false; }
resetDragState
282,547
void (@NotNull MouseEvent e) { if (myPressPointScreen == null || myCancelled) return; final boolean deadZone = isWithinDeadZone(e); if (!myDraggingNow && !deadZone) { myDraggingNow = true; myDragJustStarted = true; } else if (myDraggingNow) { myDragJustStarted = false; } if (myDraggingNow && myPressPointScreen != null) { final Point draggedTo = new RelativePoint(e).getScreenPoint(); boolean dragOutStarted = false; if (!myDetachingMode) { if (isDragOut(e, draggedTo, (Point)myPressPointScreen.clone())) { myDetachingMode = true; processDragFinish(e, true); dragOutStarted = true; } } if (myDetachingMode) { processDragOut(e, draggedTo, (Point)myPressPointScreen.clone(), dragOutStarted); } else { processDrag(e, draggedTo, (Point)myPressPointScreen.clone()); } } }
mouseDragged
282,548
boolean (@NotNull MouseEvent me) { if (me.getButton() != MouseEvent.BUTTON1) return false; if (!myDragComponent.isShowing()) return false; Component component = me.getComponent(); if (NullableComponent.Check.isNullOrHidden(component)) return false; final Point dragComponentPoint = SwingUtilities.convertPoint(me.getComponent(), me.getPoint(), myDragComponent); return canStartDragging(myDragComponent, dragComponentPoint); }
canStartDragging
282,549
boolean (@NotNull JComponent dragComponent, @NotNull Point dragComponentPoint) { return true; }
canStartDragging
282,550
boolean (@NotNull MouseEvent me) { if (!myDragComponent.isShowing()) return false; Component component = me.getComponent(); if (NullableComponent.Check.isNullOrHidden(component)) return false; return canFinishDragging(myDragComponent, new RelativePoint(me)); }
canFinishDragging
282,551
boolean (@NotNull JComponent component, @NotNull RelativePoint point) { return true; }
canFinishDragging
282,552
void (@NotNull MouseEvent event) { }
processMousePressed
282,553
void () { }
processDragCancel
282,554
void (@NotNull MouseEvent event, boolean willDragOutStart) { }
processDragFinish
282,555
void (@NotNull MouseEvent event) { }
processDragOutFinish
282,556
void () { }
processDragOutCancel
282,557
boolean () { return myDragJustStarted; }
isDragJustStarted
282,558
boolean (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint) { return false; }
isDragOut
282,559
void (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint, boolean justStarted) { event.consume(); }
processDragOut
282,560
boolean (@NotNull MouseEvent e) { return myPressPointScreen.distance(e.getLocationOnScreen()) < getDragStartDeadzone(myPressedOnScreenPoint.getLocation(), e.getLocationOnScreen()); }
isWithinDeadZone
282,561
int (@NotNull Point pressedScreenPoint, @NotNull Point draggedScreenPoint) { return JBUI.scale(DRAG_START_DEADZONE); }
getDragStartDeadzone
282,562
void (final @NotNull MouseEvent e) { }
mouseMoved
282,563
boolean (@NotNull KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ESCAPE && e.getID() == KeyEvent.KEY_PRESSED) { return cancelDragging(); } return false; }
dispatchKeyEvent
282,564
boolean () { if (!myDraggingNow) return false; myCancelled = true; if (myDetachingMode) { processDragOutCancel(); } else { processDragCancel(); } resetDragState(); return true; }
cancelDragging
282,565
void (final AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e).canGoForward()); }
doUpdate
282,566
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
282,567
void (final @NotNull AnActionEvent e) { getHistory(e).forward(); }
actionPerformed
282,568
boolean (final Object obj) { return ComparableObjectCheck.equals(this, obj); }
equals
282,569
int () { return ComparableObjectCheck.hashCode(this, super.hashCode()); }
hashCode
282,570
Place (String name, Object value) { myPath.put(name, value); return this; }
putPath
282,571
Place (final String name, Object value) { final Place clone = new Place(); clone.myPath = (LinkedHashMap<String, Object>)myPath.clone(); clone.myPath.put(name, value); return clone; }
cloneForElement
282,572
void (final Place from) { myPath = (LinkedHashMap<String, Object>)from.myPath.clone(); }
copyFrom
282,573
boolean (final Place place) { if (myPath.size() >= place.myPath.size()) return false; final Iterator<String> thisIterator = myPath.keySet().iterator(); final Iterator<String> otherIterator = place.myPath.keySet().iterator(); while (thisIterator.hasNext()) { String thisKey = thisIterator.next(); String otherKey = otherIterator.next(); if (thisKey == null || !thisKey.equals(otherKey)) return false; final Object thisValue = myPath.get(thisKey); final Object otherValue = place.myPath.get(otherKey); if (thisValue == null || !thisValue.equals(otherValue)) return false; } return true; }
isMoreGeneralFor
282,574
ActionCallback (Object object, Place place, final boolean requestFocus) { if (object instanceof Navigator) { return ((Navigator)object).navigateTo(place, requestFocus); } return ActionCallback.DONE; }
goFurther
282,575
void (final Object object, final Place place) { if (object instanceof Navigator) { ((Navigator)object).queryPlace(place); } }
queryFurther
282,576
void () { if (isNavigatingNow()) return; final Place place = query(); pushPlace(place); }
pushQueryPlace
282,577
void (String name, Object value) { if (!canNavigateFor(name)) return; final Place checkPlace = getCheckPlace(name); if (checkPlace == null) return; pushPlace(checkPlace.cloneForElement(name, value)); }
pushPlaceForElement
282,578
void (Place place) { myRoot.navigateTo(place, false); }
navigateTo
282,579
void () { int next = findValid(-1); assert next != -1; goThere(next); }
back
282,580
int (int increment) { List<Place> places = new ArrayList<>(); int first; synchronized (this) { first = myCurrentPos + increment; for (int idx = first; idx >= 0 && idx < myHistory.size(); idx += increment) { places.add(myHistory.get(idx)); } } int index = ContainerUtil.indexOf(places, place -> myRoot.isValid(place)); return index == -1 ? -1 : first + index * increment; }
findValid
282,581
void (final int nextPos) { myNavigatedNow = true; final Place next = myHistory.get(nextPos); final Place from = getCurrent(); fireStarted(from, next); try { final ActionCallback callback = myRoot.navigateTo(next, false); assert callback != null; callback.doWhenDone(() -> { synchronized (this) { myCurrentPos = nextPos; } }).doWhenProcessed(() -> { myNavigatedNow = false; fireFinished(from, next); }); } catch (Throwable e) { myNavigatedNow = false; throw new RuntimeException(e); } }
goThere
282,582
boolean () { return myNavigatedNow; }
isNavigatingNow
282,583
boolean () { return findValid(-1) != -1; }
canGoBack
282,584
void () { int next = findValid(1); assert next != -1; goThere(next); }
forward
282,585
boolean () { return findValid(1) != -1; }
canGoForward
282,586
Place () { final Place result = new Place(); myRoot.queryPlace(result); return result; }
query
282,587
boolean (String pathElement) { if (isNavigatingNow()) return false; Place checkPlace = getCheckPlace(pathElement); return checkPlace != null && checkPlace.getPath(pathElement) != null; }
canNavigateFor
282,588
void (final HistoryListener listener, Disposable parent) { myListeners.add(listener); Disposer.register(parent, new Disposable() { @Override public void dispose() { myListeners.remove(listener); } }); }
addListener
282,589
void () { myListeners.remove(listener); }
dispose
282,590
void (Place from, Place to) { for (HistoryListener each : myListeners) { each.navigationStarted(from, to); } }
fireStarted
282,591
void (Place from, Place to) { for (HistoryListener each : myListeners) { each.navigationFinished(from, to); } }
fireFinished
282,592
void (final @NotNull AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e) != null); if (e.getPresentation().isEnabled()) { doUpdate(e); } }
update
282,593
void (final AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e).canGoBack()); }
doUpdate
282,594
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
282,595
void (final @NotNull AnActionEvent e) { getHistory(e).back(); }
actionPerformed
282,596
void (Graphics g) { final Icon icon = myIsSelected? mySelectedIcon : myIcon; if (icon != null) { final Graphics2D g2 = (Graphics2D)g; g2.setBackground(getBackground()); final AffineTransform savedTransform = g2.getTransform(); g2.scale(((double)getWidth()) / icon.getIconWidth(), ((double)getHeight()) / icon.getIconHeight()); icon.paintIcon(this, g2, 0, 0); g2.setTransform(savedTransform); } super.paintComponent(g); }
paintComponent
282,597
void (boolean isSelected) { myIsSelected = isSelected; this.revalidate(); this.repaint(); }
setSelected
282,598
void (JLabel labelToClip, JComponent componentToWatch) { componentToWatch.addComponentListener(new FilePathClipper(labelToClip, componentToWatch)); }
install
282,599
void (ComponentEvent e) { final String optimalTextForComponent = FilePathSplittingPolicy.SPLIT_BY_SEPARATOR.getOptimalTextForComponent(myFile, myLabelToClip, myComponentToWatch.getWidth()); myLabelToClip.setText(optimalTextForComponent); }
componentResized