Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
246,400 | void () { UiActivityMonitor.getInstance().addActivity(myActivityKey); } | addActivity |
246,401 | void () { UiActivityMonitor.getInstance().removeActivity(myActivityKey); } | removeActivity |
246,402 | void () { final MouseAdapter mouseAdapter = new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { Rectangle bounds = getBoundsOnScreen(myContent); if (bounds != null) { bounds.x -= 2; bounds.y -= 2; bounds.width += 4; bounds.height += 4; } if (bounds == null || !bounds.contains(e.getLocationOnScreen()... | prepareToShow |
246,403 | void (MouseEvent e) { Rectangle bounds = getBoundsOnScreen(myContent); if (bounds != null) { bounds.x -= 2; bounds.y -= 2; bounds.width += 4; bounds.height += 4; } if (bounds == null || !bounds.contains(e.getLocationOnScreen())) { cancel(); } } | mousePressed |
246,404 | void (final FocusEvent event) { setWindowActive(true); } | onFocusGained |
246,405 | void (final FocusEvent event) { setWindowActive(false); } | onFocusLost |
246,406 | void () { mySpeedSearch.reset(); } | onFieldCleared |
246,407 | void (@NotNull SearchTextField searchTextField, boolean isAlwaysShown) { JBTextField textField = searchTextField.getTextEditor(); if (ExperimentalUI.isNewUI()) { searchTextField.setBackground(JBUI.CurrentTheme.Popup.BACKGROUND); textField.setOpaque(false); textField.putClientProperty("TextFieldWithoutMargins", true); t... | customizeSearchFieldLook |
246,408 | void (Window window) { if (window == null) return; if (!window.isDisplayable() || !window.isShowing()) return; final WindowManagerEx wndManager = getWndManager(); if (wndManager == null) return; if (!wndManager.isAlphaModeEnabled(window)) return; if (myAlpha != myLastAlpha) { wndManager.setAlphaModeRatio(window, myAlph... | updateMaskAndAlpha |
246,409 | WindowManagerEx () { return ApplicationManager.getApplication() != null ? WindowManagerEx.getInstanceEx() : null; } | getWndManager |
246,410 | boolean () { return myContent == null; } | isDisposed |
246,411 | boolean () { if (ApplicationManager.getApplication() == null || !LoadingState.COMPONENTS_REGISTERED.isOccurred()) return true; StackingPopupDispatcher.getInstance().onPopupShown(this, myInStack); return true; } | beforeShow |
246,412 | void () { } | afterShow |
246,413 | void () { } | afterShowSync |
246,414 | boolean () { if (!myFocusable) return false; getFocusManager().doWhenFocusSettlesDown(() -> _requestFocus()); return true; } | requestFocus |
246,415 | void () { if (!myFocusable) return; JComponent toFocus = ObjectUtils.chooseNotNull(myPreferredFocusedComponent, mySpeedSearchAlwaysShown ? mySpeedSearchPatternField : null); if (toFocus != null) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> { if (!myDisposed) { IdeFocusManager.getGlobalInstance().r... | _requestFocus |
246,416 | IdeFocusManager () { if (myProject != null) { return IdeFocusManager.getInstance(myProject); } if (myOwner != null) { return IdeFocusManager.findInstanceByComponent(myOwner); } return IdeFocusManager.findInstance(); } | getFocusManager |
246,417 | JComponent (Component aComponent) { if (aComponent instanceof JComponent) { return (JComponent)aComponent; } if (aComponent instanceof RootPaneContainer) { return ((RootPaneContainer)aComponent).getRootPane(); } LOG.error("Cannot find target for:" + aComponent); return null; } | getTargetComponent |
246,418 | JComponent () { return myContent; } | getContent |
246,419 | void (@NotNull RelativePoint p) { if (isBusy()) return; setLocation(p, myPopup); } | setLocation |
246,420 | void (@NotNull RelativePoint p, @Nullable PopupComponent popup) { if (popup == null) return; final Window wnd = popup.getWindow(); assert wnd != null; wnd.setLocation(p.getScreenPoint()); } | setLocation |
246,421 | void (boolean width, boolean height) { if (!isVisible() || !width && !height || isBusy()) return; Dimension size = getSize(); Dimension prefSize = myContent.computePreferredSize(); Point location = !myLocateWithinScreen ? null : getLocationOnScreen(); Rectangle screen = location == null ? null : ScreenUtil.getScreenRec... | pack |
246,422 | JComponent () { return myComponent; } | getComponent |
246,423 | Project () { return myProject; } | getProject |
246,424 | void () { ThreadingAssertions.assertEventDispatchThread(); if (myState == State.SHOWN) { LOG.debug("shown popup must be cancelled"); cancel(); } if (myState == State.DISPOSE) { return; } debugState("dispose popup", State.INIT, State.CANCEL); myState = State.DISPOSE; if (myDisposed) { return; } myDisposed = true; if (LO... | dispose |
246,425 | void () { if (myWindow != null && getWndManager() != null) { getWndManager().resetWindow(myWindow); if (myWindowListener != null) { myWindow.removeWindowListener(myWindowListener); } if (myWindow instanceof RootPaneContainer container) { JRootPane root = container.getRootPane(); root.putClientProperty(KEY, null); if (r... | resetWindow |
246,426 | Dimension () { Dimension size = myContent.getSize(); JBInsets.removeFrom(size, myContent.getInsets()); return size; } | getContentSize |
246,427 | void () { if (myDimensionServiceKey != null) { getWindowStateService(getProjectDependingOnKey(myDimensionServiceKey)).putSize(myDimensionServiceKey, getContentSize()); } } | storeDimensionSize |
246,428 | void (final Point xy) { if (myDimensionServiceKey != null) { getWindowStateService(getProjectDependingOnKey(myDimensionServiceKey)).putLocation(myDimensionServiceKey, xy); } } | storeLocation |
246,429 | Dimension () { if (isPreferredSizeSet()) { Dimension setSize = getPreferredSize(); setPreferredSize(null); Dimension result = getPreferredSize(); setPreferredSize(setSize); return result; } return getPreferredSize(); } | computePreferredSize |
246,430 | void (@Nullable DataProvider dataProvider) { myDataProvider = dataProvider; } | setDataProvider |
246,431 | boolean () { return myCancelOnClickOutside; } | isCancelOnClickOutside |
246,432 | void (boolean cancelOnClickOutside) { myCancelOnClickOutside = cancelOnClickOutside; } | setCancelOnClickOutside |
246,433 | void (boolean movable) { myMovable = movable; if (!myMovable && myMoveListener != null) { final MyContentPanel saved = myContent; ListenerUtil.removeMouseListener(saved, myMoveListener); ListenerUtil.removeMouseMotionListener(saved, myMoveListener); myMoveListener = null; } if (myCaption != null && myMovable) { final W... | setIsMovable |
246,434 | void (final MouseEvent e) { if (e.isConsumed()) return; if (UIUtil.isCloseClick(e) && myCaption.isWithinPanel(e)) { cancel(); } else { super.mousePressed(e); } } | mousePressed |
246,435 | void (boolean cancelOnWindowDeactivation) { myCancelOnWindowDeactivation = cancelOnWindowDeactivation; } | setCancelOnWindowDeactivation |
246,436 | void (@Nullable MouseChecker checker) { myCancelOnMouseOutCallback = checker; if (checker != null && myMouseOutCanceller == null) { installMouseOutCanceller(); } else if (checker == null && myMouseOutCanceller != null && !myCancelOnWindow) { removeMouseOutCanceller(); } } | setCancelOnMouseOutCallback |
246,437 | void (boolean cancel) { myCancelOnWindow = cancel; if (cancel && myMouseOutCanceller == null) { installMouseOutCanceller(); } else if (!cancel && myMouseOutCanceller != null && myCancelOnMouseOutCallback == null) { removeMouseOutCanceller(); } } | setCancelOnOtherWindowOpen |
246,438 | void () { myMouseOutCanceller = new Canceller(); Toolkit.getDefaultToolkit().addAWTEventListener(myMouseOutCanceller, WINDOW_EVENT_MASK | MOUSE_EVENT_MASK | MOUSE_MOTION_EVENT_MASK); } | installMouseOutCanceller |
246,439 | void () { if (myMouseOutCanceller != null) { final Toolkit toolkit = Toolkit.getDefaultToolkit(); // it may happen, but have no idea how // http://www.jetbrains.net/jira/browse/IDEADEV-21265 if (toolkit != null) { toolkit.removeAWTEventListener(myMouseOutCanceller); } } myMouseOutCanceller = null; } | removeMouseOutCanceller |
246,440 | void (final AWTEvent event) { switch (event.getID()) { case WINDOW_ACTIVATED, WINDOW_GAINED_FOCUS -> { if (myCancelOnWindow && myPopup != null && isCancelNeeded((WindowEvent)event, myPopup.getWindow())) { ApplicationManager.getApplication().invokeLater(() ->cancel()); } } case MOUSE_ENTERED -> { if (withinPopup(event))... | eventDispatched |
246,441 | boolean (@NotNull AWTEvent event) { final MouseEvent mouse = (MouseEvent)event; Rectangle bounds = getBoundsOnScreen(myContent); return bounds != null && bounds.contains(mouse.getLocationOnScreen()); } | withinPopup |
246,442 | void (@NotNull Point screenPoint) { // do not update the bounds programmatically if the user moves or resizes the popup if (!isBusy()) setBounds(new Point(screenPoint), null); } | setLocation |
246,443 | Window (@NotNull Component content) { Window window = SwingUtilities.getWindowAncestor(content); if (window == null) { if (LOG.isDebugEnabled()) { LOG.debug("no window ancestor for " + content); } } return window; } | getContentWindow |
246,444 | Point () { Window window = getContentWindow(myContent); Point screenPoint = window == null ? new Point() : window.getLocation(); fixLocateByContent(screenPoint, false); Insets insets = myContent.getInsets(); if (insets != null) { screenPoint.x += insets.left; screenPoint.y += insets.top; } return screenPoint; } | getLocationOnScreen |
246,445 | void (final @NotNull Dimension size) { // do not update the bounds programmatically if the user moves or resizes the popup if (!isBusy()) { setBounds(null, new Dimension(size)); if (myPopup != null) Optional.ofNullable(getContentWindow(myContent)).ifPresent(Container::validate); // to adjust content size } } | setSize |
246,446 | int () { return myAdComponent != null ? myAdComponent.getPreferredSize().height + JBUIScale.scale(1) : 0; } | getAdComponentHeight |
246,447 | boolean () { return myAdComponent != null && myAdComponent.isVisible(); } | isAdVisible |
246,448 | Dimension () { if (myPopup != null) { final Window popupWindow = getContentWindow(myContent); if (popupWindow != null) { Dimension size = popupWindow.getSize(); size.height -= getAdComponentHeight(); return size; } } return myForcedSize; } | getSize |
246,449 | void () { if (myPopup == null || isBusy()) return; final Window popupWindow = getContentWindow(myContent); if (popupWindow == null) return; Rectangle bounds = popupWindow.getBounds(); ScreenUtil.moveRectangleToFitTheScreen(bounds); // calling #setLocation or #setSize makes the window move for a bit because of tricky co... | moveToFitScreen |
246,450 | void (@NotNull Rectangle bounds) { // do not update the bounds programmatically if the user moves or resizes the popup if (!isBusy()) setBounds(bounds.getLocation(), bounds.getSize()); } | setBounds |
246,451 | void (@NotNull Component owner) { if (myForcedSize != null) return; if (!myStretchToOwnerWidth && !myStretchToOwnerHeight) return; Dimension filledSize = myContent.getPreferredSize(); if (myStretchToOwnerWidth) filledSize.width = owner.getWidth(); if (myStretchToOwnerHeight) filledSize.height = owner.getHeight(); myCon... | stretchContentToOwnerIfNecessary |
246,452 | void (@Nullable Point location, @Nullable Dimension size) { if (size != null) size.height += getAdComponentHeight(); if (myPopup == null) { // store bounds to show popup later if (location != null) myForcedLocation = location; if (size != null) myForcedSize = size; } else { MyContentPanel content = myContent; if (conte... | setBounds |
246,453 | void (@NotNull @NlsContexts.PopupTitle String title) { if (myCaption instanceof TitlePanel titlePanel) { titlePanel.setText(title); } } | setCaption |
246,454 | void (@Nullable Icon icon) { if (myCaption instanceof TitlePanel titlePanel) { titlePanel.setRegularIcon(icon); titlePanel.setInactiveIcon(icon); } } | setCaptionIcon |
246,455 | void (boolean left) { if (myCaption instanceof TitlePanel titlePanel) { titlePanel.setHorizontalTextPosition(left ? SwingUtilities.RIGHT : SwingUtilities.LEFT); } } | setCaptionIconPosition |
246,456 | void () { assert myState == State.INIT; mySpeedSearchAlwaysShown = true; } | setSpeedSearchAlwaysShown |
246,457 | void (WindowEvent e) { updateMaskAndAlpha(myWindow); } | windowOpened |
246,458 | void (final WindowEvent e) { resetWindow(); cancel(); } | windowClosing |
246,459 | boolean () { return !myCancelOnClickOutside && !myCancelOnWindow; } | isPersistent |
246,460 | boolean () { return myNativePopup; } | isNativePopup |
246,461 | void (final boolean visible) { if (myPopup != null) { if (visible) { myPopup.show(); final Window window = getPopupWindow(); if (window != null && myRestoreWindowSize != null) { window.setSize(myRestoreWindowSize); myRestoreWindowSize = null; } } else { final Window window = getPopupWindow(); if (window != null) { myRe... | setUiVisible |
246,462 | Window () { return myPopup != null ? myPopup.getWindow() : null; } | getPopupWindow |
246,463 | void (@NotNull List<Object> userData) { myUserData = userData; } | setUserData |
246,464 | boolean () { return myModalContext; } | isModalContext |
246,465 | boolean () { if (myComponent != null && isFocused(new Component[]{SwingUtilities.getWindowAncestor(myComponent)})) { return true; } return isFocused(myFocusOwners); } | isFocused |
246,466 | boolean (Component @NotNull [] components) { Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (owner == null) return false; Window wnd = ComponentUtil.getWindow(owner); for (Component each : components) { if (each != null && SwingUtilities.isDescendingFrom(owner, each)) { Wind... | isFocused |
246,467 | boolean () { return myCancelKeyEnabled; } | isCancelKeyEnabled |
246,468 | void (boolean enabled) { myCancelKeyEnabled = enabled; } | setCancelKeyEnabled |
246,469 | CaptionPanel () { return myCaption; } | getTitle |
246,470 | void (JComponent c) { boolean doRevalidate = false; if (myHeaderComponent != null) { myHeaderPanel.remove(myHeaderComponent); myHeaderComponent = null; doRevalidate = true; } if (c != null) { myHeaderPanel.add(c, BorderLayout.CENTER); myHeaderComponent = c; if (isVisible()) { final Dimension size = myContent.getSize();... | setHeaderComponent |
246,471 | void (@NotNull @NlsContexts.Label String text) { myHeaderPanel.add(createWarning(text), BorderLayout.SOUTH); } | setWarning |
246,472 | JComponent (@NotNull @NlsContexts.Label String text) { JBLabel label = new JBLabel(text, UIUtil.getBalloonWarningIcon(), SwingConstants.CENTER); label.setOpaque(true); Color color = HintUtil.getInformationColor(); label.setBackground(color); label.setBorder(BorderFactory.createLineBorder(color, 3)); return label; } | createWarning |
246,473 | void (@NotNull JBPopupListener listener) { myListeners.add(0, listener); // last added first notified } | addListener |
246,474 | void (@NotNull JBPopupListener listener) { myListeners.remove(listener); } | removeListener |
246,475 | void () { } | onSpeedSearchPatternChanged |
246,476 | Component () { return myRequestorComponent; } | getOwner |
246,477 | void (Dimension size) { //todo: consider changing only the caption panel minimum size Dimension sizeFromHeader = calcHeaderSize(); if (size == null) { myMinSize = sizeFromHeader; } else { final int width = Math.max(size.width, sizeFromHeader.width); final int height = Math.max(size.height, sizeFromHeader.height); myMin... | setMinimumSize |
246,478 | Dimension () { return myMinSize != null ? myMinSize : calcHeaderSize(); } | getMinimumSize |
246,479 | void (boolean stretchToOwnerWidth) { myStretchToOwnerWidth = stretchToOwnerWidth; } | setStretchToOwnerWidth |
246,480 | void (boolean stretchToOwnerHeight) { myStretchToOwnerHeight = stretchToOwnerHeight; } | setStretchToOwnerHeight |
246,481 | Dimension () { Dimension sizeFromHeader = myHeaderPanel.getPreferredSize(); if (sizeFromHeader == null) { sizeFromHeader = myHeaderPanel.getMinimumSize(); } if (sizeFromHeader == null) { int minimumSize = myWindow.getFontMetrics(myHeaderPanel.getFont()).getHeight(); sizeFromHeader = new Dimension(minimumSize, minimumSi... | calcHeaderSize |
246,482 | void (Runnable okHandler) { myOkHandler = okHandler; } | setOkHandler |
246,483 | void (Runnable finalRunnable) { myFinalRunnable = finalRunnable; } | setFinalRunnable |
246,484 | void (boolean ok) { myOk = ok; } | setOk |
246,485 | void (@NotNull DataProvider dataProvider) { if (myContent != null) { myContent.setDataProvider(dataProvider); } } | setDataProvider |
246,486 | boolean (@NotNull KeyEvent e) { BooleanFunction<? super KeyEvent> handler = myKeyEventHandler; if (handler != null && handler.fun(e)) { return true; } if (isCloseRequest(e) && myCancelKeyEnabled && !mySpeedSearch.isHoldingFilter()) { if (mySpeedSearchFoundInRootComponent != null && mySpeedSearchFoundInRootComponent.isH... | dispatchKeyEvent |
246,487 | Dimension () { return myHeaderPanel.getPreferredSize(); } | getHeaderPreferredSize |
246,488 | Dimension () { return myAdComponent == null ? new Dimension(0,0) : myAdComponent.getPreferredSize(); } | getFooterPreferredSize |
246,489 | boolean (KeyEvent e) { if (e != null && e.getID() == KeyEvent.KEY_PRESSED) { KeymapManager keymapManager = KeymapManager.getInstance(); if (keymapManager != null) { Shortcut[] shortcuts = keymapManager.getActiveKeymap().getShortcuts(IdeActions.ACTION_EDITOR_ESCAPE); for (Shortcut shortcut : shortcuts) { if (shortcut in... | isCloseRequest |
246,490 | Point (@NotNull Point location, boolean save) { Dimension size = !myLocateByContent ? null : myHeaderPanel.getPreferredSize(); if (size != null) location.y -= save ? -size.height : size.height; return location; } | fixLocateByContent |
246,491 | boolean () { return myResizeListener != null && myResizeListener.isBusy() || myMoveListener != null && myMoveListener.isBusy(); } | isBusy |
246,492 | Component (Component component) { while (component != null) { if (component instanceof Window) return component; component = UIUtil.getParent(component); } return null; } | getFrameOrDialog |
246,493 | List<JBPopup> (final @NotNull Component component) { return ContainerUtil.filter(all.toStrongList(), popup -> { Component owner = popup.getOwner(); while (owner != null) { if (owner.equals(component)) { return true; } owner = owner.getParent(); } return false; }); } | getChildPopups |
246,494 | boolean () { return myState == State.INIT; } | canShow |
246,495 | Rectangle () { return myWindow.getBounds(); } | getConsumedScreenBounds |
246,496 | Window () { return myWindow.getOwner(); } | getUnderlyingWindow |
246,497 | void (@NotNull Runnable runnable, @NotNull Disposable parentDisposable) { myResizeListeners.add(runnable); Disposer.register(parentDisposable, () -> myResizeListeners.remove(runnable)); } | addResizeListener |
246,498 | boolean (@NotNull WindowEvent event, @Nullable Window popup) { Window window = event.getWindow(); // the activated or focused window return window == null || popup == null || !SwingUtilities.isDescendingFrom(window, popup) && (myFocusable || !SwingUtilities.isDescendingFrom(popup, window)); } | isCancelNeeded |
246,499 | WindowStateService (@Nullable Project project) { return project == null ? WindowStateService.getInstance() : WindowStateService.getInstance(project); } | getWindowStateService |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.