Skip to main content

JNTreeTable - default tree icons

1 reply [Last post]
Anonymous

I think the JNTreeTable should implement default icons for the tree in
case the user dont provide any. These icons could be obtainer from the
UIDefaults.

If the user dont supply any icons the JNTreeTable will look like a
table, and only expand it nodes by programming, all user interaction is
disabled.
JXTreeTable could remain as it is because is a low-level component.

By putting the default icons on the constructor this is solved easily
with something like this:

<br />
public JNTreeTable() { // constructor<br />
...</p>
<p>    leafIcon = UIManager.getIcon("Tree.leafIcon");<br />
    openIcon = UIManager.getIcon("Tree.openIcon");<br />
    closedIcon = UIManager.getIcon("Tree.closedIcon");<br />
    expandedIcon = UIManager.getIcon("Tree.expandedIcon");<br />
    collapsedIcon = UIManager.getIcon("Tree.collapsedIcon");<br />
}<br />

What do you think?

Ricardo Lopes.

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ricardo Lopes

Forget, what i said on my last post, i need to get some sleep.

I'm working on a TreeTableModel, and it doesn't show the icons for the
tree.

It only appears the root node, the only way to show the child nodes is
to call JNTreeTable.expandAll(), any sugestions?

Ricardo Lopes wrote:

> I think the JNTreeTable should implement default icons for the tree in
> case the user dont provide any. These icons could be obtainer from the
> UIDefaults.
>
> If the user dont supply any icons the JNTreeTable will look like a
> table, and only expand it nodes by programming, all user interaction
> is disabled.
> JXTreeTable could remain as it is because is a low-level component.
>
> By putting the default icons on the constructor this is solved easily
> with something like this:
>
> [code]
> public JNTreeTable() { // constructor
> ...
>
> leafIcon = UIManager.getIcon("Tree.leafIcon");
> openIcon = UIManager.getIcon("Tree.openIcon");
> closedIcon = UIManager.getIcon("Tree.closedIcon");
> expandedIcon = UIManager.getIcon("Tree.expandedIcon");
> collapsedIcon = UIManager.getIcon("Tree.collapsedIcon");
> }
> [/code]
>
> What do you think?
>
> Ricardo Lopes.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net