public class Notification
extends java.lang.Object
addAction(AnAction)
NotificationAction
,
com.intellij.notification.SingletonNotificationManager
Modifier and Type | Class and Description |
---|---|
static class |
Notification.CollapseActionsDirection
Which actions to keep and which to show under the "Actions" dropdown link if actions do not fit horizontally
into the width of the notification.
|
Modifier and Type | Field and Description |
---|---|
java.lang.String |
id |
Constructor and Description |
---|
Notification(java.lang.String groupDisplayId,
javax.swing.Icon icon,
NotificationType type) |
Notification(java.lang.String groupDisplayId,
javax.swing.Icon icon,
java.lang.String title,
java.lang.String subtitle,
java.lang.String content,
NotificationType type,
NotificationListener listener) |
Notification(java.lang.String groupDisplayId,
java.lang.String title,
java.lang.String content,
NotificationType type) |
Notification(java.lang.String groupDisplayId,
java.lang.String title,
java.lang.String content,
NotificationType type,
NotificationListener listener) |
Modifier and Type | Method and Description |
---|---|
Notification |
addAction(AnAction action) |
void |
assertHasTitleOrContent() |
void |
expire() |
static void |
fire(Notification notification,
AnAction action) |
static void |
fire(Notification notification,
AnAction action,
DataContext context) |
static Notification |
get(AnActionEvent e) |
java.util.List<AnAction> |
getActions() |
Balloon |
getBalloon() |
Notification.CollapseActionsDirection |
getCollapseActionsDirection() |
java.lang.String |
getContent() |
AnAction |
getContextHelpAction() |
java.lang.String |
getDropDownText() |
java.lang.String |
getGroupId() |
javax.swing.Icon |
getIcon() |
NotificationListener |
getListener() |
java.lang.String |
getSubtitle() |
long |
getTimestamp()
Returns the time (in milliseconds since Jan 1, 1970) when the notification was created.
|
java.lang.String |
getTitle() |
NotificationType |
getType() |
boolean |
hasContent() |
boolean |
hasTitle() |
void |
hideBalloon() |
boolean |
isExpired() |
boolean |
isImportant() |
void |
notify(Project project) |
void |
setBalloon(Balloon balloon) |
void |
setCollapseActionsDirection(Notification.CollapseActionsDirection collapseActionsDirection) |
Notification |
setContent(java.lang.String content) |
Notification |
setContextHelpAction(AnAction action) |
static void |
setDataProvider(Notification notification,
javax.swing.JComponent component) |
Notification |
setDropDownText(java.lang.String dropDownText) |
Notification |
setIcon(javax.swing.Icon icon) |
Notification |
setImportant(boolean important) |
Notification |
setListener(NotificationListener listener) |
Notification |
setSubtitle(java.lang.String subtitle) |
Notification |
setTitle(java.lang.String title) |
Notification |
setTitle(java.lang.String title,
java.lang.String subtitle) |
java.lang.String |
toString() |
Notification |
whenExpired(java.lang.Runnable whenExpired) |
public Notification(java.lang.String groupDisplayId, javax.swing.Icon icon, NotificationType type)
public Notification(java.lang.String groupDisplayId, javax.swing.Icon icon, java.lang.String title, java.lang.String subtitle, java.lang.String content, NotificationType type, NotificationListener listener)
groupDisplayId
- this should be a human-readable, capitalized string like "Facet Detector".
It will appear in "Notifications" configurable.icon
- notification icon, if null used icon from typetitle
- notification titlesubtitle
- notification subtitlecontent
- notification contenttype
- notification typelistener
- notification lifecycle listenerpublic Notification(java.lang.String groupDisplayId, java.lang.String title, java.lang.String content, NotificationType type)
public Notification(java.lang.String groupDisplayId, java.lang.String title, java.lang.String content, NotificationType type, NotificationListener listener)
groupDisplayId
- this should be a human-readable, capitalized string like "Facet Detector".
It will appear in "Notifications" configurable.title
- notification titlecontent
- notification contenttype
- notification typelistener
- notification lifecycle listenerpublic long getTimestamp()
public javax.swing.Icon getIcon()
public Notification setIcon(javax.swing.Icon icon)
public java.lang.String getGroupId()
public boolean hasTitle()
public java.lang.String getTitle()
public Notification setTitle(java.lang.String title)
public Notification setTitle(java.lang.String title, java.lang.String subtitle)
public java.lang.String getSubtitle()
public Notification setSubtitle(java.lang.String subtitle)
public boolean hasContent()
public java.lang.String getContent()
public Notification setContent(java.lang.String content)
public NotificationListener getListener()
public Notification setListener(NotificationListener listener)
public java.util.List<AnAction> getActions()
public static Notification get(AnActionEvent e)
public static void fire(Notification notification, AnAction action)
public static void fire(Notification notification, AnAction action, DataContext context)
public static void setDataProvider(Notification notification, javax.swing.JComponent component)
public java.lang.String getDropDownText()
public Notification setDropDownText(java.lang.String dropDownText)
dropDownText
- text for popup when all actions collapsed (when all actions width more notification width)public Notification.CollapseActionsDirection getCollapseActionsDirection()
public void setCollapseActionsDirection(Notification.CollapseActionsDirection collapseActionsDirection)
public Notification addAction(AnAction action)
NotificationAction
public Notification setContextHelpAction(AnAction action)
public AnAction getContextHelpAction()
public NotificationType getType()
public boolean isExpired()
public void expire()
public Notification whenExpired(java.lang.Runnable whenExpired)
public void hideBalloon()
public void setBalloon(Balloon balloon)
public Balloon getBalloon()
public void notify(Project project)
public Notification setImportant(boolean important)
public boolean isImportant()
public final void assertHasTitleOrContent()
public java.lang.String toString()
toString
in class java.lang.Object