java.awt.TrayIcon.getImage()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中java.awt.TrayIcon.getImage()方法的一些代码示例,展示了TrayIcon.getImage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TrayIcon.getImage()方法的具体详情如下:
包路径:java.awt.TrayIcon
类名称:TrayIcon
方法名:getImage

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);

相关文章