List of usage examples for com.intellij.openapi.wm StatusBar getComponent
JComponent getComponent();
From source file:SelectorChapekAction.java
License:Apache License
private void showInfoDialog(String text, AnActionEvent e) { StatusBar statusBar = WindowManager.getInstance() .getStatusBar(DataKeys.PROJECT.getData(e.getDataContext())); if (statusBar != null) { JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(text, MessageType.INFO, null) .setFadeoutTime(10000).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); }// ww w.j a va2 s .c o m }
From source file:SelectorChapekAction.java
License:Apache License
private void showErrorDialog(String text, AnActionEvent e) { StatusBar statusBar = WindowManager.getInstance() .getStatusBar(DataKeys.PROJECT.getData(e.getDataContext())); if (statusBar != null) { JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(text, MessageType.ERROR, null) .setFadeoutTime(10000).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); }/*from w ww . j a v a2 s . c om*/ }
From source file:ch.mjava.intellij.PluginHelper.java
License:Apache License
public static void showErrorBalloonWith(String message, DataContext dataContext) { StatusBar statusBar = WindowManager.getInstance().getStatusBar(DataKeys.PROJECT.getData(dataContext)); JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(message, MessageType.ERROR, null) .setFadeoutTime(5000).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); }
From source file:com.arcbees.plugin.idea.moduletypes.CreateProjectBuilder.java
License:Apache License
private void displayBalloon(String htmlText, MessageType messageType) { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(htmlText, messageType, null).setFadeoutTime(7500) .createBalloon().show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.above); }
From source file:com.demonwav.mcdev.platform.mcp.actions.FindSrgMappingAction.java
License:Open Source License
private void showBalloon(@NotNull AnActionEvent e) { final Balloon balloon = JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder("No mappings found", null, LightColors.YELLOW, null) .setHideOnAction(true).setHideOnClickOutside(true).setHideOnKeyOutside(true).createBalloon(); final StatusBar statusBar = WindowManager.getInstance() .getStatusBar(DataKeys.PROJECT.getData(e.getDataContext())); ApplicationManager.getApplication().invokeLater( () -> balloon.show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight)); }
From source file:com.demonwav.mcdev.platform.mcp.actions.GotoAtEntryAction.java
License:Open Source License
private void showBalloon(@NotNull AnActionEvent e) { final Balloon balloon = JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder("No access transformer entry found", null, LightColors.YELLOW, null) .setHideOnAction(true).setHideOnClickOutside(true).setHideOnKeyOutside(true).createBalloon(); final StatusBar statusBar = WindowManager.getInstance() .getStatusBar(DataKeys.PROJECT.getData(e.getDataContext())); ApplicationManager.getApplication().invokeLater( () -> balloon.show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight)); }
From source file:org.onehippo.intellij.groovy.utils.Util.java
License:Apache License
public static void showMessage(final Project project, String html) { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); if (statusBar == null) { return;/*from ww w . ja v a 2s . c o m*/ } JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(html, MessageType.INFO, null).setFadeoutTime(4000) .createBalloon() .show(RelativePoint.getNorthWestOf(statusBar.getComponent()), Balloon.Position.atRight); }
From source file:org.onehippo.intellij.groovy.utils.Util.java
License:Apache License
public static void showError(final Project project, String html) { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); if (statusBar == null) { return;/*from www. java 2 s. c om*/ } JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(html, MessageType.ERROR, null) .setFadeoutTime(4000).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); }
From source file:org.wavescale.sourcesync.logger.BalloonLogger.java
License:Open Source License
public static void logBalloonError(final String htmlMessage, final Project project) { SwingUtilities.invokeLater(new Runnable() { @Override//from w ww .ja v a 2 s. co m public void run() { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(htmlMessage, MessageType.ERROR, null) .setFadeoutTime(7500).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); } }); }
From source file:org.wavescale.sourcesync.logger.BalloonLogger.java
License:Open Source License
public static void logBalloonInfo(final String htmlMessage, final Project project) { SwingUtilities.invokeLater(new Runnable() { @Override/*from w w w . j av a 2s . c o m*/ public void run() { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(htmlMessage, MessageType.INFO, null) .setFadeoutTime(7500).createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight); } }); }