Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
244,100 | void (MouseEvent e) { super.processMouseMotionEvent(e); } | processMouseMotionEvent |
244,101 | void (MouseEvent e) { super.processMouseEvent(e); } | processMouseEvent |
244,102 | int () { return JBUIScale.scale(350); } | MaxFullContentWidth |
244,103 | String () { return "width:" + MaxFullContentWidth() + "px;"; } | MaxFullContentWidthStyle |
244,104 | int () { return JBUIScale.scale(100); } | MinWidth |
244,105 | int () { return JBUIScale.scale(RawWidth); } | FixedWidth |
244,106 | int () { return JBUIScale.scale(RawWidth - 60); } | MaxWidth |
244,107 | String () { return "width:" + JBUIScale.scale(RawStyleWidth) + "px;"; } | MaxWidthStyle |
244,108 | BalloonLayoutConfiguration (@NotNull Notification notification, @NotNull BalloonLayoutData layoutData, boolean actions) { boolean hasTitle = notification.hasTitle(); boolean hasContent = notification.hasContent(); if (hasTitle && hasContent && actions) { return treeLines(); } if (hasContent && NotificationsManagerImpl.... | create |
244,109 | BalloonLayoutConfiguration (int topSpaceHeight, int bottomSpaceHeight) { return new BalloonLayoutConfiguration(iconPanelWidth, iconOffset, topSpaceHeight, titleContentSpaceHeight, contentActionsSpaceHeight, titleActionsSpaceHeight, bottomSpaceHeight, actionGap, null, 0, 0, 0); } | replace |
244,110 | BalloonLayoutConfiguration () { return new BalloonLayoutConfiguration(new JBDimension(10, 11), JBUIScale.scale(11), JBUIScale.scale(5), JBUIScale.scale(5), JBUIScale.scale(5), JBUIScale.scale(14)); } | twoLines |
244,111 | BalloonLayoutConfiguration () { return new BalloonLayoutConfiguration(new JBDimension(10, 7), JBUIScale.scale(7), JBUIScale.scale(3), JBUIScale.scale(7), 0, JBUIScale.scale(8)); } | treeLines |
244,112 | int () { return Math.max(myIcon.getIconHeight(), getTextHeight()); } | getIconHeight |
244,113 | int () { return myIcon.getIconWidth() + getTextWidth() + 5; } | getIconWidth |
244,114 | int () { if (myStrings != null) { Font font = StartupUiUtil.getLabelFont(); FontMetrics fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(font); return fontMetrics.getHeight() * myStrings.length; } else { return 0; } } | getTextHeight |
244,115 | int () { if (myStrings != null) { int width = 0; Font font = StartupUiUtil.getLabelFont(); FontMetrics fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(font); for (int i = 0; i < myStrings.length; i++) { String string = myStrings[i]; if (myMnemonic != null && i == myStrings.length-1) { string += " "+myMnemonic;... | getTextWidth |
244,116 | void (Component c, Graphics g, int x, int y) { // Draw icon int height = getIconHeight(); int iconHeight = myIcon.getIconHeight(); if (height > iconHeight) { myIcon.paintIcon(c, g, x, y + (height - iconHeight) / 2); } else { myIcon.paintIcon(c, g, x, y); } // Draw text if (myStrings != null) { Font font = StartupUiUtil... | paintIcon |
244,117 | AppIcon () { if (ourIcon == null) { if (GraphicsEnvironment.isHeadless() || GraphicsUtil.isRemoteEnvironment()) { ourIcon = new EmptyIcon(); } else if (SystemInfoRt.isMac) { ourIcon = new MacAppIcon(); } else if (StartupUiUtil.isXToolkit()) { ourIcon = new XAppIcon(); } else if (StartupUiUtil.isWaylandToolkit()) { ourI... | getInstance |
244,118 | void (IdeFrame frame) { requestFocus(frame == null ? null : SwingUtilities.getWindowAncestor(frame.getComponent())); } | requestFocus |
244,119 | void (@Nullable Window window) { } | requestFocus |
244,120 | void () { } | requestFocus |
244,121 | boolean (Project project, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { if (!isAppActive() && isProgressAppIconEnabled() && (myCurrentProcessId == null || myCurrentProcessId.equals(processId))) { return _setProgress(getIdeFrame(project), processId, scheme, value, isOk); } else { return ... | setProgress |
244,122 | boolean (Project project, Object processId) { if (isProgressAppIconEnabled()) { return _hideProgress(getIdeFrame(project), processId); } else { return false; } } | hideProgress |
244,123 | void (Project project, String text) { if (!isAppActive() && Registry.is("ide.appIcon.badge")) { _setOkBadge(getIdeFrame(project), false); _setTextBadge(getIdeFrame(project), text); } } | setErrorBadge |
244,124 | void (@Nullable Project project, boolean visible) { if (!isAppActive() && Registry.is("ide.appIcon.badge")) { _setTextBadge(getIdeFrame(project), null); _setOkBadge(getIdeFrame(project), visible); } } | setOkBadge |
244,125 | void (@Nullable Project project, boolean critical) { if (!isAppActive() && Registry.is("ide.appIcon.requestAttention")) { _requestAttention(getIdeFrame(project), critical); } } | requestAttention |
244,126 | boolean () { Application app = ApplicationManager.getApplication(); if (app == null || myAppListener != null) { return app != null && app.isActive(); } myAppListener = new ApplicationActivationListener() { @Override public void applicationActivated(@NotNull IdeFrame ideFrame) { JFrame frame; if (ideFrame instanceof JFr... | isAppActive |
244,127 | void (@NotNull IdeFrame ideFrame) { JFrame frame; if (ideFrame instanceof JFrame) { frame = (JFrame)ideFrame; } else { frame = ((ProjectFrameHelper)ideFrame).getFrame(); } if (isProgressAppIconEnabled()) { _hideProgress(frame, myCurrentProcessId); } _setOkBadge(frame, false); _setTextBadge(frame, null); } | applicationActivated |
244,128 | boolean () { return SystemProperties.getBooleanProperty("ide.appIcon.progress", true); } | isProgressAppIconEnabled |
244,129 | BufferedImage () { EDT.assertIsEdt(); try { if (myAppImage != null) return myAppImage; if (!Taskbar.isTaskbarSupported()) return null; Image appImage = Taskbar.getTaskbar().getIconImage(); if (appImage == null) return null; // [tav] expecting two resolution variants for the dock icon: 128x128, 256x256 appImage = MultiR... | getAppImage |
244,130 | void (@Nullable JFrame frame, String text) { EDT.assertIsEdt(); try { if (!Taskbar.isTaskbarSupported()) return; Taskbar.getTaskbar().setIconBadge(text); } catch (Exception e) { LOG.error(e); } } | _setTextBadge |
244,131 | void (@Nullable Window window) { EDT.assertIsEdt(); if (window != null) { window.toFront(); try { Desktop.getDesktop().requestForeground(false); } catch (Exception e) { LOG.error(e); } } else { requestFocus(); } } | requestFocus |
244,132 | void () { EDT.assertIsEdt(); try { Desktop.getDesktop().requestForeground(true); } catch (Exception e) { LOG.error(e); } } | requestFocus |
244,133 | void (@Nullable JFrame frame, boolean critical) { EDT.assertIsEdt(); try { if (!Taskbar.isTaskbarSupported()) return; Taskbar.getTaskbar().requestUserAttention(true, critical); } catch (Exception e) { LOG.error(e); } } | _requestAttention |
244,134 | boolean (@Nullable JFrame frame, Object processId) { EDT.assertIsEdt(); if (myCurrentProcessId != null && !myCurrentProcessId.equals(processId)) { return false; } BufferedImage appImage = getAppImage(); if (appImage == null) { return false; } setDockIcon(appImage); myProgressImagesCache.remove(myCurrentProcessId); myCu... | _hideProgress |
244,135 | void (@Nullable JFrame frame, boolean visible) { EDT.assertIsEdt(); BufferedImage appImage = getAppImage(); if (appImage == null) { return; } Pair<BufferedImage, Graphics2D> img = createAppImage(appImage); if (visible) { Icon okIcon = AllIcons.Mac.AppIconOk512; int w = img.first.getWidth(); if (w != 128) { okIcon = Ico... | _setOkBadge |
244,136 | boolean (@Nullable JFrame frame, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { EDT.assertIsEdt(); BufferedImage appImage = getAppImage(); if (appImage == null) return false; myCurrentProcessId = processId; if (myLastValue > value) return true; if (Math.abs(myLastValue - value) < 0.02d) ... | _setProgress |
244,137 | void (BufferedImage image) { try { if (!Taskbar.isTaskbarSupported()) return; Taskbar.getTaskbar().setIconImage(image); } catch (Exception e) { LOG.error(e); } } | setDockIcon |
244,138 | boolean (@Nullable JFrame frame, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { EDT.assertIsEdt(); myCurrentProcessId = processId; if (Math.abs(myLastValue - value) < 0.02d) { return true; } try { if (isValid(frame)) { Win7TaskBar.setProgress(frame, value, isOk); } } catch (Throwable e) ... | _setProgress |
244,139 | boolean (@Nullable JFrame frame, Object processId) { EDT.assertIsEdt(); if (myCurrentProcessId != null && !myCurrentProcessId.equals(processId)) { return false; } try { if (isValid(frame)) { Win7TaskBar.hideProgress(frame); } } catch (Throwable e) { LOG.error(e); } myCurrentProcessId = null; myLastValue = 0; return tru... | _hideProgress |
244,140 | void (@Nullable JFrame frame, String text) { EDT.assertIsEdt(); if (!isValid(frame)) { return; } WinDef.HICON icon = null; if (text != null) { try { int size = 16; BufferedImage image = UIUtil.createImage(frame.getRootPane(), size, size, BufferedImage.TYPE_INT_ARGB); Graphics2D g = image.createGraphics(); int shadowRad... | _setTextBadge |
244,141 | void (@Nullable JFrame frame, boolean visible) { EDT.assertIsEdt(); if (!isValid(frame)) { return; } WinDef.HICON icon = null; if (visible) { synchronized (Win7AppIcon.class) { if (myOkIcon == null) { try { BufferedImage image = ImageIO.read(Objects.requireNonNull(AppIcon.class.getResourceAsStream("/mac/appIconOk512.pn... | _setOkBadge |
244,142 | void (@Nullable JFrame frame, boolean critical) { EDT.assertIsEdt(); try { if (isValid(frame)) { Win7TaskBar.attention(frame); } } catch (Throwable e) { LOG.error(e); } } | _requestAttention |
244,143 | void (@Nullable Window window) { if (window != null) { if (window instanceof Frame) { ((Frame)window).setState(Frame.NORMAL); } try { // For SetForegroundWindow WinAPI method to 'steal' focus from other apps more reliably, it shouldn't be called immediately after // other window- or focus-related API methods (e.g. Brin... | requestFocus |
244,144 | boolean (@Nullable JFrame frame) { return frame != null && frame.isDisplayable(); } | isValid |
244,145 | boolean (@Nullable JFrame frame, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { return false; } | _setProgress |
244,146 | boolean (@Nullable JFrame frame, Object processId) { return false; } | _hideProgress |
244,147 | void (@Nullable JFrame frame, String text) {} | _setTextBadge |
244,148 | void (@Nullable JFrame frame, boolean visible) {} | _setOkBadge |
244,149 | void (@Nullable JFrame frame, boolean critical) { if (frame != null) X11UiUtil.requestAttention(frame); } | _requestAttention |
244,150 | void (Window window) { if (window != null) X11UiUtil.activate(window); } | requestFocus |
244,151 | boolean (@Nullable JFrame frame, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { return false; } | _setProgress |
244,152 | boolean (@Nullable JFrame frame, Object processId) { return false; } | _hideProgress |
244,153 | void (@Nullable JFrame frame, String text) {} | _setTextBadge |
244,154 | void (@Nullable JFrame frame, boolean visible) {} | _setOkBadge |
244,155 | void (@Nullable JFrame frame, boolean critical) { // TODO: perhaps, use // https://wayland.app/protocols/gtk-shell#gtk_surface1:request:request_focus } | _requestAttention |
244,156 | void (Window window) { if (window != null) window.toFront(); } | requestFocus |
244,157 | boolean (Project project, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) { return false; } | setProgress |
244,158 | boolean (Project project, Object processId) { return false; } | hideProgress |
244,159 | void (Project project, String text) { } | setErrorBadge |
244,160 | void (Project project, boolean visible) { } | setOkBadge |
244,161 | void (@Nullable Project project, boolean critical) { } | requestAttention |
244,162 | float (Unit unit) { return LEVEL.equals(unit) ? LEVEL_MAX_VALUE : PERCENT_MAX_VALUE; } | getMaxValue |
244,163 | void (MouseEvent e) { processMouse(e); } | mouseDragged |
244,164 | void (MouseEvent e) { processMouse(e); } | mousePressed |
244,165 | void (MouseEvent e) { updateBalloonText(); } | mouseEntered |
244,166 | void (MouseEvent e) { updateBalloonText(); } | mouseMoved |
244,167 | void (MouseEvent e) { if (myTooltipHint != null) { myTooltipHint.hide(); myTooltipHint = null; } } | mouseExited |
244,168 | void (ComponentEvent e) { setValue(getValue()); fireValueChanged(); repaint(); } | componentResized |
244,169 | void () { final Point point = myVertical ? new Point(0, myPointerValue) : new Point(myPointerValue, 0); myLabel.setText(myTitle + ": " + Unit.formatValue(myValue, myUnit)); if (myTooltipHint == null) { myTooltipHint = new LightweightHint(myLabel); myTooltipHint.setCancelOnClickOutside(false); myTooltipHint.setCancelOnO... | updateBalloonText |
244,170 | void (MouseEvent e) { super.processMouseMotionEvent(e); updateBalloonText(); } | processMouseMotionEvent |
244,171 | void (MouseEvent e) { int pointerValue = myVertical ? e.getY() : e.getX(); pointerValue = Math.max(pointerValue, OFFSET); int size = myVertical ? getHeight() : getWidth(); pointerValue = Math.min(pointerValue, size - 12); myPointerValue = pointerValue; myValue = pointerValueToValue(myPointerValue); repaint(); fireValue... | processMouse |
244,172 | void (Consumer<? super Integer> listener) { myListeners.add(listener); } | addListener |
244,173 | void () { for (Consumer<? super Integer> listener : myListeners) { listener.consume(myValue); } } | fireValueChanged |
244,174 | void (int value) { myPointerValue = valueToPointerValue(value); myValue = value; } | setValue |
244,175 | int () { return myValue; } | getValue |
244,176 | int (int pointerValue) { pointerValue -= OFFSET; final int size = myVertical ? getHeight() : getWidth(); float proportion = (size - 23) / 255f; return Math.round((pointerValue / proportion)); } | pointerValueToValue |
244,177 | int (int value) { final int size = myVertical ? getHeight() : getWidth(); float proportion = (size - 23) / 255f; return OFFSET + (int)(value * proportion); } | valueToPointerValue |
244,178 | Dimension () { return myVertical ? new Dimension(22, 100) : new Dimension(100, 22); } | getPreferredSize |
244,179 | Dimension () { return myVertical ? new Dimension(22, 50) : new Dimension(50, 22); } | getMinimumSize |
244,180 | void (String text) { //disable tooltips } | setToolTipText |
244,181 | void (Graphics g) { final Graphics2D g2d = (Graphics2D)g; if (myVertical) { g2d.setPaint(UIUtil.getGradientPaint(0f, 0f, Color.WHITE, 0f, getHeight(), Color.BLACK)); g.fillRect(7, 10, 12, getHeight() - 20); g.setColor(Gray._150); g.drawRect(7, 10, 12, getHeight() - 20); g.setColor(Gray._250); g.drawRect(8, 11, 10, getH... | paintComponent |
244,182 | void (Graphics2D g2d, int x, int y, boolean vertical) { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if (vertical) { y -= 6; Polygon arrowShadow = new Polygon(); arrowShadow.addPoint(x - 5, y + 1); arrowShadow.addPoint(x + 7, y + 7); arrowShadow.addPoint(x - 5, y + 13); g2d.... | drawKnob |
244,183 | void () { myLock.lock(); try { cancelCurrentAction(); clearUI(); } finally { myLock.unlock(); } } | resetState |
244,184 | Action (@NotNull @Nls String message) { return progress(message, true); } | progress |
244,185 | Action (@NotNull @Nls String message, boolean addProgressIconBelow) { myLock.lock(); try { cancelCurrentAction(); Action action = new Action(); myCurrentAction = action; invokeLater(() -> { clearUI(); if (addProgressIconBelow) { AsyncProcessIcon asyncProcessIcon = new AsyncProcessIcon(message); add(asyncProcessIcon, Bo... | progress |
244,186 | void () { if (myCurrentAction != null) { myCurrentAction.cancel(); myCurrentAction = null; } } | cancelCurrentAction |
244,187 | void () { myError = null; removeAll(); setVisible(false); refreshUI(); } | clearUI |
244,188 | void () { revalidate(); repaint(); } | refreshUI |
244,189 | void (@NlsContexts.DialogMessage @NotNull String message, @NotNull JBColor color, @Nullable Icon statusIcon) { removeAll(); setVisible(true); JBLabel label = new JBLabel(message); label .setText(HtmlChunk.tag("font").attr("color", "#" + ColorUtil.toHex(color)) .child(HtmlChunk.tag("left").addRaw(message)) .wrapWith("ht... | showMessage |
244,190 | void (@NotNull Runnable runnable) { ApplicationManager.getApplication().invokeLater(runnable, ModalityState.stateForComponent(this)); } | invokeLater |
244,191 | boolean () { // optional early check of action cancellation return myCompleted.compareAndSet(false, true) && !myCancelled; } | checkIsInProgressAndComplete |
244,192 | void () { myCancelled = true; } | cancel |
244,193 | void () { if (checkIsInProgressAndComplete()) { invokeLater(() -> { myLock.lock(); try { if (!myCancelled) { clearUI(); } } finally { myLock.unlock(); } }); } } | done |
244,194 | void (@NotNull @NlsContexts.DialogMessage String message) { showMessageOnce(message, false); } | doneWithResult |
244,195 | void (@Nullable @NlsContexts.DialogMessage String message) { showMessageOnce(message, true); } | failed |
244,196 | void (@Nullable @NlsContexts.DialogMessage String message, boolean isError) { if (checkIsInProgressAndComplete()) { invokeLater(() -> { myLock.lock(); try { if (!myCancelled) { JBColor color = isError ? JBColor.RED : JBColor.DARK_GRAY; Icon statusIcon = isError ? AllIcons.Actions.Lightning : AllIcons.General.Inspection... | showMessageOnce |
244,197 | void (boolean value) { WinFocusStealer stealer = ApplicationManager.getApplication().getService(WinFocusStealer.class); if (stealer != null && stealer.myEnabled) stealer.update(value); // the service is null on non-Windows machines } | setFocusStealingEnabled |
244,198 | void (boolean enabled) { UIUtil.invokeLaterIfNeeded(() -> { if (LOG.isDebugEnabled()) { LOG.debug("Setting focus stealing status to '" + enabled + "'"); } doUpdate(enabled); }); } | update |
244,199 | void (boolean enabled) { myUpdateScheduled = null; int targetTimeout = 0; if (!enabled) { targetTimeout = readRegistryTimeoutValue(); } int currentTimeout = readCurrentTimeoutValue(); if (currentTimeout != targetTimeout) { if (!writeCurrentTimeoutValue(targetTimeout)) { myUpdateScheduled = enabled; } } } | doUpdate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.