Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

Drawing images over tree icons

Thread view: 
SPC - 18 Dec 2003 12:00 GMT
I have a treetable and have to display some status indicators for
objects in the treetable. The chosen way of doing this (not entirely
my choice) is to overlay the tree icons with small images representing
these states. Increasing the gap between icon and text and drawing in
that space *isn't* an option.

So, I have my images as giffs or png (don't mind) they are relatively
small ~7x7 pixcels with transparent backgrounds. I can draw them Ok.
The problem is that they don't stand out from the tree icon as well as
I'd like. I could surround the image with a border of some other
colour, but this makes it bigger and obscures what's underneath.

Is there som java2d/giff/png magic that would let the transparent
areas be drawn semi opaque to make it look as if the image is actually
above the icon.

This is something of a new area for me, so apologies if the answer to
this is blindingly obvious.

Regards

Steve
ak - 18 Dec 2003 18:11 GMT
make it semiopaque by yourself:

pixel is semiopaque (or semitransparent) if alpha value is 127,
pixel is opaque if alpha value is 255,
pixel is transparent if alpha value is 0.

You can use BufferedImage (with Alpha-channel) or MemoryImageSource for such
things.

____________

http://reader.imagero.com the best java image reader.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.