?? advancedtrayicon.java
字號:
/** * @(#)AdvancedTrayIcon.java * * Copyright (c) 2001, JangHo Hwang * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the JangHo Hwang nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $Id: AdvancedTrayIcon.java,v 1.1 2002/03/17 07:46:48 xrath Exp $ */package rath.tools.tray;import java.awt.Image;import java.io.UnsupportedEncodingException;/** * Shell32.dll version 5.0 撈惑俊輯父 蠟瓤茄 矯膠袍 飄飯撈俊輯狼 * 淺急檔框富殿狼 眠啊瀝焊甫 唱鷗郴絆 酵闌錠 葷儈竅綽 飄飯撈 瀝焊 努貳膠撈促. * <p> * 撈 努貳膠甫 烹秦 飄飯撈俊 殿廢闌 竅霸 登擱, 秦寸 淺急 檔框富籃 殿廢 薦青闌 * 竅綽 溜矯, 淺急檔框富撈 唱鷗朝 巴撈哥, 敲閥汽付促 促福瘤父, 距 10檬 饒俊 * 磊悼欄肺 葷扼龍 巴撈促. 焊咯臨 鞘夸己撈 樂闌錠付促 * {@link TrayIconManager#modifyTrayIcon(rath.tools.tray.TrayIcon,int) * TrayIconManager.modifyTrayIcon} 皋家靛甫 烹竅咯 函悼 葷角闌 烹瘤秦林絹具 茄促. * <p> * Shell32.dll籃 扁夯利欄肺 Windows ME/2000俊父 扁夯利欄肺 硅器登絹樂綽 dll撈促. * 弊礬骨肺 AdvancedTrayIconInfo綽 Windows ME/2000 俊輯父 葷儈啊瓷 茄 努貳膠撈促. * * @author Jangho Hwang, windrath@hanmail.net * @version $Id: AdvancedTrayIcon.java,v 1.1 2002/03/17 07:46:48 xrath Exp $, since 2001/12/19 */public class AdvancedTrayIcon extends TrayIcon{ /** * 淺急檔框富 扁瓷闌 唱鷗郴綽 int屈 惑薦撈促. */ public static final int TYPE_BALOON = 0x00000010; /** * 淺急 檔框富 力格狼 糠俊 酒撈能闌 持瘤 臼擺促綽 惑薦撈促. */ public static final int ICON_NONE = 0; /** * 淺急 檔框富 力格狼 糠俊 瀝焊 酒撈能(蠢腸釬)甫 唱鷗郴綽 惑薦撈促. */ public static final int ICON_INFORMATION = 1; /** * 淺急 檔框富 力格狼 糠俊 版絆 酒撈能闌 唱鷗郴綽 惑薦撈促. */ public static final int ICON_WARNING = 2; /** * 淺急 檔框富 力格狼 糠俊 坷幅 酒撈能(X釬矯)甫 唱鷗郴綽 惑薦撈促. */ public static final int ICON_ERROR = 3; private String baloonText = ""; // Default value private String baloonTitle = ""; // Default value private int infoFlag = ICON_NONE; // Default value public AdvancedTrayIcon( NativeIcon icon ) { super( icon ); } public AdvancedTrayIcon( NativeIcon icon, String tip ) { super( icon, tip ); } /** * 泅犁 淺急 檔框富狼 郴儈闌 掘絹柯促. */ public String getBaloonText() { return this.baloonText; } /** * 泅犁 淺急 檔框富狼 郴儈闌 system default encoding闌 撈儈竅咯 * byte[] 屈怕肺 函券竅咯 館券茄促. */ public byte[] getBaloonTextBytes() throws UnsupportedEncodingException { return super.getBytes(this.baloonText); } /** * 淺急 檔框富 郴儈闌 汲瀝茄促. */ public void setBaloonText( String text ) { if( text==null ) text = ""; this.baloonText = text; } /** * 泅犁 汲瀝等 淺急 檔框富 力格闌 掘絹柯促. */ public String getBaloonTitle() { return this.baloonTitle; } /** * 泅犁 淺急 檔框富狼 力格闌 system default encoding闌 撈儈竅咯 * byte[] 屈怕肺 函券竅咯 館券茄促. */ public byte[] getBaloonTitleBytes() throws UnsupportedEncodingException { return super.getBytes(this.baloonTitle); } /** * 淺急 檔框富狼 力格闌 汲瀝茄促. 撈 力格籃 淺急 檔框富撈 popup 竅看闌錠 * 惑竄俊 <b>Bold</b> 屈怕肺 力格 酒撈能 官肺 糠俊 唱鷗唱綽 力格撈促. */ public void setBaloonTitle( String title ) { if( title==null ) title = ""; this.baloonTitle = title; } /** * 淺急 檔框富狼 力格 諒螟俊 煉弊付茄 酒撈能闌 竅唱 持闌 薦 樂綽單, 弊 藹闌 * 汲瀝茄促. 撈 藹欄肺綽 ICON_NONE, ICON_INFO, ICON_WARNING, ICON_ERROR 啊 * 葷儈瞪 薦 樂欄哥, default 藹籃 ICON_NONE撈促. */ public void setBaloonIcon( int icon ) { this.infoFlag = icon; } /** * 泅犁 汲瀝等 淺急 檔框富 酒撈能 內靛甫 啊廉柯促. 撈 藹籃 * ICON_NONE, ICON_INFO, ICON_WARNING, ICON_ERROR 吝狼 竅唱啊 瞪 巴撈促. */ public int getBaloonIcon() { return this.infoFlag; } /** * 撈 飄飯撈酒撈能 努貳膠啊 泅犁 敲閥汽俊輯 葷儈啊瓷茄 努貳膠牢瘤 * 煉葷竅咯 霖促. */ private boolean isAvailablePlatform() { String os = System.getProperty("os.name").toLowerCase(); if( os.startsWith("windows me") || os.startsWith("windows 20") || os.startsWith("windows wh") || os.startsWith("windows xp") ) return true; return false; } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -