Re: Drawing Icons
- From: Daniel Pitts <newsgroup.spamfilter@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 14:35:26 -0800
Jason Cavett wrote:
I am working on a tree cell renderer (currently, extendsYou can create an Icon for every state that node can have (which looks like three from here). You should create an image (for example a png image) for those states, and then use ImageIcon()
DefaultTreeCellRenderer) and I want to be able to "draw" the icons as
I need them. Here's an explanation of what I mean.
If the tree is displaying a node and the node is in its default state,
I want this:
[Icon]
If the tree is displaying a node and the node is "opened":[Icon]
If the tree is displaying a node and the node is "opened" and has a
note attached:
[Icon{n}]
Basically, I want to be able to draw what I need (on the fly) so I can
build up the icon. I do realize I could just create every possible
icon and display the right one depending on the state of the
underlying node, but that seems to be very inefficient, especially as
I add more nodes.
Hopefully this message makes sense. Can anybody provide any insight?
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
.
- Follow-Ups:
- Re: Drawing Icons
- From: Jason Cavett
- Re: Drawing Icons
- References:
- Drawing Icons
- From: Jason Cavett
- Drawing Icons
- Prev by Date: Re: Why is Applet Slower than Application?
- Next by Date: Re: Can I display report in different format in JAVA/JSP
- Previous by thread: Re: Drawing Icons
- Next by thread: Re: Drawing Icons
- Index(es):
Relevant Pages
|
|