List of usage examples for com.intellij.openapi.ui.popup JBPopupFactory createBalloonBuilder
@NotNull
public abstract BalloonBuilder createBalloonBuilder(@NotNull JComponent content);
From source file:glslplugin.actions.GLSLDeduceExpressionTypeAction.java
License:Open Source License
private void showBalloon(AnActionEvent e, String html) { final Editor editor = e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE); if (editor == null) return;//w w w . j a v a 2 s . c o m final JBPopupFactory factory = JBPopupFactory.getInstance(); final BalloonBuilder builder = factory.createBalloonBuilder(new JLabel(html)); Balloon balloon = builder.createBalloon(); RelativePoint position = factory.guessBestPopupLocation(editor); balloon.show(position, Balloon.Position.below); }