本文整理了Java中java.awt.TrayIcon.getImage()
方法的一些代码示例,展示了TrayIcon.getImage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TrayIcon.getImage()
方法的具体详情如下:
包路径:java.awt.TrayIcon
类名称:TrayIcon
方法名:getImage
暂无
代码示例来源:origin: stackoverflow.com
Image img = trayIcon.getImage();
if (img == image) {
trayIcon.setImage(image1);
代码示例来源:origin: blurpy/kouchat
/**
* Sets the system tray icon if it's different from the icon already in use.
*
* @param icon The tray icon to use.
*/
public void setTrayIcon(final Image icon) {
if (trayIcon.getImage() != icon) {
trayIcon.setImage(icon);
}
}
代码示例来源:origin: mguessan/davmail
public void run() {
if (trayIcon.getImage().equals(image)) {
trayIcon.setImage(activeImage);
} else {
trayIcon.setImage(image);
}
}
});
代码示例来源:origin: blurpy/kouchat
/**
* Handles left mouse click events.
*
* <p>Makes sure the main chat window is shown or hidden,
* and updates the tray icon.</p>
*
* {@inheritDoc}
*/
@Override
public void mouseClicked(final MouseEvent e) {
if (e.getSource() == trayIcon && e.getButton() == MouseEvent.BUTTON1) {
if (trayIcon.getImage() == statusIcons.getNormalActivityIcon()) {
trayIcon.setImage(statusIcons.getNormalIcon());
} else if (trayIcon.getImage() == statusIcons.getAwayActivityIcon()) {
trayIcon.setImage(statusIcons.getAwayIcon());
}
mediator.showOrHideWindow();
}
}
代码示例来源:origin: stackoverflow.com
Image img = trayIcon.getImage();
if (img == image) {
trayIcon.setImage(image1);
内容来源于网络,如有侵权,请联系作者删除!