Java 类com.intellij.openapi.ui.popup.BalloonHandler 实例源码

项目:intellij-ce-playground    文件:IdeStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type,
                                              @NotNull String htmlBody,
                                              @Nullable Icon icon,
                                              @Nullable HyperlinkListener listener) {
  return myInfoAndProgressPanel.notifyByBalloon(type, htmlBody, icon, listener);
}
项目:intellij-ce-playground    文件:InfoAndProgressPanel.java   
public BalloonHandler notifyByBalloon(MessageType type, String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener) {
  final Balloon balloon = JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(
    htmlBody.replace("\n", "<br>"),
    icon != null ? icon : type.getDefaultIcon(),
    type.getPopupBackground(),
    listener).createBalloon();

  SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
      Component comp = InfoAndProgressPanel.this;
      if (comp.isShowing()) {
        int offset = comp.getHeight() / 2;
        Point point = new Point(comp.getWidth() - offset, comp.getHeight() - offset);
        balloon.show(new RelativePoint(comp, point), Balloon.Position.above);
      } else {
        final JRootPane rootPane = SwingUtilities.getRootPane(comp);
        if (rootPane != null && rootPane.isShowing()) {
          final Container contentPane = rootPane.getContentPane();
          final Rectangle bounds = contentPane.getBounds();
          final Point target = UIUtil.getCenterPoint(bounds, JBUI.size(1, 1));
          target.y = bounds.height - 3;
          balloon.show(new RelativePoint(contentPane, target), Balloon.Position.above);
        }
      }
    }
  });

  return new BalloonHandler() {
    @Override
    public void hide() {
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          balloon.hide();
        }
      });
    }
  };
}
项目:intellij-ce-playground    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:intellij-ce-playground    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type,
                                              @NotNull String htmlBody,
                                              @Nullable Icon icon,
                                              @Nullable HyperlinkListener listener) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:tools-idea    文件:InfoAndProgressPanel.java   
public BalloonHandler notifyByBalloon(MessageType type, String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener) {
  final Balloon balloon = JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(
    htmlBody.replace("\n", "<br>"),
    icon != null ? icon : type.getDefaultIcon(),
    type.getPopupBackground(),
    listener).createBalloon();

  SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
      Component comp = InfoAndProgressPanel.this;
      if (comp.isShowing()) {
        int offset = comp.getHeight() / 2;
        Point point = new Point(comp.getWidth() - offset, comp.getHeight() - offset);
        balloon.show(new RelativePoint(comp, point), Balloon.Position.above);
      } else {
        final JRootPane rootPane = SwingUtilities.getRootPane(comp);
        if (rootPane != null && rootPane.isShowing()) {
          final Container contentPane = rootPane.getContentPane();
          final Rectangle bounds = contentPane.getBounds();
          final Point target = UIUtil.getCenterPoint(bounds, new Dimension(1, 1));
          target.y = bounds.height - 3;
          balloon.show(new RelativePoint(contentPane, target), Balloon.Position.above);
        }
      }
    }
  });

  return new BalloonHandler() {
    @Override
    public void hide() {
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          balloon.hide();
        }
      });
    }
  };
}
项目:tools-idea    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:tools-idea    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type,
                                              @NotNull String htmlBody,
                                              @Nullable Icon icon,
                                              @Nullable HyperlinkListener listener) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:consulo    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:consulo    文件:TestWindowManager.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody, @javax.annotation.Nullable Icon icon, @javax.annotation.Nullable HyperlinkListener listener) {
  return new BalloonHandler() {
    public void hide() {
    }
  };
}
项目:consulo    文件:IdeStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type,
                                              @Nonnull String htmlBody,
                                              @Nullable Icon icon,
                                              @Nullable HyperlinkListener listener) {
  return myInfoAndProgressPanel.notifyByBalloon(type, htmlBody, icon, listener);
}
项目:intellij-ce-playground    文件:IdeStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody) {
  return notifyProgressByBalloon(type, htmlBody, null, null);
}
项目:tools-idea    文件:IdeStatusBarImpl.java   
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody) {
  return notifyProgressByBalloon(type, htmlBody, null, null);
}
项目:tools-idea    文件:IdeStatusBarImpl.java   
public BalloonHandler notifyProgressByBalloon(@NotNull MessageType type,
                                              @NotNull String htmlBody,
                                              @Nullable Icon icon,
                                              @Nullable HyperlinkListener listener) {
  return myInfoAndProgressPanel.notifyByBalloon(type, htmlBody, icon, listener);
}
项目:consulo    文件:WebStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody) {
  return null;
}
项目:consulo    文件:WebStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener) {
  return null;
}
项目:consulo    文件:IdeStatusBarImpl.java   
@Override
public BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody) {
  return notifyProgressByBalloon(type, htmlBody, null, null);
}
项目:intellij-ce-playground    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody);
项目:intellij-ce-playground    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener);
项目:tools-idea    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody);
项目:tools-idea    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@NotNull MessageType type, @NotNull String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener);
项目:consulo    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody);
项目:consulo    文件:StatusBarEx.java   
BalloonHandler notifyProgressByBalloon(@Nonnull MessageType type, @Nonnull String htmlBody, @Nullable Icon icon, @Nullable HyperlinkListener listener);