Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
246,300 | JBPopup () { return createPopup(DEFAULT_POPUP_SUPPLIER); } | createPopup |
246,301 | AbstractPopup (Supplier<? extends AbstractPopup> popupSupplier) { AbstractPopup popup = popupSupplier.get().init( myProject, myComponent, myPreferredFocusedComponent, myRequestFocus, myFocusable, myMovable, myDimensionServiceKey, myResizable, myTitle, myCallback, myCancelOnClickOutside, myListeners, myUseDimServiceForX... | createPopup |
246,302 | ComponentPopupBuilder (@NotNull Project project, @NotNull Condition<? super Project> condition) { myRequestFocus = condition.value(project); return this; } | setRequestFocusCondition |
246,303 | ComponentPopupBuilder (final @NotNull ActiveIcon icon) { myTitleIcon = icon; return this; } | setTitleIcon |
246,304 | ComponentPopupBuilder (final boolean enabled) { myCancelKeyEnabled = enabled; return this; } | setCancelKeyEnabled |
246,305 | ComponentPopupBuilder (final boolean byContent) { myLocateByContent = byContent; return this; } | setLocateByContent |
246,306 | ComponentPopupBuilder (final boolean within) { myPlaceWithinScreen = within; return this; } | setLocateWithinScreenBounds |
246,307 | ComponentPopupBuilder (final Dimension minSize) { myMinSize = minSize; return this; } | setMinSize |
246,308 | ComponentPopupBuilder (boolean stretchToOwnerWidth) { myStretchToOwnerWidth = stretchToOwnerWidth; return this; } | setStretchToOwnerWidth |
246,309 | ComponentPopupBuilder (boolean stretchToOwnerHeight) { myStretchToOwnerHeight = stretchToOwnerHeight; return this; } | setStretchToOwnerHeight |
246,310 | ComponentPopupBuilder (MaskProvider maskProvider) { myMaskProvider = maskProvider; return this; } | setMaskProvider |
246,311 | ComponentPopupBuilder (final float alpha) { myAlpha = alpha; return this; } | setAlpha |
246,312 | ComponentPopupBuilder (final boolean isInStack) { myInStack = isInStack; return this; } | setBelongsToGlobalPopupStack |
246,313 | ComponentPopupBuilder (final Object object) { if (myUserData == null) { myUserData = new ArrayList<>(); } myUserData.add(object); return this; } | addUserData |
246,314 | ComponentPopupBuilder (final boolean modal) { myModalContext = modal; return this; } | setModalContext |
246,315 | ComponentPopupBuilder (final Component @NotNull [] focusOwners) { myFocusOwners = focusOwners; return this; } | setFocusOwners |
246,316 | ComponentPopupBuilder (final @Nullable String text) { return setAdText(text, SwingConstants.LEFT); } | setAdText |
246,317 | ComponentPopupBuilder (@Nullable String text, int textAlignment) { myAd = text; myAdAlignment = textAlignment; return this; } | setAdText |
246,318 | ComponentPopupBuilder (@Nullable JComponent advertiser) { myAdvertiser = advertiser; return this; } | setAdvertiser |
246,319 | ComponentPopupBuilder (boolean show) { myShowShadow = show; return this; } | setShowShadow |
246,320 | ComponentPopupBuilder (boolean show) { myShowBorder = show; return this; } | setShowBorder |
246,321 | ComponentPopupBuilder (boolean b) { myNormalWindowLevel = b; return this; } | setNormalWindowLevel |
246,322 | ComponentPopupBuilder (Color color) { myBorderColor = color; return this; } | setBorderColor |
246,323 | ComponentPopupBuilder (@Nullable Runnable okHandler) { myOkHandler = okHandler; return this; } | setOkHandler |
246,324 | JComponent () { return myTree; } | getComponent |
246,325 | void (Consumer<? super T> callback) { myBuilder.setItemChosenCallback(() -> { TreePath path = myTree.getSelectionModel().getLeadSelectionPath(); T component = (T)path.getLastPathComponent(); if (component != null) { callback.consume(component); } }); } | setItemChosenCallback |
246,326 | void (Consumer<? super Set<T>> callback) { myBuilder.setItemChosenCallback(() -> { final Set<T> selection = new HashSet<>(); for (TreePath path : myTree.getSelectionModel().getSelectionPaths()) { Object component = path.getLastPathComponent(); if (component != null) { selection.add((T)component); } } if (!selection.isE... | setItemsChosenCallback |
246,327 | JScrollPane () { TreeUtil.expandAll(myTree); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); if (myTree.getSelectionCount() == 0) { myTree.setSelectionRow(0); } if (myTree.getRowCount() >= 20) { scrollPane.getViewport().setPreferred... | createScrollPane |
246,328 | void (MouseEvent e) { if (myIsEngaged) { final Point p = e.getPoint(); int index = myTree.getRowForLocation(p.x, p.y); myTree.setSelectionRow(index); } else { myIsEngaged = true; } } | mouseMoved |
246,329 | void (ActionEvent e) { Window popupWindow = SwingUtilities.windowForComponent(myContent); if (popupWindow != null) { myTimerTick++; if (myTimerTick < FADE_IN_TICKS) { popupWindow.setLocation(popupWindow.getLocation().x, popupWindow.getLocation().y - 2); } else if (myTimerTick > FADE_OUT_TICKS) { myPopup.cancel(); myFad... | actionPerformed |
246,330 | void (@NotNull LightweightWindowEvent event) { if (myFadeInTimer.isRunning()) { myFadeInTimer.stop(); } myFadeInTimer.removeActionListener(myFadeTracker); } | onClosed |
246,331 | JBPopup () { return myPopup; } | getPopup |
246,332 | void (final MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON3) { myPopup.cancel(); } else if (UIUtil.isActionClick(e)) { if (myActionListener != null) { myActionListener.actionPerformed(new ActionEvent(FramelessNotificationPopup.this, ActionEvent.ACTION_PERFORMED, null)); } } } | mouseClicked |
246,333 | void (MouseEvent e) { if (myFadeInTimer.isRunning()) { myFadeInTimer.stop(); } } | mouseEntered |
246,334 | void (MouseEvent e) { if (!myFadeInTimer.isRunning()) { myFadeInTimer.start(); } } | mouseExited |
246,335 | void () { super.addNotify(); ListenerUtil.addMouseListener(this, myMouseListener); } | addNotify |
246,336 | void () { super.removeNotify(); ListenerUtil.removeMouseListener(this, myMouseListener); } | removeNotify |
246,337 | Dimension () { if (myUseDefaultPreferredSize) { return myPreferredContentSize; } return super.getPreferredSize(); } | getPreferredSize |
246,338 | void () { updateSpeedSearchColors(false); onSpeedSearchPatternChanged(); mySpeedSearchPatternField.setText(getFilter()); if (!mySpeedSearchAlwaysShown) { if (isHoldingFilter() && !searchFieldShown) { setHeaderComponent(mySpeedSearchPatternField); searchFieldShown = true; } else if (!isHoldingFilter() && searchFieldShow... | update |
246,339 | void () { updateSpeedSearchColors(true); } | noHits |
246,340 | void (boolean error) { JBTextField textEditor = mySpeedSearchPatternField.getTextEditor(); if (ExperimentalUI.isNewUI()) { textEditor.setForeground(error ? NamedColorUtil.getErrorForeground() : UIUtil.getLabelForeground()); } else { textEditor.setBackground(error ? LightColors.RED : UIUtil.getTextFieldBackground()); } ... | updateSpeedSearchColors |
246,341 | void (@NonNls @NotNull String message, State @NotNull ... states) { if (LOG.isDebugEnabled()) { LOG.debug(hashCode() + " - " + message); if (!ApplicationManager.getApplication().isDispatchThread()) { LOG.debug("unexpected thread"); } for (State state : states) { if (state == myState) { return; } } LOG.debug(new Illegal... | debugState |
246,342 | AbstractPopup (Project project, @NotNull JComponent component, @Nullable JComponent preferredFocusedComponent, boolean requestFocus, boolean focusable, boolean movable, String dimensionServiceKey, boolean resizable, @NlsContexts.PopupTitle @Nullable String caption, @Nullable Computable<Boolean> callback, boolean cancel... | init |
246,343 | Color () { return JBUI.CurrentTheme.Popup.headerBackground(true); } | getBackground |
246,344 | void (boolean active) { boolean value = myHeaderAlwaysFocusable || active; if (myCaption != null) { myCaption.setActive(value); } myPopupBorder.setActive(value); myContent.repaint(); } | setWindowActive |
246,345 | MyContentPanel (final boolean resizable, @NotNull PopupBorder border, boolean isToDrawMacCorner) { return new MyContentPanel(border); } | createContentPanel |
246,346 | void (boolean show) { final Window ancestor = getContentWindow(myComponent); if (ancestor instanceof RootPaneContainer) { final JRootPane rootPane = ((RootPaneContainer)ancestor).getRootPane(); if (rootPane != null) { rootPane.putClientProperty(SHOW_HINTS, show); } } } | setShowHints |
246,347 | String () { return myDimensionServiceKey; } | getDimensionServiceKey |
246,348 | void (final @Nullable String dimensionServiceKey) { myDimensionServiceKey = dimensionServiceKey; } | setDimensionServiceKey |
246,349 | void (@NotNull @NlsContexts.PopupAdvertisement String s) { setAdText(s, SwingConstants.LEFT); } | setAdText |
246,350 | PopupBorder () { return myPopupBorder; } | getPopupBorder |
246,351 | void (@NotNull @NlsContexts.PopupAdvertisement String s, int alignment) { JLabel label; if (myAdComponent == null || !(myAdComponent instanceof JLabel)) { label = HintUtil.createAdComponent(s, JBUI.CurrentTheme.Advertiser.border(), alignment); setFooterComponent(label); } else { label = (JLabel)myAdComponent; } Dimensi... | setAdText |
246,352 | void (JComponent c) { if (myAdComponent != null) { myContent.remove(myAdComponent); } myContent.add(c, BorderLayout.SOUTH); pack(false, true); myAdComponent = c; } | setFooterComponent |
246,353 | Point (@NotNull Component aContainer, @NotNull JComponent content) { return getCenterOf(aContainer, content.getPreferredSize()); } | getCenterOf |
246,354 | Point (@NotNull Component aContainer, @NotNull Dimension contentSize) { final JComponent component = getTargetComponent(aContainer); Rectangle visibleBounds = component != null ? component.getVisibleRect() : new Rectangle(aContainer.getSize()); Point containerScreenPoint = visibleBounds.getLocation(); SwingUtilities.co... | getCenterOf |
246,355 | void (@NotNull Project project) { if (UiInterceptors.tryIntercept(this)) return; Window window = null; WindowManagerEx manager = getWndManager(); if (manager != null) { window = getTargetWindow(manager.getFocusedComponent(project)); } if (window == null) { window = KeyboardFocusManager.getCurrentKeyboardFocusManager().... | showCenteredInCurrentWindow |
246,356 | Window (Component component) { Window res = null; while (component != null) { if (component instanceof FloatingDecorator fd) { return fd; } Component parent = component.getParent(); if (component instanceof Window w) { if (ModalityHelper.isModalBlocked(w)) break; res = w; } component = parent; } return res; } | getTargetWindow |
246,357 | void (@NotNull Component aComponent) { HelpTooltip.setMasterPopup(aComponent, this); Point popupPoint = getCenterOf(aComponent, getPreferredContentSize()); show(aComponent, popupPoint.x, popupPoint.y, false); } | showInCenterOf |
246,358 | void (@NotNull Component aComponent) { showUnderneathOf(aComponent, true); } | showUnderneathOf |
246,359 | void (@NotNull Component aComponent, boolean useAlignment) { boolean isAlignmentUsed = ExperimentalUI.isNewUI() && Registry.is("ide.popup.align.by.content") && useAlignment && isComponentSupportsAlignment(aComponent); var point = isAlignmentUsed ? pointUnderneathOfAlignedHorizontally(aComponent) : defaultPointUnderneat... | showUnderneathOf |
246,360 | boolean (Component c) { if (!(c instanceof JComponent) || (c instanceof ActionButton) || (c instanceof ComboBoxWithWidePopup<?>)) { return false; } return true; } | isComponentSupportsAlignment |
246,361 | RelativePoint (@NotNull Component aComponent) { Point offset = new Point(JBUIScale.scale(2), 0); return new AnchoredPoint(AnchoredPoint.Anchor.BOTTOM_LEFT, aComponent, offset); } | defaultPointUnderneathOf |
246,362 | RelativePoint (@NotNull Component comp) { if (!(comp instanceof JComponent jcomp)) return defaultPointUnderneathOf(comp); Point offset = new Point(calcHorizontalAlignment(jcomp), 0); return new AnchoredPoint(AnchoredPoint.Anchor.BOTTOM_LEFT, comp, offset); } | pointUnderneathOfAlignedHorizontally |
246,363 | int (JComponent jcomp) { int componentLeftInset; if (jcomp instanceof PopupAlignableComponent pac) { componentLeftInset = pac.getLeftGap(); } else { componentLeftInset = jcomp.getInsets().left; if (jcomp instanceof AbstractButton button) { Insets margin = button.getMargin(); if (margin != null) { componentLeftInset += ... | calcHorizontalAlignment |
246,364 | void (@NotNull Point screenPoint, @NotNull Component comp) { var componentScreen = ScreenUtil.getScreenRectangle(comp); if (screenPoint.x < componentScreen.x) { if (LOG.isDebugEnabled()) { LOG.debug("Moving the popup X coordinate from " + screenPoint.x + " to " + componentScreen.x + " to fit into the component screen "... | fitXToComponentScreen |
246,365 | void (@NotNull RelativePoint aPoint) { if (UiInterceptors.tryIntercept(this, aPoint)) return; HelpTooltip.setMasterPopup(aPoint.getOriginalComponent(), this); Point screenPoint = aPoint.getScreenPoint(); fitXToComponentScreen(screenPoint, aPoint.getComponent()); stretchContentToOwnerIfNecessary(aPoint.getOriginalCompon... | show |
246,366 | void (@NotNull Component owner, @NotNull Point point) { show(owner, point.x, point.y, false); } | showInScreenCoordinates |
246,367 | Point (@NotNull DataContext dataContext) { final Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor != null && editor.getComponent().isShowing()) { return getBestPositionFor(editor).getScreenPoint(); } return relativePointByQuickSearch(dataContext).getScreenPoint(); } | getBestPositionFor |
246,368 | void (@NotNull DataContext dataContext) { final Editor editor = CommonDataKeys.EDITOR_EVEN_IF_INACTIVE.getData(dataContext); if (editor != null && editor.getComponent().isShowing()) { showInBestPositionFor(editor); } else { show(relativePointByQuickSearch(dataContext)); } } | showInBestPositionFor |
246,369 | void () { final Component focused = getWndManager().getFocusedComponent(myProject); if (focused != null) { showInCenterOf(focused); } else { final WindowManager manager = WindowManager.getInstance(); final JFrame frame = myProject != null ? manager.getFrame(myProject) : manager.findVisibleFrame(); showInCenterOf(frame.... | showInFocusCenter |
246,370 | RelativePoint (@NotNull DataContext dataContext) { Rectangle dominantArea = PlatformDataKeys.DOMINANT_HINT_AREA_RECTANGLE.getData(dataContext); if (dominantArea != null) { final Component focusedComponent = getWndManager().getFocusedComponent(myProject); if (focusedComponent != null) { Window window = SwingUtilities.wi... | relativePointByQuickSearch |
246,371 | Dimension () { Dimension size = getSize(); if (size == null) { size = getStoredSize(); } if (size == null) { Dimension contentPreferredSize = myContent.getPreferredSize(); Dimension titlePreferredSize = getTitle().getPreferredSize(); size = new JBDimension(Math.max(contentPreferredSize.width, titlePreferredSize.width),... | getSizeForPositioning |
246,372 | void (@NotNull Editor editor) { // Intercept before the following assert; otherwise assertion may fail if (UiInterceptors.tryIntercept(this)) return; assert UIUtil.isShowing(editor.getContentComponent()) : "Editor must be showing on the screen"; // Set the accessible parent so that screen readers don't announce // a wi... | showInBestPositionFor |
246,373 | RelativePoint (@NotNull Editor editor) { if (editor instanceof EditorEx) { DataContext context = ((EditorEx)editor).getDataContext(); PopupLocator popupLocator = PlatformDataKeys.CONTEXT_MENU_LOCATOR.getData(context); if (popupLocator != null) { Point result = popupLocator.getPositionFor(this); if (result != null) retu... | getBestPositionFor |
246,374 | RelativePoint (@NotNull Editor editor) { RelativePoint preferredLocation = JBPopupFactory.getInstance().guessBestPopupLocation(editor); Dimension targetSize = getSizeForPositioning(); Point preferredPoint = preferredLocation.getScreenPoint(); Point result = getLocationAboveEditorLineIfPopupIsClippedAtTheBottom(preferre... | guessBestPopupLocation |
246,375 | RelativePoint (@NotNull Point screenPoint, @Nullable Component component) { if (component == null) { return RelativePoint.fromScreen(screenPoint); } SwingUtilities.convertPointFromScreen(screenPoint, component); return new RelativePoint(component, screenPoint); } | toRelativePoint |
246,376 | Point (@NotNull Point originalLocation, @NotNull Dimension popupSize, @NotNull Editor editor) { Rectangle preferredBounds = new Rectangle(originalLocation, popupSize); Rectangle adjustedBounds = new Rectangle(preferredBounds); ScreenUtil.moveRectangleToFitTheScreen(adjustedBounds); if (preferredBounds.y - adjustedBound... | getLocationAboveEditorLineIfPopupIsClippedAtTheBottom |
246,377 | RelativePoint (@NotNull JLayeredPane layeredPane, @NotNull Rectangle bounds) { Dimension size = getSizeForPositioning(); List<Supplier<Point>> optionsToTry = Arrays.asList(() -> new Point(bounds.x + bounds.width, bounds.y), () -> new Point(bounds.x - size.width, bounds.y)); for (Supplier<Point> option : optionsToTry) {... | relativePointWithDominantRectangle |
246,378 | Dimension () { if (myForcedSize != null) { return myForcedSize; } Dimension size = getStoredSize(); if (size != null) return size; return myComponent.getPreferredSize(); } | getPreferredContentSize |
246,379 | void (@Nullable InputEvent e) { setOk(true); myFinalRunnable = FunctionUtil.composeRunnables(myOkHandler, myFinalRunnable); cancel(e); } | closeOk |
246,380 | void () { InputEvent inputEvent = null; AWTEvent event = IdeEventQueue.getInstance().getTrueCurrentEvent(); if (event instanceof InputEvent ie && myPopup != null) { Window window = myPopup.getWindow(); if (window != null && UIUtil.isDescendingFrom(ie.getComponent(), window)) { inputEvent = ie; } } cancel(inputEvent); } | cancel |
246,381 | void (boolean requestFocus) { myRequestFocus = requestFocus; } | setRequestFocus |
246,382 | void (InputEvent e) { if (myState == State.CANCEL || myState == State.DISPOSE) { return; } debugState("cancel popup", State.SHOWN); myState = State.CANCEL; if (isDisposed()) return; if (LOG.isTraceEnabled()) LOG.trace(new Exception("cancel popup stack trace")); if (myPopup != null) { if (!canClose()) { debugState("cann... | cancel |
246,383 | void () { all.remove(this); if (myPopup != null) { resetWindow(); myPopup.hide(true); } myPopup = null; } | disposePopup |
246,384 | boolean () { return !anyModalWindowsKeepPopupOpen() && (myCallBack == null || myCallBack.compute().booleanValue()) && !preventImmediateClosingAfterOpening(); } | canClose |
246,385 | boolean () { // this is a workaround for X.Org bug https://gitlab.freedesktop.org/xorg/xserver/-/issues/1347 // it affects only non-override-redirect windows, hence the check for myNormalWindowLevel return UIUtil.isXServerOnWindows() && myNormalWindowLevel && IdeEventQueue.getInstance().getTrueCurrentEvent().getID() ==... | preventImmediateClosingAfterOpening |
246,386 | boolean () { if (myPopup == null) return false; Window window = myPopup.getWindow(); if (window != null && window.isShowing()) return true; if (LOG.isDebugEnabled()) LOG.debug("window hidden, popup's state: " + myState); return false; } | isVisible |
246,387 | void (final @NotNull Component owner) { stretchContentToOwnerIfNecessary(owner); show(owner, -1, -1, true); } | show |
246,388 | void (@NotNull Component owner, int aScreenX, int aScreenY, final boolean considerForcedXY) { if (UiInterceptors.tryIntercept(this)) return; if (ApplicationManager.getApplication() != null && ApplicationManager.getApplication().isHeadlessEnvironment()) return; if (isDisposed()) { throw new IllegalStateException("Popup ... | show |
246,389 | Component (Container aContainer, Component aComponent) { return getComponent(); } | getComponentAfter |
246,390 | Component () { return myPreferredFocusedComponent == null ? myComponent : myPreferredFocusedComponent; } | getComponent |
246,391 | Component (Container aContainer, Component aComponent) { return getComponent(); } | getComponentBefore |
246,392 | Component (Container aContainer) { return getComponent(); } | getFirstComponent |
246,393 | Component (Container aContainer) { return getComponent(); } | getLastComponent |
246,394 | Component (Container aContainer) { return getComponent(); } | getDefaultComponent |
246,395 | void () { myListeners.forEach(listener -> listener.beforeShown(new LightweightWindowEvent(this))); } | notifyListeners |
246,396 | void (Rectangle targetBounds) { Point topLeft = new Point(targetBounds.x, targetBounds.y); Point bottomRight = new Point((int)targetBounds.getMaxX(), (int)targetBounds.getMaxY()); Rectangle topLeftScreen = ScreenUtil.getScreenRectangle(topLeft); Rectangle bottomRightScreen = ScreenUtil.getScreenRectangle(bottomRight); ... | fitToVisibleArea |
246,397 | void () { _requestFocus(); } | focusPreferredComponent |
246,398 | void () { final Component c = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (c != null) { final DataContext context = DataManager.getInstance().getDataContext(c); final Project project = CommonDataKeys.PROJECT.getData(context); if (project != null) { myProjectDisposable = () -> { if (!isDisp... | installProjectDisposer |
246,399 | void (final @NotNull AbstractPopup popup) { if (popup.myCancelOnWindow) { popup.myCancelOnWindow = false; new Alarm(popup).addRequest(() -> popup.myCancelOnWindow = true, 100); } } | installWindowHook |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.