void (final Graphics g) { if (myCachedImage != null) { UIUtil.drawImage(g, myCachedImage, 0, 0, null); return; } super.paintComponent(g); if (myLayoutPolicy == AUTO_LAYOUT_POLICY && myAutoPopupRec != null) { if (myOrientation == SwingConstants.HORIZONTAL) { final int dy = myAutoPopupRec.height / 2 - AllIcons.Ide.Link.getIconHeight() / 2; AllIcons.Ide.Link.paintIcon(this, g, (int)myAutoPopupRec.getMaxX() - AllIcons.Ide.Link.getIconWidth() - 1, myAutoPopupRec.y + dy); } else { final int dx = myAutoPopupRec.width / 2 - AllIcons.Ide.Link.getIconWidth() / 2; AllIcons.Ide.Link.paintIcon(this, g, myAutoPopupRec.x + dx, (int)myAutoPopupRec.getMaxY() - AllIcons.Ide.Link.getIconWidth() - 1); } } }