void (BalloonLayoutData layoutData, JPanel panel) { @SuppressWarnings("removal") String shortTitle = NotificationParentGroup.getShortTitle(layoutData.groupId); String title = shortTitle != null ? IdeBundle.message("notification.manager.merge.n.more.from", layoutData.mergeData.count, shortTitle) : IdeBundle.message("notification.manager.merge.n.more", layoutData.mergeData.count); LinkListener<BalloonLayoutData> listener = (link, _layoutData) -> ActionCenter.showNotification(_layoutData.project); LinkLabel<BalloonLayoutData> action = new LinkLabel<>(title, null, listener, layoutData) { @Override protected boolean isInClickableArea(Point pt) { return true; } @Override protected Color getTextColor() { return NotificationsUtil.getMoreButtonForeground(); } }; action.setFont(FontUtil.minusOne(action.getFont())); action.setHorizontalAlignment(SwingConstants.CENTER); action.setPaintUnderline(false); AbstractLayoutManager layout = new AbstractLayoutManager() { @Override public Dimension preferredLayoutSize(Container parent) { return new Dimension(parent.getWidth(), JBUIScale.scale(20) + 2); } @Override public void layoutContainer(Container parent) { parent.getComponent(0).setBounds(2, 1, parent.getWidth() - 4, JBUIScale.scale(20)); } }; JPanel mergePanel = new NonOpaquePanel(layout) { @Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(NotificationsUtil.getMoreButtonBackground()); ((Graphics2D)g).fill(new Rectangle2D.Double(1.5, 1, getWidth() - 2.5, getHeight() - 2)); g.setColor(JBColor.namedColor("Notification.MoreButton.innerBorderColor", new JBColor(0xDBDBDB, 0x353738))); if (SystemInfo.isMac) { ((Graphics2D)g).draw(new Rectangle2D.Double(2, 0, getWidth() - 3.5, 0.5)); } else if (SystemInfo.isWindows) { ((Graphics2D)g).draw(new Rectangle2D.Double(1.5, 0, getWidth() - 3, 0.5)); } else { ((Graphics2D)g).draw(new Rectangle2D.Double(1.5, 0, getWidth() - 2.5, 0.5)); } } }; mergePanel.add(action); panel.add(BorderLayout.SOUTH, mergePanel); }