|
|
|
@ -223,8 +223,12 @@ public class AttachedPopupComponent extends JToolTip {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected ToolTipContext createToolTipContext() { |
|
|
|
|
return new ToolTipContext().setAlignment(Alignment.CENTER).setCenterAlignment(Alignment.SOUTH) |
|
|
|
|
.setUseBestFit(true).setToolTipInsets(new Insets(2, 2, 2, 2)).setFallBackPositionProvider(c -> { |
|
|
|
|
return new ToolTipContext() |
|
|
|
|
.setAlignment(Alignment.CENTER) |
|
|
|
|
.setCenterAlignment(Alignment.SOUTH) |
|
|
|
|
.setUseBestFit(true) |
|
|
|
|
.setToolTipInsets(new Insets(2, 2, 2, 2)) |
|
|
|
|
.setFallBackPositionProvider(c -> { |
|
|
|
|
Window window = DarkUIUtil.getWindow(c.getTarget()); |
|
|
|
|
Dimension size = c.getToolTip().getPreferredSize(); |
|
|
|
|
Rectangle bounds = window.getBounds(); |
|
|
|
@ -233,6 +237,11 @@ public class AttachedPopupComponent extends JToolTip {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void setToolTipText(final String text) { |
|
|
|
|
/* Not supported */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String getTipText() { |
|
|
|
|
return ToolTipConstants.NO_TEXT; |
|
|
|
|