Swing/AnimatedToolTip のバックアップソース(No.6)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- バックアップ を表示
- Swing/AnimatedToolTip へ行く。
- 1 (2007-04-23 (月) 09:48:54)
- 2 (2010-12-12 (日) 23:19:07)
- 3 (2014-10-02 (木) 03:46:55)
- 4 (2015-03-02 (月) 11:23:22)
- 5 (2017-01-17 (火) 15:04:14)
- 6 (2017-12-15 (金) 14:29:05)
- 7 (2018-03-25 (日) 16:48:22)
- 8 (2018-10-15 (月) 13:19:00)
- 9 (2020-10-11 (日) 20:21:34)
- 10 (2022-07-10 (日) 04:43:58)
- 11 (2024-02-15 (木) 20:21:06)
- 12 (2024-05-09 (木) 18:01:14)
--- category: swing folder: AnimatedToolTip title: JToolTipのアニメーション tags: [JToolTip, JLabel, Animation, Html] author: aterai pubdate: 2007-04-23T09:48:54+09:00 description: JToolTipが表示されたとき、内部のJLabelでアイコンのアニメーションを行う方法をテストします。 image: https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTHpat_rFI/AAAAAAAAARg/fzkRLOHGb7I/s800/AnimatedToolTip.png --- * 概要 [#summary] `JToolTip`が表示されたとき、内部の`JLabel`でアイコンのアニメーションを行う方法をテストします。 #download(https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTHpat_rFI/AAAAAAAAARg/fzkRLOHGb7I/s800/AnimatedToolTip.png) * サンプルコード [#sourcecode] #code(link){{ JLabel l3 = new JLabel("Gif Animated ToolTip(html)"); l3.setToolTipText("<html><img src='" + url + "'>Test3</html>"); }} * 解説 [#explanation] - 上 -- `javax.swing.Timer`を使ってアニメーションを行う`JLabel`を使用 -- [[Timerでアニメーションするアイコンを作成>Swing/AnimeIcon]] #code{{ JLabel l1 = new JLabel("Timer Animated ToolTip") { @Override public JToolTip createToolTip() { JToolTip tip = new AnimatedToolTip(new AnimatedLabel("")); tip.setComponent(this); return tip; } }; l1.setToolTipText("dummy"); }} - 中 -- `Animated GIF`ファイルを`JLabel`のアイコンとして使用 - 下 -- `Animated GIF`ファイルを`<html>`タグを使って`JLabel`に貼り付けて使用 * 参考リンク [#reference] - [[JToolTipにアイコンを表示>Swing/ToolTipIcon]] - [[Timerでアニメーションするアイコンを作成>Swing/AnimeIcon]] - [[TrayIconのアニメーション>Swing/AnimatedTrayIcon]] * コメント [#comment] #comment #comment