Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Icon Format & API

843806Mar 25 2008
Hi Folks,

I just posted an API and proposed standard format for Java icons and icon bundles. You can find the binaries and source in [this blog post|http://www.techhui.com/profiles/blog/show?id=1702911%3ABlogPost%3A9724]. As always comments, questions and creative insults are welcome.

A few of the features include:
- Support for vector and bitmap icons
- Bundled icon variants
- A simple to use API that supports smooth scaling, simple filters, and layering

Examples:
// Fetch an icon of size 24 (the icon will be automatically resized from the closest larger neighbor for bitmaps)
JIconFile file = new JIconFile(iconURL);
ImageIcon icon = file.getIcon(24);

// Fetch an rollover version of the same icon
ImageIcon icon = file.getIcon("rollover", 24);

// Create an arrow icon
Icon rightArrow = ShapeIcon.arrow(10, 10, ShapeIcon.RIGHT);
This is a reworked version of the icon API I contributed to the SwingX incubator a few years back. I hope you find it useful.

Cheers,
Dan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2008
Added on Mar 25 2008
0 comments
82 views