Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
245,000
int () { return hasShadow() ? myShadowSize : 0; }
getShadowBorderSize
245,001
Insets () { if (myShadowBorderProvider != null) { return myShadowBorderProvider.getInsets(); } return JBUI.insets(getShadowBorderSize()); }
getShadowBorderInsets
245,002
boolean () { return myShadowBorderProvider != null || myShadow && Registry.is("ide.balloon.shadowEnabled"); }
hasShadow
245,003
void (JLayeredPane pane) { show(pane, null); }
show
245,004
void (JComponent component) { final Dimension size = component.getSize(); show(new RelativePoint(component, new Point(size.width / 2, size.height / 2)), Balloon.Position.above); }
showInCenterOf
245,005
void (JLayeredPane pane, @Nullable Rectangle bounds) { if (bounds != null) { myForcedBounds = bounds; } show(new RelativePoint(pane, new Point(0, 0)), Balloon.Position.above); }
show
245,006
void (boolean forward, final JLayeredPane layeredPane, final @Nullable Runnable onDone) { if (myAnimator != null) { Disposer.dispose(myAnimator); } myAnimator = new Animator("Balloon", 8, isAnimationEnabled() ? myAnimationCycle : 0, false, forward) { @Override public void paintNow(final int frame, final int totalFrames...
runAnimation
245,007
void (final int frame, final int totalFrames, final int cycle) { if (component == null || component.getParent() == null || !isAnimationEnabled()) return; component.setAlpha((float)frame / totalFrames); }
paintNow
245,008
void () { if (component == null || component.getParent() == null) return; if (isForward()) { component.clear(); component.repaint(); myFadedIn = true; if (!myFadeoutAlarm.isDisposed()) { startFadeoutTimer((int)myFadeoutTime); } } else { layeredPane.remove(component); layeredPane.revalidate(); layeredPane.repaint(); } D...
paintCycleEnd
245,009
void () { super.dispose(); myAnimator = null; if (onDone != null) { onDone.run(); } }
dispose
245,010
void (int delay) { mySmartFadeout = true; mySmartFadeoutDelay = delay; Topics.subscribe(ApplicationActivationListener.TOPIC, this, new ApplicationActivationListener() { @Override public void applicationDeactivated(@NotNull IdeFrame ideFrame) { if (!myFadeoutAlarm.isEmpty()) { myFadeoutAlarm.cancelAllRequests(); mySmart...
startSmartFadeoutTimer
245,011
void (@NotNull IdeFrame ideFrame) { if (!myFadeoutAlarm.isEmpty()) { myFadeoutAlarm.cancelAllRequests(); mySmartFadeoutDelay = myFadeoutRequestDelay - (int)(System.currentTimeMillis() - myFadeoutRequestMillis); if (mySmartFadeoutDelay <= 0) { mySmartFadeoutDelay = 1; } } }
applicationDeactivated
245,012
void (final int fadeoutDelay) { if (fadeoutDelay > 0) { myFadeoutAlarm.cancelAllRequests(); myFadeoutRequestMillis = System.currentTimeMillis(); myFadeoutRequestDelay = fadeoutDelay; myFadeoutAlarm.addRequest(() -> { if (mySmartFadeout) { setAnimationEnabled(true); } hide(true); }, fadeoutDelay, null); } }
startFadeoutTimer
245,013
void (int radius) { myCornerRadius = radius; }
setCornerRadius
245,014
int () { if (myCornerRadius != -1) { return myCornerRadius; } return myDialogMode ? DIALOG_ARC.get() : ARC.get(); }
getArc
245,015
int (AbstractPosition position) { if (myPointerSize == null || myPointerSize.width <= 0) { if (myDialogMode) { return position.isTopBottomPointer() ? DIALOG_TOPBOTTOM_POINTER_WIDTH.get() : DIALOG_POINTER_WIDTH.get(); } else { return position.isTopBottomPointer() ? TOPBOTTOM_POINTER_WIDTH.get() : POINTER_WIDTH.get(); } ...
getPointerWidth
245,016
int () { return 3; }
getNormalInset
245,017
int (AbstractPosition position) { return myPointerSize == null || myPointerSize.height <= 0 ? getPointerLength(position, myDialogMode) : myPointerSize.height; }
getPointerLength
245,018
int (AbstractPosition position, boolean dialogMode) { if (dialogMode) { return position.isTopBottomPointer() ? DIALOG_TOPBOTTOM_POINTER_LENGTH.get() : DIALOG_POINTER_LENGTH.get(); } else { return position.isTopBottomPointer() ? TOPBOTTOM_POINTER_LENGTH.get() : POINTER_LENGTH.get(); } }
getPointerLength
245,019
int (@NotNull Position position, boolean dialogMode) { return getPointerLength(getAbstractPositionFor(position), dialogMode); }
getPointerLength
245,020
void () { hide(false); }
hide
245,021
void (boolean ok) { hideAndDispose(ok, false); }
hide
245,022
void () { hideAndDispose(false, false); }
dispose
245,023
void () { setAnimationEnabled(false); hideAndDispose(false, true); }
hideImmediately
245,024
void (boolean ok, boolean force) { if (isDisposed) { if (force) { disposeAnimationAndRemoveComponent(); } return; } if (isSmartFadeoutPaused) { isSmartFadeoutPaused = false; return; } isDisposed = true; hideComboBoxPopups(); Runnable disposeRunnable = () -> { myFadedOut = true; if (myRequestFocus) { if (myOriginalFocus...
hideAndDispose
245,025
void () { if (myAnimator != null) { Disposer.dispose(myAnimator); } if (component != null) { myLayeredPane.remove(component); myLayeredPane.revalidate(); myLayeredPane.repaint(); component = null; } }
disposeAnimationAndRemoveComponent
245,026
void () { for (JComboBox<?> box : ComponentUtil.findComponentsOfType(component, JComboBox.class)) { box.hidePopup(); } }
hideComboBoxPopups
245,027
void () { }
onDisposed
245,028
void (@NotNull JBPopupListener listener) { myListeners.add(listener); }
addListener
245,029
boolean () { return myVisible; }
isVisible
245,030
void (boolean hideOnMouse) { myHideOnMouse = hideOnMouse; }
setHideOnClickOutside
245,031
void (@NotNull Runnable listener) { myHideListener = listener; myHideOnMouse = true; }
setHideListener
245,032
void (boolean zeroPositionInLayer) { myZeroPositionInLayer = zeroPositionInLayer; }
setZeroPositionInLayer
245,033
void (final boolean show) { myShowPointer = show; }
setShowPointer
245,034
void (boolean pointerShiftedToStart) { myPointerShiftedToStart = pointerShiftedToStart; }
setPointerShiftedToStart
245,035
Icon () { return AllIcons.Ide.Notification.Close; }
getCloseButton
245,036
void (Rectangle bounds) { myForcedBounds = bounds; if (myPosition != null) { myPosition.updateBounds(this); } }
setBounds
245,037
Dimension () { if (component != null) { return component.getPreferredSize(); } if (myDefaultPrefSize == null) { final EmptyBorder border = myShadowBorderProvider == null ? getPointlessBorder() : null; final MyComponent c = new MyComponent(myContent, this, border); c.setBorder(new EmptyBorder(getShadowBorderInsets())); ...
getPreferredSize
245,038
void (final @NotNull BalloonImpl balloon) { if (balloon.myLayeredPane == null || balloon.component == null) return; Insets shadow = balloon.component.getInsets(); Dimension prefSize = balloon.component.getPreferredSize(); JBInsets.removeFrom(prefSize, shadow); Rectangle bounds = getUpdatedBounds(balloon, prefSize, shad...
updateBounds
245,039
int (@NotNull BalloonImpl balloon, @NotNull Dimension size) { if (balloon.myCornerToPointerDistance < 0) return -1; int indent = balloon.getArc() + balloon.getPointerWidth(this) / 2; if (balloon.myCornerToPointerDistance < indent) return indent; int limit = this == ABOVE || this == BELOW ? size.width - indent : size.he...
getDistance
245,040
String () { return getClass().getSimpleName(); }
toString
245,041
Point (@NotNull Point targetPoint, int shift) { return new Point(targetPoint.x, targetPoint.y + shift); }
getShiftedPoint
245,042
Point (@NotNull Point targetPoint, @NotNull Insets shift) { return getShiftedPoint(targetPoint, -shift.top); }
getShiftedPoint
245,043
int (Rectangle rectangle, Point targetPoint) { return rectangle.y - targetPoint.y; }
getDistanceToTarget
245,044
Rectangle (Rectangle bounds, int pointerLength) { return new Rectangle(bounds.x, bounds.y + pointerLength, bounds.width, bounds.height - pointerLength); }
getPointlessContentRec
245,045
Insets (int normalInset, int pointerLength) { //noinspection UseDPIAwareInsets return new Insets(pointerLength, JBUIScale.scale(normalInset), JBUIScale.scale(normalInset), JBUIScale.scale(normalInset)); }
getTitleInsets
245,046
Shape (final Rectangle bounds, Point pointTarget, final BalloonImpl balloon) { pointTarget = new Point(pointTarget.x, Math.min(bounds.y, pointTarget.y)); final Shaper shaper = new Shaper(balloon, bounds, pointTarget, SwingConstants.TOP); shaper.line(balloon.getPointerWidth(this) / 2, balloon.getPointerLength(this)).toR...
getPointingShape
245,047
Point (@NotNull Point targetPoint, int shift) { return new Point(targetPoint.x, targetPoint.y - shift); }
getShiftedPoint
245,048
Point (@NotNull Point targetPoint, @NotNull Insets shift) { return getShiftedPoint(targetPoint, -shift.top); }
getShiftedPoint
245,049
int (Rectangle rectangle, Point targetPoint) { return targetPoint.y - (int)rectangle.getMaxY(); }
getDistanceToTarget
245,050
Rectangle (Rectangle bounds, int pointerLength) { return new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height - pointerLength); }
getPointlessContentRec
245,051
Insets (int normalInset, int pointerLength) { return JBUI.insets(normalInset, normalInset, normalInset, normalInset); }
getTitleInsets
245,052
Shape (final Rectangle bounds, Point pointTarget, final BalloonImpl balloon) { pointTarget = new Point(pointTarget.x, Math.max((int)bounds.getMaxY(), pointTarget.y)); final Shaper shaper = new Shaper(balloon, bounds, pointTarget, SwingConstants.BOTTOM); shaper.line(-balloon.getPointerWidth(this) / 2, -balloon.getPointe...
getPointingShape
245,053
Point (@NotNull Point targetPoint, int shift) { return new Point(targetPoint.x + shift, targetPoint.y); }
getShiftedPoint
245,054
Point (@NotNull Point targetPoint, @NotNull Insets shift) { return getShiftedPoint(targetPoint, -shift.left); }
getShiftedPoint
245,055
int (Rectangle rectangle, Point targetPoint) { return rectangle.x - targetPoint.x; }
getDistanceToTarget
245,056
Rectangle (Rectangle bounds, int pointerLength) { return new Rectangle(bounds.x + pointerLength, bounds.y, bounds.width - pointerLength, bounds.height); }
getPointlessContentRec
245,057
Insets (int normalInset, int pointerLength) { //noinspection UseDPIAwareInsets return new Insets(JBUIScale.scale(normalInset), pointerLength, JBUIScale.scale(normalInset), JBUIScale.scale(normalInset)); }
getTitleInsets
245,058
Shape (final Rectangle bounds, Point pointTarget, final BalloonImpl balloon) { pointTarget = new Point(Math.min(bounds.x, pointTarget.y), pointTarget.y); final Shaper shaper = new Shaper(balloon, bounds, pointTarget, SwingConstants.LEFT); shaper.line(balloon.getPointerLength(this), -balloon.getPointerWidth(this) / 2).t...
getPointingShape
245,059
Point (@NotNull Point targetPoint, int shift) { return new Point(targetPoint.x - shift, targetPoint.y); }
getShiftedPoint
245,060
Point (@NotNull Point targetPoint, @NotNull Insets shift) { return getShiftedPoint(targetPoint, -shift.left); }
getShiftedPoint
245,061
int (Rectangle rectangle, Point targetPoint) { return targetPoint.x - (int)rectangle.getMaxX(); }
getDistanceToTarget
245,062
Rectangle (Rectangle bounds, int pointerLength) { return new Rectangle(bounds.x, bounds.y, bounds.width - pointerLength, bounds.height); }
getPointlessContentRec
245,063
Insets (int normalInset, int pointerLength) { //noinspection UseDPIAwareInsets return new Insets(JBUIScale.scale(normalInset), pointerLength, JBUIScale.scale(normalInset), JBUIScale.scale(normalInset)); }
getTitleInsets
245,064
Shape (final Rectangle bounds, Point pointTarget, final BalloonImpl balloon) { pointTarget = new Point(Math.max((int)bounds.getMaxX(), pointTarget.x), pointTarget.y); final Shaper shaper = new Shaper(balloon, bounds, pointTarget, SwingConstants.RIGHT); shaper .lineTo((int)bounds.getMaxX() - shaper.getTargetDelta(SwingC...
getPointingShape
245,065
void (MouseEvent e) { myListener.consume(e); }
execute
245,066
Dimension () { return new Dimension(myIcon.getIconWidth(), myIcon.getIconHeight()); }
getPreferredSize
245,067
void (Graphics g) { super.paintComponent(g); if (hasPaint()) { paintIcon(g, myHoverIcon != null && myButton.isHovered() ? myHoverIcon : myIcon); } }
paintComponent
245,068
void (@NotNull Graphics g, @NotNull Icon icon) { icon.paintIcon(this, g, 0, 0); }
paintIcon
245,069
boolean (@NotNull MouseEvent e) { return false; }
canBePreprocessed
245,070
void (@NotNull Graphics g, @NotNull Icon icon) { if (myEnableButtons) { icon.paintIcon(this, g, 0, 0); } }
paintIcon
245,071
void (boolean aFlag) { setActionButtonsVisible(aFlag); super.setVisible(aFlag); }
setVisible
245,072
Component (Container aContainer, Component aComponent) { return WeakFocusStackManager.getInstance().getLastFocusedOutside(MyComponent.this); }
getComponentAfter
245,073
Component (Container aContainer, Component aComponent) { return WeakFocusStackManager.getInstance().getLastFocusedOutside(MyComponent.this); }
getComponentBefore
245,074
Component (Container aContainer) { return WeakFocusStackManager.getInstance().getLastFocusedOutside(MyComponent.this); }
getFirstComponent
245,075
Component (Container aContainer) { return WeakFocusStackManager.getInstance().getLastFocusedOutside(MyComponent.this); }
getLastComponent
245,076
Component (Container aContainer) { return WeakFocusStackManager.getInstance().getLastFocusedOutside(MyComponent.this); }
getDefaultComponent
245,077
void () { myImage = null; myAlpha = -1; }
clear
245,078
void () { Rectangle bounds = new Rectangle(getWidth(), getHeight()); JBInsets.removeFrom(bounds, getInsets()); myContent.setBounds(bounds); }
doLayout
245,079
Dimension () { return addInsets(myContent.getPreferredSize()); }
getPreferredSize
245,080
Dimension () { return addInsets(myContent.getMinimumSize()); }
getMinimumSize
245,081
Dimension (Dimension size) { JBInsets.addTo(size, getInsets()); return size; }
addInsets
245,082
void (Graphics g) { if (myImage == null || myAlpha == -1) { super.paintChildren(g); } }
paintChildren
245,083
void (Graphics g) { // Paint to an image without alpha to preserve fonts subpixel antialiasing BufferedImage image = ImageUtil.createImage(g, getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB);//new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); useSafely(image.createGraphics(), imageGraphics -> ...
paintChildrenImpl
245,084
Image (Image image, Color color) { final int markerRGB = color.getRGB() | 0xFF000000; ImageFilter filter = new RGBImageFilter() { @Override public int filterRGB(int x, int y, int rgb) { if ((rgb | 0xFF000000) == markerRGB) { return 0x00FFFFFF & rgb; // set alpha to 0 } return rgb; } }; return ImageUtil.filter(image, fi...
makeColorTransparent
245,085
int (int x, int y, int rgb) { if ((rgb | 0xFF000000) == markerRGB) { return 0x00FFFFFF & rgb; // set alpha to 0 } return rgb; }
filterRGB
245,086
void (final Graphics g) { if (myClipY != -1) { //noinspection GraphicsSetClipInspection g.setClip(0, 0, getWidth(), myClipY); } super.paintComponent(g); final Graphics2D g2d = (Graphics2D)g; Point pointTarget = SwingUtilities.convertPoint(myLayeredPane, myBalloon.myTargetPoint, this); Rectangle shapeBounds = myContent....
paintComponent
245,087
void (Graphics graphics) { if (myShadow != null) { Graphics2D g2d = (Graphics2D)graphics; try { if (JreHiDpiUtil.isJreHiDPI(g2d)) { g2d = (Graphics2D)graphics.create(); float s = 1 / JBUIScale.sysScale(this); g2d.scale(s, s); } StartupUiUtil.drawImage(g2d, myShadow.getImage(), myShadow.getX(), myShadow.getY(), null); }...
paintShadow
245,088
boolean (int x, int y) { Point pointTarget = SwingUtilities.convertPoint(myLayeredPane, myBalloon.myTargetPoint, this); Rectangle bounds = myContent.getBounds(); Shape shape; if (myShowPointer) { shape = myBalloon.myPosition.getPointingShape(bounds, pointTarget, myBalloon); } else { shape = getPointlessShape(myBalloon,...
contains
245,089
void (Point pointTarget, Rectangle shapeBounds) { if (myImage != null) return; myImage = UIUtil.createImage(component, getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB); useSafely(myImage.getGraphics(), imageGraphics -> { myBalloon.myPosition.paintComponent(myBalloon, shapeBounds, imageGraphics, pointTarget); paint...
initComponentImage
245,090
void () { super.removeNotify(); if (!ScreenUtil.isStandardAddRemoveNotify(this)) { return; } final List<ActionButton> buttons = myActionButtons; myActionButtons = null; if (buttons != null) { SwingUtilities.invokeLater(() -> { for (ActionButton button : buttons) { disposeButton(button); } }); } }
removeNotify
245,091
void (float alpha) { myAlpha = alpha; paintImmediately(0, 0, getWidth(), getHeight()); }
setAlpha
245,092
void () { myImage = null; myShadow = null; }
invalidateShadowImage
245,093
void (Point start) { myPath.moveTo(start.x, start.y); }
start
245,094
Point () { return new Point((int)myPath.getCurrentPoint().getX(), (int)myPath.getCurrentPoint().getY()); }
getCurrent
245,095
Shaper (final int deltaX, final int deltaY) { myPath.lineTo(getCurrent().x + deltaX, getCurrent().y + deltaY); return this; }
line
245,096
Shaper (final int x, final int y) { myPath.lineTo(x, y); return this; }
lineTo
245,097
int (@JdkConstants.TabPlacement int effectiveSide) { return effectiveSide == myTargetSide ? myBalloon.getPointerLength(myBalloon.myPosition) : 0; }
getTargetDelta
245,098
void () { myPath.closePath(); }
close
245,099
Shape () { return myPath; }
getShape