本文整理汇总了Java中com.notification.types.IconNotification.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java IconNotification.setTitle方法的具体用法?Java IconNotification.setTitle怎么用?Java IconNotification.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.notification.types.IconNotification
的用法示例。
在下文中一共展示了IconNotification.setTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildNotification
import com.notification.types.IconNotification; //导入方法依赖的package包/类
@Override
public IconNotification buildNotification(ThemePackage pack, Object... args) {
if (args.length != 4)
throw new NotificationException("IconNotifications need three arguments: title, subtitle, icon!");
IconNotification note = new IconNotification();
note.setWindowTheme(pack.getTheme(WindowTheme.class));
note.setTextTheme(pack.getTheme(TextTheme.class));
note.setFrom((String) args[0]);
note.setTitle((String) args[1]);
note.setSubtitle((String) args[2]);
note.setIcon((Icon) args[3]);
return note;
}
示例2: buildNotification
import com.notification.types.IconNotification; //导入方法依赖的package包/类
@Override
public IconNotification buildNotification(ThemePackage pack, Object... args) {
if (args.length != 3)
throw new NotificationException("IconNotifications need three arguments: title, subtitle, icon!");
IconNotification note = new IconNotification();
note.setWindowTheme(pack.getTheme(WindowTheme.class));
note.setTextTheme(pack.getTheme(TextTheme.class));
note.setTitle((String) args[0]);
note.setSubtitle((String) args[1]);
note.setIcon((Icon) args[2]);
return note;
}