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


Java TrayIconPeer.updateImage方法代码示例

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


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

示例1: setImage

import java.awt.peer.TrayIconPeer; //导入方法依赖的package包/类
/**
 * Sets the image for this <code>TrayIcon</code>.  The previous
 * tray icon image is discarded without calling the {@link
 * java.awt.Image#flush} method &#151; you will need to call it
 * manually.
 *
 * <p> If the image represents an animated image, it will be
 * animated automatically.
 *
 * <p> See the {@link #setImageAutoSize(boolean)} property for
 * details on the size of the displayed image.
 *
 * <p> Calling this method with the same image that is currently
 * being used has no effect.
 *
 * @throws NullPointerException if <code>image</code> is <code>null</code>
 * @param image the non-null <code>Image</code> to be used
 * @see #getImage
 * @see Image
 * @see SystemTray#add(TrayIcon)
 * @see TrayIcon#TrayIcon(Image, String)
 */
public void setImage(Image image) {
    if (image == null) {
        throw new NullPointerException("setting null Image");
    }
    this.image = image;

    TrayIconPeer peer = this.peer;
    if (peer != null) {
        peer.updateImage();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:TrayIcon.java

示例2: setImageAutoSize

import java.awt.peer.TrayIconPeer; //导入方法依赖的package包/类
/**
 * Sets the auto-size property.  Auto-size determines whether the
 * tray image is automatically sized to fit the space allocated
 * for the image on the tray.  By default, the auto-size property
 * is set to <code>false</code>.
 *
 * <p> If auto-size is <code>false</code>, and the image size
 * doesn't match the tray icon space, the image is painted as-is
 * inside that space &#151; if larger than the allocated space, it will
 * be cropped.
 *
 * <p> If auto-size is <code>true</code>, the image is stretched or shrunk to
 * fit the tray icon space.
 *
 * @param autosize <code>true</code> to auto-size the image,
 * <code>false</code> otherwise
 * @see #isImageAutoSize
 */
public void setImageAutoSize(boolean autosize) {
    this.autosize = autosize;

    TrayIconPeer peer = this.peer;
    if (peer != null) {
        peer.updateImage();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:TrayIcon.java

示例3: setImage

import java.awt.peer.TrayIconPeer; //导入方法依赖的package包/类
/**
 * Sets the image for this {@code TrayIcon}.  The previous
 * tray icon image is discarded without calling the {@link
 * java.awt.Image#flush} method &#8212; you will need to call it
 * manually.
 *
 * <p> If the image represents an animated image, it will be
 * animated automatically.
 *
 * <p> See the {@link #setImageAutoSize(boolean)} property for
 * details on the size of the displayed image.
 *
 * <p> Calling this method with the same image that is currently
 * being used has no effect.
 *
 * @throws NullPointerException if {@code image} is {@code null}
 * @param image the non-null {@code Image} to be used
 * @see #getImage
 * @see Image
 * @see SystemTray#add(TrayIcon)
 * @see TrayIcon#TrayIcon(Image, String)
 */
public void setImage(Image image) {
    if (image == null) {
        throw new NullPointerException("setting null Image");
    }
    this.image = image;

    TrayIconPeer peer = this.peer;
    if (peer != null) {
        peer.updateImage();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:34,代码来源:TrayIcon.java

示例4: setImageAutoSize

import java.awt.peer.TrayIconPeer; //导入方法依赖的package包/类
/**
 * Sets the auto-size property.  Auto-size determines whether the
 * tray image is automatically sized to fit the space allocated
 * for the image on the tray.  By default, the auto-size property
 * is set to {@code false}.
 *
 * <p> If auto-size is {@code false}, and the image size
 * doesn't match the tray icon space, the image is painted as-is
 * inside that space &#8212; if larger than the allocated space, it will
 * be cropped.
 *
 * <p> If auto-size is {@code true}, the image is stretched or shrunk to
 * fit the tray icon space.
 *
 * @param autosize {@code true} to auto-size the image,
 * {@code false} otherwise
 * @see #isImageAutoSize
 */
public void setImageAutoSize(boolean autosize) {
    this.autosize = autosize;

    TrayIconPeer peer = this.peer;
    if (peer != null) {
        peer.updateImage();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:TrayIcon.java

示例5: setImage

import java.awt.peer.TrayIconPeer; //导入方法依赖的package包/类
/**
 * Sets the image for this <code>TrayIcon</code>.  The previous
 * tray icon image is discarded without calling the {@link
 * java.awt.Image#flush} method &#151; you will need to call it
 * manually.
 * 
 * <p> If the image represents an animated image, it will be
 * animated automatically.
 *
 * <p> See the {@link #setImageAutoSize(boolean)} property for
 * details on the size of the displayed image.
 *
 * <p> Calling this method with the same image that is currently
 * being used has no effect.
 *
 * @throws NullPointerException if <code>image</code> is <code>null</code>
 * @param image the non-null <code>Image</code> to be used
 * @see #getImage
 * @see Image
 * @see SystemTray#add(TrayIcon)
 * @see TrayIcon#TrayIcon(Image, String)
 */
public void setImage(Image image) {
    if (image == null) {
        throw new NullPointerException("setting null Image");
    }
    this.image = image;
    
    TrayIconPeer peer = this.peer;
    if (peer != null) {
        peer.updateImage();
    }
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:34,代码来源:TrayIcon.java


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