Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
282,600
void (ComponentEvent e) {}
componentHidden
282,601
void (ComponentEvent e) {}
componentMoved
282,602
void (ComponentEvent e) {}
componentShown
282,603
void (MouseEvent e) { setSelected(true); setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); }
mouseEntered
282,604
void (MouseEvent e) { setSelected(false); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
mouseExited
282,605
boolean (@NotNull MouseEvent e, int clickCount) { if (action != null) { action.run(); return true; } return false; }
onClick
282,606
JBCardLayout () { return (JBCardLayout)super.getLayout(); }
getLayout
282,607
Component (@NonNls String name, Component comp) { if (mySelectedIndex == -1) { mySelectedIndex = 0; } return super.add(name, comp); }
add
282,608
ActionCallback (String id, JBCardLayout.SwipeDirection direction) { final ActionCallback done = new ActionCallback(); getLayout().swipe(this, id, direction, () -> done.setDone()); return done; }
swipe
282,609
Component (Component comp) { throw new AddMethodIsNotSupportedException(); }
add
282,610
Component (Component comp, int index) { throw new AddMethodIsNotSupportedException(); }
add
282,611
void (Component comp, Object constraints) { throw new AddMethodIsNotSupportedException(); }
add
282,612
void (Component comp, Object constraints, int index) { throw new AddMethodIsNotSupportedException(); }
add
282,613
void (int index, Component component) { super.setComponentAt(index, component); component.addHierarchyListener(this); setInsets(component); revalidate(); repaint(); }
setComponentAt
282,614
void () { super.updateUI(); updateTabComponentLabelsFont(); }
updateUI
282,615
void () { int tabsCount = getTabCount(); for (int i = 0; i < tabsCount; i++) { Component tabComp = getTabComponentAt(i); if (tabComp instanceof JLabel) { tabComp.setFont(getFont()); } } }
updateTabComponentLabelsFont
282,616
void (int index, @NlsContexts.TabTitle String title) { super.setTitleAt(index, title); Component tabComponent = getTabComponentAt(index); if (tabComponent instanceof JLabel label) { if (Boolean.TRUE.equals(label.getClientProperty(LABEL_FROM_TABBED_PANE))) { label.setText(title); } } }
setTitleAt
282,617
void (int index) { super.setSelectedIndex(index); revalidate(); repaint(); }
setSelectedIndex
282,618
void (Component component) { if (component instanceof JComponent && myTabComponentInsets != null) { UIUtil.addInsets((JComponent)component, getInsetsForTabComponent()); } }
setInsets
282,619
Insets () { return myTabComponentInsets; }
getInsetsForTabComponent
282,620
void (@Nullable Insets tabInsets) { myTabComponentInsets = tabInsets; }
setTabComponentInsets
282,621
void (HierarchyEvent e) { repaint(); }
hierarchyChanged
282,622
void () { super.removeNotify(); if (!ScreenUtil.isStandardAddRemoveNotify(this)) { return; } for (int i = 0; i < getTabCount(); i++) { getComponentAt(i).removeHierarchyListener(this); } }
removeNotify
282,623
Graphics (Graphics graphics) { return JBSwingUtilities.runGlobalCGTransform(this, super.getComponentGraphics(graphics)); }
getComponentGraphics
282,624
void (FocusEvent e) { myOwner.repaint(); }
focusGained
282,625
void (FocusEvent e) { myOwner.repaint(); }
focusLost
282,626
void (@NotNull String defaultText) { myStatusTriggerText = defaultText; }
setTextToTriggerStatus
282,627
String () { return myStatusTriggerText; }
getStatusTriggerText
282,628
void (Graphics g) { if (!isFontSet()) { setFont(myOwner.getFont()); } paint(myOwner, g); }
paintStatusText
282,629
void () { setFont(myOwner.getFont()); }
resetFontToOwnerFont
282,630
boolean () { if (myDynamicStatus) { Object function = myOwner.getClientProperty(STATUS_VISIBLE_FUNCTION); if (function instanceof Predicate) { return ((Predicate<JTextComponent>)function).test(myOwner); } } return myOwner.getText().equals(myStatusTriggerText) && !myOwner.isFocusOwner(); }
isStatusVisible
282,631
Rectangle () { Rectangle b = myOwner.getBounds(); Insets insets = ObjectUtils.notNull(myOwner.getInsets(), JBInsets.emptyInsets()); Insets margin = ObjectUtils.notNull(myOwner.getMargin(), JBInsets.emptyInsets()); Insets ipad = getComponent().getIpad(); int left = insets.left + margin.left - ipad.left; int right = inse...
getTextComponentBound
282,632
Rectangle (@NotNull JComponent component, @NotNull Rectangle bounds) { Dimension size = component.getPreferredSize(); int width = Math.min(size.width, bounds.width); return component == getComponent() ? new Rectangle(bounds.x, bounds.y, width, bounds.height) : new Rectangle(bounds.x + bounds.width - width, bounds.y, wi...
adjustComponentBounds
282,633
Component (Component comp, int index) { Logger.getInstance(JBLayeredPane.class) .warn("Probably incorrect call - constraint as primitive integer will be used as index", new Throwable()); addImpl(comp, null, index); return comp; }
add
282,634
Dimension () { if (!isMinimumSizeSet()) return new Dimension(0, 0); return super.getMinimumSize(); }
getMinimumSize
282,635
boolean () { return myFullOverlayLayout; }
isFullOverlayLayout
282,636
void (boolean enabled) { myFullOverlayLayout = enabled; }
setFullOverlayLayout
282,637
void () { if (isFullOverlayLayout()) { int width = getWidth(); int height = getHeight(); for (int i = getComponentCount() - 1; i >= 0; i--) { getComponent(i).setBounds(0, 0, width, height); } } else { super.doLayout(); } }
doLayout
282,638
boolean () { for (Component component : getComponents()) { if (component.isVisible()) { return false; } } return true; }
isStatusVisible
282,639
void () { putClientProperty(ComponentUtil.NOT_IN_HIERARCHY_COMPONENTS, emptyText.getWrappedFragmentsIterable()); }
registerEmptyTextComponents
282,640
StatusText () { return emptyText; }
getEmptyText
282,641
JBPanelWithEmptyText (@Nls String str) { emptyText.setText(str); return this; }
withEmptyText
282,642
void (Graphics g) { super.paintComponent(g); emptyText.paint(this, g); }
paintComponent
282,643
void (Container parent) { if (parent instanceof JViewport viewport) { Component view = viewport.getView(); if (view != null) { Container grand = viewport.getParent(); if (grand instanceof JScrollPane) { doLayout((JScrollPane)grand, viewport, view); } else { super.layoutContainer(parent); } } } }
layoutContainer
282,644
Dimension (Container parent) { if (parent instanceof JViewport viewport) { Dimension size = getPreferredScrollableViewportSize(viewport.getView()); if (size != null) return size; // may be null for for tables or custom components } return new Dimension(); }
preferredLayoutSize
282,645
void (ContainerEvent e) { Component child = e.getChild(); if (child instanceof JBTable) { myEmptyText = ((ComponentWithEmptyText)child).getEmptyText(); myEmptyText.attachTo(JBViewport.this, child); } }
componentAdded
282,646
void (ContainerEvent e) { Component child = e.getChild(); if (child instanceof JBTable) { ((ComponentWithEmptyText)child).getEmptyText().attachTo(child); myEmptyText = null; } }
componentRemoved
282,647
void (Point p) { if (ScrollSettings.isDebugEnabled() && !p.equals(getViewPosition()) && !isInsideLogToolWindow()) { checkScrollingCapabilities(); } super.setViewPosition(p); }
setViewPosition
282,648
boolean () { Container parent1 = getParent(); if (parent1 instanceof JScrollPane) { Container parent2 = parent1.getParent(); if (parent2 instanceof JPanel) { Container parent3 = parent2.getParent(); if (parent3 instanceof JPanel) { return parent3.getClass().getName().startsWith("com.intellij.notification.EventLogToolWi...
isInsideLogToolWindow
282,649
void () { if (myPreviousNotification == null || myPreviousNotification.isExpired()) { if (!Boolean.TRUE.equals(isWindowBlitterAvailableFor(this))) { myPreviousNotification = notify("Scrolling: cannot use window blitter"); //NON-NLS } else { if (!Boolean.TRUE.equals(isTrueDoubleBufferingAvailableFor(this))) { myPrevious...
checkScrollingCapabilities
282,650
void (Component view) { super.setView(view); updateBorder(view); }
setView
282,651
Notification (@NlsContexts.NotificationContent String message) { Notification notification = NotificationGroupManager.getInstance().getNotificationGroup("scrolling-capabilities-debug") .createNotification(message, NotificationType.INFORMATION); notification.notify(null); Timer timer = new Timer(NOTIFICATION_TIMEOUT, ev...
notify
282,652
Color () { Color color = super.getBackground(); if (!myBackgroundRequested && EventQueue.isDispatchThread() && ScrollSettings.isBackgroundFromView()) { if (!isBackgroundSet() || color instanceof UIResource) { Component child = getView(); if (child != null) { try { myBackgroundRequested = true; return child.getBackgroun...
getBackground
282,653
LayoutManager () { return ourLayoutManager; }
createLayoutManager
282,654
Graphics (Graphics graphics) { return JBSwingUtilities.runGlobalCGTransform(this, super.getComponentGraphics(graphics)); }
getComponentGraphics
282,655
void (Graphics g) { myPaintingNow = true; if (myZoomer != null && myZoomer.isActive()) { myZoomer.paint(g); } else { super.paint(g); if (myEmptyText != null) { myEmptyText.paint(this, g); } } myPaintingNow = false; }
paint
282,656
void (Point at) { myZoomer = new ZoomingDelegate((JComponent)getView(), this); myZoomer.magnificationStarted(at); }
magnificationStarted
282,657
void (double magnification) { myZoomer.magnificationFinished(magnification); myZoomer = null; }
magnificationFinished
282,658
void (double magnification) { myZoomer.magnify(magnification); }
magnify
282,659
boolean () { return myPaintingNow; }
isPaintingNow
282,660
void (Rectangle bounds) { Component view = getView(); if (view instanceof JComponent && !isAutoscroll(bounds)) { JBInsets.addTo(bounds, getViewInsets((JComponent)view)); } if (bounds.width > getWidth()) bounds.width = getWidth(); if (bounds.height > getHeight()) bounds.height = getHeight(); super.scrollRectToVisible(bo...
scrollRectToVisible
282,661
boolean (Rectangle bounds) { if (bounds.x == -bounds.width || bounds.x == getWidth()) { if (bounds.y + bounds.height + bounds.y == getHeight()) { // Horizontal auto-scrolling: // /--- or ---\ // y y // /-width-! !-width-\ // ! ! ! ! // h ! ! h // e ! ! e // i ! ! i // g ! ! g // h ! ! h // t ! ! t // ! ! ! ! // \------...
isAutoscroll
282,662
boolean (JComponent view, boolean horizontal) { return (!SystemInfo.isMac || horizontal && ScrollSettings.isHorizontalGapNeededOnMac()) && (view instanceof JList || view instanceof JTree || (!SystemInfo.isMac && ScrollSettings.isGapNeededForAnyComponent())); }
isAlignmentNeeded
282,663
Insets (JComponent view) { Border border = view.getBorder(); if (border instanceof ViewBorder vb) { border = vb.myBorder; } return border == null ? null : border.getBorderInsets(view); }
getInnerInsets
282,664
Insets (JComponent view) { Border border = view.getBorder(); if (border instanceof ViewBorder vb) { Insets insets = JBInsets.emptyInsets(); vb.addViewInsets(view, insets); return insets; } return null; }
getViewInsets
282,665
void (JScrollPane pane, JViewport viewport, Component view) { updateBorder(view); Dimension actualSize = viewport.getSize(); Dimension extentSize = viewport.toViewCoordinates(actualSize); Dimension viewPreferredSize = view.getPreferredSize(); Dimension viewSize = new Dimension(viewPreferredSize); Point viewPosition = v...
doLayout
282,666
void (@Nullable Component view) { if (ScrollSettings.isNotSupportedYet(view)) return; if (view instanceof JComponent component) { Border border = component.getBorder(); if (border instanceof ViewBorder) return; // already set component.setBorder(border == null || border instanceof UIResource ? new ResourceViewBorder(bo...
updateBorder
282,667
Insets (Component view, Insets insets) { if (insets == null) { insets = JBInsets.emptyInsets(); } else { insets.set(0, 0, 0, 0); } if (myBorder != null) { Insets inner = myBorder.getBorderInsets(view); if (inner != null) insets.set(inner.top, inner.left, inner.bottom, inner.right); } if (view instanceof JComponent) { a...
getBorderInsets
282,668
void (Component view, Graphics g, int x, int y, int width, int height) { if (myBorder != null) { // additional insets are used inside a custom border myBorder.paintBorder(view, g, x, y, width, height); } }
paintBorder
282,669
void (JComponent view, Insets insets) { if (this == view.getBorder()) { JViewport viewport = ComponentUtil.getViewport(view); if (viewport != null) { JScrollPane pane = ComponentUtil.getScrollPane(viewport); if (pane != null) { boolean isOverlappingScrollBar = (pane instanceof JBScrollPane) && ((JBScrollPane)pane).isOv...
addViewInsets
282,670
String () { return "ViewBorder{" + "myInsets=" + myInsets + ", myBorder=" + myBorder + '}'; }
toString
282,671
Dimension (Component view) { if (view instanceof JList) return getPreferredScrollableViewportSize((JList)view); if (view instanceof JTree) return getPreferredScrollableViewportSize((JTree)view); if (view instanceof Scrollable) return ((Scrollable)view).getPreferredScrollableViewportSize(); if (view instanceof JComponen...
getPreferredScrollableViewportSize
282,672
Dimension (@NotNull JComponent view) { Dimension size = view.getPreferredSize(); if (size == null) return new Dimension(); JBInsets.removeFrom(size, getViewInsets(view)); return size; }
getPreferredSizeWithoutScrollBars
282,673
Dimension (@NotNull JList<?> list) { if (JList.class != getPreferredScrollableViewportSizeDeclaringClass(list)) { return list.getPreferredScrollableViewportSize(); // may be null } Dimension size = getPreferredSizeWithoutScrollBars(list); if (JList.VERTICAL != list.getLayoutOrientation()) return size; ListModel<?> mode...
getPreferredScrollableViewportSize
282,674
Dimension (@NotNull JTree tree) { if (JTree.class != getPreferredScrollableViewportSizeDeclaringClass(tree)) { return tree.getPreferredScrollableViewportSize(); // may be null } Dimension size = getPreferredSizeWithoutScrollBars(tree); int fixedHeight = tree.getRowHeight(); int modelRows = tree.getRowCount(); if (model...
getPreferredScrollableViewportSize
282,675
Color () { Color color = super.getBackground(); if (!myBackgroundRequested && EventQueue.isDispatchThread() && ScrollSettings.isBackgroundFromView()) { if (!isBackgroundSet() || color instanceof UIResource) { Component child = getViewport(); if (child != null) { try { myBackgroundRequested = true; return child.getBackg...
getBackground
282,676
boolean () { return myIsOverlappingScrollBar; }
isOverlappingScrollBar
282,677
void (boolean overlappingScrollBar) { boolean oldValue = myIsOverlappingScrollBar; myIsOverlappingScrollBar = overlappingScrollBar; if (oldValue != myIsOverlappingScrollBar) { revalidate(); repaint(); } }
setOverlappingScrollBar
282,678
Color (JScrollPane pane) { if (pane == null) return null; JViewport viewport = pane.getViewport(); if (viewport == null) return null; Component view = viewport.getView(); if (view == null) return null; return view.getBackground(); }
getViewBackground
282,679
void () { init(true); }
init
282,680
void (boolean setupCorners) { setLayout(new Layout()); if (setupCorners) { setupCorners(); } }
init
282,681
void () { setBorder(IdeBorderFactory.createBorder()); setCorner(UPPER_RIGHT_CORNER, new Corner()); setCorner(UPPER_LEFT_CORNER, new Corner()); setCorner(LOWER_RIGHT_CORNER, new Corner()); setCorner(LOWER_LEFT_CORNER, new Corner()); }
setupCorners
282,682
void (ScrollPaneUI ui) { super.setUI(ui); updateViewportBorder(); if (ui instanceof BasicScrollPaneUI) { try { Field field = BasicScrollPaneUI.class.getDeclaredField("mouseScrollListener"); field.setAccessible(true); Object value = field.get(ui); if (value instanceof MouseWheelListener oldListener) { MouseWheelListener...
setUI
282,683
void (JComponent statusComponent) { JComponent old = getStatusComponent(); this.statusComponent = statusComponent; if (statusComponent != null) { add(statusComponent, STATUS_COMPONENT); } else if (old != null) { remove(old); } firePropertyChange("statusComponent", old, statusComponent); revalidate(); repaint(); }
setStatusComponent
282,684
JComponent () { return statusComponent; }
getStatusComponent
282,685
void (MouseWheelEvent event) { boolean isScrollEvent = isScrollEvent(event); boolean isScrollPaneEvent = event.getSource() instanceof JScrollPane; if (isScrollEvent && isScrollPaneEvent) { JScrollPane pane = (JScrollPane)event.getSource(); if (Boolean.TRUE.equals(ClientProperty.get(pane, FORCE_HORIZONTAL_SCROLL))) { ev...
mouseWheelMoved
282,686
MouseWheelEvent (@NotNull MouseWheelEvent event) { return MouseEventAdapter.convert(event, (JComponent)event.getSource(), event.getID(), event.getWhen(), UIUtil.getAllModifiers(event) | InputEvent.SHIFT_DOWN_MASK, event.getX(), event.getY()); }
withShiftModifier
282,687
boolean () { return isOptimizedDrawingEnabledFor(getVerticalScrollBar()) && isOptimizedDrawingEnabledFor(getHorizontalScrollBar()); }
isOptimizedDrawingEnabled
282,688
boolean (JScrollBar bar) { return bar == null || !bar.isVisible() || (bar.isOpaque() && bar.isOptimizedDrawingEnabled()); }
isOptimizedDrawingEnabledFor
282,689
void () { if (getViewportBorder() instanceof ViewportBorder) { setViewportBorder(new ViewportBorder(myViewportBorderWidth >= 0 ? myViewportBorderWidth : 1)); } }
updateViewportBorder
282,690
ViewportBorder () { return new ViewportBorder(2); }
createIndentBorder
282,691
JScrollBar () { return new JBScrollBar(Adjustable.VERTICAL); }
createVerticalScrollBar
282,692
JScrollBar () { return new JBScrollBar(Adjustable.HORIZONTAL); }
createHorizontalScrollBar
282,693
JViewport () { return new JBViewport(); }
createViewport
282,694
boolean (@NotNull MouseEvent e, @NotNull JScrollBar bar) { if (e.getID() == MouseEvent.MOUSE_MOVED || e.getID() == MouseEvent.MOUSE_PRESSED) { ScrollBarUI ui = bar.getUI(); if (ui instanceof BasicScrollBarUI bui) { try { Rectangle rect = (Rectangle)ReflectionUtil.getDeclaredMethod(BasicScrollBarUI.class, "getThumbBound...
canBePreprocessed
282,695
void (MouseWheelEvent e) { boolean hasAbsoluteDelta = ScrollSettings.isPixelPerfectEnabled(); myScrollSource = hasAbsoluteDelta ? ScrollSource.TOUCHPAD : ScrollSource.MOUSE_WHEEL; myWheelRotation = e.getPreciseWheelRotation(); super.processMouseWheelEvent(e); myScrollSource = ScrollSource.UNKNOWN; }
processMouseWheelEvent
282,696
void (Graphics g) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); }
paintComponent
282,697
void (Component c, Graphics g, int x, int y, int width, int height) { updateColor(c); super.paintBorder(c, g, x, y, width, height); }
paintBorder
282,698
void (Component c) { if (!(c instanceof JScrollPane)) return; lineColor = getViewBackground((JScrollPane)c); }
updateColor
282,699
Alignment (JComponent component) { if (component != null) { Object property = component.getClientProperty(Alignment.class); if (property instanceof Alignment alignment) return alignment; Container parent = component.getParent(); if (parent instanceof JScrollPane pane) { if (component == pane.getColumnHeader()) { return...
get