当前位置: 首页>>代码示例>>Java>>正文


Java NotificationDisplayType.BALLOON属性代码示例

本文整理汇总了Java中com.intellij.notification.NotificationDisplayType.BALLOON属性的典型用法代码示例。如果您正苦于以下问题:Java NotificationDisplayType.BALLOON属性的具体用法?Java NotificationDisplayType.BALLOON怎么用?Java NotificationDisplayType.BALLOON使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.notification.NotificationDisplayType的用法示例。


在下文中一共展示了NotificationDisplayType.BALLOON属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

@Nullable
public static NotificationSettings load(@NotNull final Element element) {
  final String displayTypeString = element.getAttributeValue("displayType");
  NotificationDisplayType displayType = NotificationDisplayType.BALLOON;
  boolean shouldLog = !"false".equals(element.getAttributeValue("shouldLog"));
  boolean shouldReadAloud = "true".equals(element.getAttributeValue("shouldReadAloud"));
  if ("BALLOON_ONLY".equals(displayTypeString)) {
    shouldLog = false;
    displayType = NotificationDisplayType.BALLOON;
  }
  else if (displayTypeString != null) {
    try {
      displayType = NotificationDisplayType.valueOf(displayTypeString.toUpperCase());
    }
    catch (IllegalArgumentException ignored) {
    }
  }

  final String groupId = element.getAttributeValue("groupId");
  return groupId != null ? new NotificationSettings(groupId, displayType, shouldLog, shouldReadAloud) : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:NotificationSettings.java

示例2: save

@NotNull
public Element save() {
  final Element result = new Element("notification");

  result.setAttribute("groupId", getGroupId());
  final NotificationDisplayType displayType = getDisplayType();
  if (displayType != NotificationDisplayType.BALLOON) {
    result.setAttribute("displayType", displayType.toString());
  }
  if (!myShouldLog) {
    result.setAttribute("shouldLog", "false");
  }
  if (myShouldReadAloud) {
    result.setAttribute("shouldReadAloud", "true");
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:NotificationSettings.java

示例3: warnUser

private void warnUser(Project project, List<Module> invalidModules) {
  String message =
      new StringBuilder()
          .append("<p>")
          .append(
              GctBundle.message(
                  "appengine.support.java.version.alert.detail",
                  "<a href=\"" + UPDATE_HREF + "\">",
                  "</a>"))
          .append("</p>")
          .toString();

  NotificationGroup notification =
      new NotificationGroup(
          GctBundle.message("appengine.support.java.version.alert.title"),
          NotificationDisplayType.BALLOON,
          true);

  notification
      .createNotification(
          GctBundle.message("appengine.support.java.version.alert.title"),
          message,
          NotificationType.WARNING,
          new LanguageLevelLinkListener(invalidModules))
      .notify(project);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:26,代码来源:AppEngineStandardUnsupportedJavaVersionCheck.java

示例4: load

@Nullable
public static NotificationSettings load(@NotNull final Element element) {
  final String displayTypeString = element.getAttributeValue("displayType");
  NotificationDisplayType displayType = NotificationDisplayType.BALLOON;
  boolean shouldLog = !"false".equals(element.getAttributeValue("shouldLog"));
  if ("BALLOON_ONLY".equals(displayTypeString)) {
    shouldLog = false;
    displayType = NotificationDisplayType.BALLOON;
  }
  else if (displayTypeString != null) {
    try {
      displayType = NotificationDisplayType.valueOf(displayTypeString.toUpperCase());
    }
    catch (IllegalArgumentException ignored) {
    }
  }

  final String groupId = element.getAttributeValue("groupId");
  return groupId != null ? new NotificationSettings(groupId, displayType, shouldLog) : null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:NotificationSettings.java

示例5: load

@Nullable
public static NotificationSettings load(@Nonnull final Element element) {
  final String displayTypeString = element.getAttributeValue("displayType");
  NotificationDisplayType displayType = NotificationDisplayType.BALLOON;
  boolean shouldLog = !"false".equals(element.getAttributeValue("shouldLog"));
  boolean shouldReadAloud = "true".equals(element.getAttributeValue("shouldReadAloud"));
  if ("BALLOON_ONLY".equals(displayTypeString)) {
    shouldLog = false;
    displayType = NotificationDisplayType.BALLOON;
  }
  else if (displayTypeString != null) {
    try {
      displayType = NotificationDisplayType.valueOf(displayTypeString.toUpperCase());
    }
    catch (IllegalArgumentException ignored) {
    }
  }

  final String groupId = element.getAttributeValue("groupId");
  return groupId != null ? new NotificationSettings(groupId, displayType, shouldLog, shouldReadAloud) : null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:NotificationSettings.java

示例6: save

@Nonnull
public Element save() {
  final Element result = new Element("notification");

  result.setAttribute("groupId", getGroupId());
  final NotificationDisplayType displayType = getDisplayType();
  if (displayType != NotificationDisplayType.BALLOON) {
    result.setAttribute("displayType", displayType.toString());
  }
  if (!myShouldLog) {
    result.setAttribute("shouldLog", "false");
  }
  if (myShouldReadAloud) {
    result.setAttribute("shouldReadAloud", "true");
  }

  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:NotificationSettings.java

示例7: showTip

@Override
public void showTip(IncomingAnswer tip) {
    IncomingTipNotification n = new IncomingTipNotification(tip);
    NotificationDisplayType notificationType = NotificationsConfigurationImpl.getSettings(n.getGroupId()).getDisplayType();
    if (NotificationDisplayType.BALLOON == notificationType) {
        // This is the type we set by default.
        // In this case, do not use it as a notification, but create instead a custom balloon and show that, because we cannot customize the presentation of a notification
        twc.incomingTipPopupController.showIncomingChatInvitation(tip, n);
    } else {
        // if the user changed it, than handle it as a well-behaved notification
        n.notify(twc.project);
    }
}
 
开发者ID:samebug,项目名称:samebug-idea-plugin,代码行数:13,代码来源:IncomingTipPopupListener.java

示例8: showHelpRequest

@Override
public void showHelpRequest(IncomingHelpRequest helpRequest) {
    IncomingHelpRequestNotification n = new IncomingHelpRequestNotification(helpRequest);
    NotificationDisplayType notificationType = NotificationsConfigurationImpl.getSettings(n.getGroupId()).getDisplayType();
    if (NotificationDisplayType.BALLOON == notificationType) {
        // This is the type we set by default.
        // In this case, do not use it as a notification, but create instead a custom balloon and show that, because we cannot customize the presentation of a notification
        twc.helpRequestPopupController.showIncomingHelpRequest(helpRequest, n);
    } else {
        // if the user changed it, than handle it as a well-behaved notification
        n.notify(twc.project);
    }
}
 
开发者ID:samebug,项目名称:samebug-idea-plugin,代码行数:13,代码来源:IncomingHelpRequestPopupListener.java

示例9: invitedToChat

@Override
public void invitedToChat(ChatInvitation chatInvitation) {
    IncomingChatInvitationNotification n = new IncomingChatInvitationNotification(chatInvitation);
    NotificationDisplayType notificationType = NotificationsConfigurationImpl.getSettings(n.getGroupId()).getDisplayType();
    if (NotificationDisplayType.BALLOON == notificationType) {
        // This is the type we set by default.
        // In this case, do not use it as a notification, but create instead a custom balloon and show that, because we cannot customize the presentation of a notification
        twc.incomingChatInvitationPopupController.showIncomingChatInvitation(chatInvitation, n);
    } else {
        // if the user changed it, than handle it as a well-behaved notification
        n.notify(twc.project);
    }
}
 
开发者ID:samebug,项目名称:samebug-idea-plugin,代码行数:13,代码来源:IncomingChatInvitationPopupListener.java

示例10: getDefaultSettings

@NotNull
private static NotificationSettings getDefaultSettings(String groupId) {
  NotificationGroup group = NotificationGroup.findRegisteredGroup(groupId);
  if (group != null) {
    return new NotificationSettings(groupId, group.getDisplayType(), group.isLogByDefault(), false);
  }
  return new NotificationSettings(groupId, NotificationDisplayType.BALLOON, true, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:NotificationsConfigurationImpl.java

示例11: notifyNotAppEngineStandardProject

private void notifyNotAppEngineStandardProject(@NotNull Project project) {
  NotificationGroup notification =
      new NotificationGroup(
          GctBundle.message("appengine.tools.menu.run.server.error.title"),
          NotificationDisplayType.BALLOON,
          true);

  notification
      .createNotification(
          GctBundle.message("appengine.tools.menu.run.server.error.title"),
          GctBundle.message("appengine.tools.menu.run.server.error.message"),
          NotificationType.ERROR,
          null /*listener*/)
      .notify(project);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:15,代码来源:AppEngineStandardLocalRunToolsMenuAction.java

示例12: showNotification

private void showNotification(@NotNull IdeaPluginDescriptor plugin) {
  NotificationGroup notification =
      new NotificationGroup(
          GctBundle.message("plugin.conflict.error.title"),
          NotificationDisplayType.BALLOON,
          true);

  String errorMessage =
      new StringBuilder()
          .append("<p>")
          .append(GctBundle.message("plugin.conflict.error.detail", plugin.getName()))
          .append("</p>")
          .append("<br />")
          .append("<p>")
          .append(
              GctBundle.message(
                  "plugin.conflict.error.action",
                  "<a href=\"" + DEACTIVATE_LINK_HREF + "\">",
                  "</a>"))
          .append("</p>")
          .toString();

  notification
      .createNotification(
          GctBundle.message("plugin.conflict.error.title"),
          errorMessage,
          NotificationType.ERROR,
          new IdeaAppEnginePluginLinkListener(plugin))
      .notify(null /*project*/);

  UsageTrackerProvider.getInstance()
      .trackEvent(GctTracking.APP_ENGINE_OLD_PLUGIN_NOTIFICATION)
      .ping();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:34,代码来源:ConflictingAppEnginePluginCheck.java

示例13: notifyNotAppEngineProject

private void notifyNotAppEngineProject(@NotNull Project project) {
  NotificationGroup notification =
      new NotificationGroup(
          GctBundle.message("appengine.tools.menu.deploy.error.title"),
          NotificationDisplayType.BALLOON,
          true);

  notification
      .createNotification(
          GctBundle.message("appengine.tools.menu.deploy.error.title"),
          GctBundle.message("appengine.tools.menu.deploy.error.message"),
          NotificationType.ERROR,
          null /*listener*/)
      .notify(project);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:15,代码来源:AppEngineDeployToolsMenuAction.java

示例14: save

@NotNull
public Element save() {
  final Element result = new Element("notification");

  result.setAttribute("groupId", getGroupId());
  final NotificationDisplayType displayType = getDisplayType();
  if (displayType != NotificationDisplayType.BALLOON) {
    result.setAttribute("displayType", displayType.toString());
  }
  if (!myShouldLog) {
    result.setAttribute("shouldLog", "false");
  }

  return result;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:NotificationSettings.java

示例15: getDefaultSettings

@Nonnull
private static NotificationSettings getDefaultSettings(String groupId) {
  NotificationGroup group = NotificationGroup.findRegisteredGroup(groupId);
  if (group != null) {
    return new NotificationSettings(groupId, group.getDisplayType(), group.isLogByDefault(), false);
  }
  return new NotificationSettings(groupId, NotificationDisplayType.BALLOON, true, false);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:NotificationsConfigurationImpl.java


注:本文中的com.intellij.notification.NotificationDisplayType.BALLOON属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。