Home » Eclipse Projects » Riena » Icons in an ITreeRidget
Icons in an ITreeRidget [message #487151] |
Tue, 22 September 2009 07:45 |
Ralf Heilek Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hey,
I'm using the ITreeRidget in my application and want to paint icons on
the nodes and leaves. In the javadoc (bindToModel()) I have read that
you can't alter the icon of a node, but of a leaf. That's a pity, cause
changing node icons is an essential feature for my application. Is there
any workaround?
BTW: the updateFromModel() method throws an exception if I call the this
method in an ActionListener after the initialization.
e.g.:
final ITreeRidget tree = (ITreeRidget)getRidget("tree");
tree.bindToModel(array, MyClass.class, "children", "parent",
"value", null, null, "icon");
tree.updateFromModel() //Thats works fine, no Exception
later, throws an IllegalArgumentException
button.addListener(new IActionListener() {
@Override
public void callback() {
//stuff
pTreeRidget.updateFromModel() // throws
IllegalArgumentException
}
});
Stack trace:
Tue Sep 22 08:25:55 CEST 2009 ERROR [main]
org.eclipse.riena.internal.core.exceptionmanager.SimpleExcep tionHandlerManager
Unhandled event loop exception
java.lang.IllegalArgumentException:
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
at
org.eclipse.riena.internal.ui.ridgets.swt.TableRidgetLabelPr ovider.setFormatters(TableRidgetLabelProvider.java:165)
at
org.eclipse.riena.internal.ui.ridgets.swt.TreeRidget.updateF romModel(TreeRidget.java:430)
at
de.archtech.myapplication.client.ClientSubModuleController.m yMethod(ClientSubModuleController.java:288)
Leaving out the "icon"-argument in the bindToModel() method and
supplying the method argument null or catching the exception, works fine.
I hope that somebody knows what's going on there. If this turns out to
be a bug, I would file a bug report.
Greetings Ralf
|
|
|
Re: Icons in an ITreeRidget [message #487675 is a reply to message #487151] |
Thu, 24 September 2009 06:33 |
Elias Volanakis Messages: 43 Registered: July 2009 |
Member |
|
|
Hi Ralf,
if you want to replace the icons for all tree ridgets you should change
node_collapsed.gif and node_expanded.gif.
Having different node icons for each tree ridget is not supported.
Please open a bugzilla issue for this, so we can keep track of this
feature request.
Thanks,
Elias.
Ralf Heilek wrote:
> Hey,
>
> I'm using the ITreeRidget in my application and want to paint icons on
> the nodes and leaves. In the javadoc (bindToModel()) I have read that
> you can't alter the icon of a node, but of a leaf. That's a pity, cause
> changing node icons is an essential feature for my application. Is there
> any workaround?
>
> BTW: the updateFromModel() method throws an exception if I call the this
> method in an ActionListener after the initialization.
> e.g.:
> final ITreeRidget tree = (ITreeRidget)getRidget("tree");
> tree.bindToModel(array, MyClass.class, "children", "parent",
> "value", null, null, "icon");
> tree.updateFromModel() //Thats works fine, no Exception
>
> later, throws an IllegalArgumentException
> button.addListener(new IActionListener() {
> @Override
> public void callback() {
> //stuff
> pTreeRidget.updateFromModel() // throws
> IllegalArgumentException
> }
> });
>
> Stack trace:
> Tue Sep 22 08:25:55 CEST 2009 ERROR [main]
> org.eclipse.riena.internal.core.exceptionmanager.SimpleExcep tionHandlerManager
> Unhandled event loop exception
> java.lang.IllegalArgumentException:
> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
> at
> org.eclipse.riena.internal.ui.ridgets.swt.TableRidgetLabelPr ovider.setFormatters(TableRidgetLabelProvider.java:165)
>
> at
> org.eclipse.riena.internal.ui.ridgets.swt.TreeRidget.updateF romModel(TreeRidget.java:430)
>
> at
> de.archtech.myapplication.client.ClientSubModuleController.m yMethod(ClientSubModuleController.java:288)
>
>
> Leaving out the "icon"-argument in the bindToModel() method and
> supplying the method argument null or catching the exception, works fine.
>
> I hope that somebody knows what's going on there. If this turns out to
> be a bug, I would file a bug report.
>
> Greetings Ralf
|
|
|
Re: Icons in an ITreeRidget [message #488741 is a reply to message #487675] |
Wed, 30 September 2009 05:46 |
Matt Seashore Messages: 58 Registered: July 2009 |
Member |
|
|
For reference, the bugzilla issues created from this thread are:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290586 (TreeRidget: custom
node icons in a TreeRidget)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290365 (TreeRidget:
updateFromModel() throws IllegalArgumentException)
Elias Volanakis wrote:
> Hi Ralf,
>
> if you want to replace the icons for all tree ridgets you should change
> node_collapsed.gif and node_expanded.gif.
>
> Having different node icons for each tree ridget is not supported.
> Please open a bugzilla issue for this, so we can keep track of this
> feature request.
>
> Thanks,
> Elias.
>
> Ralf Heilek wrote:
>> Hey,
>>
>> I'm using the ITreeRidget in my application and want to paint icons on
>> the nodes and leaves. In the javadoc (bindToModel()) I have read that
>> you can't alter the icon of a node, but of a leaf. That's a pity,
>> cause changing node icons is an essential feature for my application.
>> Is there any workaround?
>>
>> BTW: the updateFromModel() method throws an exception if I call the
>> this method in an ActionListener after the initialization.
>> e.g.:
>> final ITreeRidget tree = (ITreeRidget)getRidget("tree");
>> tree.bindToModel(array, MyClass.class, "children", "parent",
>> "value", null, null, "icon");
>> tree.updateFromModel() //Thats works fine, no Exception
>>
>> later, throws an IllegalArgumentException
>> button.addListener(new IActionListener() {
>> @Override
>> public void callback() {
>> //stuff
>> pTreeRidget.updateFromModel() // throws
>> IllegalArgumentException
>> }
>> });
>>
>> Stack trace:
>> Tue Sep 22 08:25:55 CEST 2009 ERROR [main]
>> org.eclipse.riena.internal.core.exceptionmanager.SimpleExcep tionHandlerManager
>> Unhandled event loop exception
>> java.lang.IllegalArgumentException:
>> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
>> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
>> at
>> org.eclipse.riena.internal.ui.ridgets.swt.TableRidgetLabelPr ovider.setFormatters(TableRidgetLabelProvider.java:165)
>>
>> at
>> org.eclipse.riena.internal.ui.ridgets.swt.TreeRidget.updateF romModel(TreeRidget.java:430)
>>
>> at
>> de.archtech.myapplication.client.ClientSubModuleController.m yMethod(ClientSubModuleController.java:288)
>>
>>
>> Leaving out the "icon"-argument in the bindToModel() method and
>> supplying the method argument null or catching the exception, works fine.
>>
>> I hope that somebody knows what's going on there. If this turns out to
>> be a bug, I would file a bug report.
>>
>> Greetings Ralf
|
|
|
Re: Icons in an ITreeRidget [message #583552 is a reply to message #487151] |
Thu, 24 September 2009 06:33 |
Elias Volanakis Messages: 43 Registered: July 2009 |
Member |
|
|
Hi Ralf,
if you want to replace the icons for all tree ridgets you should change
node_collapsed.gif and node_expanded.gif.
Having different node icons for each tree ridget is not supported.
Please open a bugzilla issue for this, so we can keep track of this
feature request.
Thanks,
Elias.
Ralf Heilek wrote:
> Hey,
>
> I'm using the ITreeRidget in my application and want to paint icons on
> the nodes and leaves. In the javadoc (bindToModel()) I have read that
> you can't alter the icon of a node, but of a leaf. That's a pity, cause
> changing node icons is an essential feature for my application. Is there
> any workaround?
>
> BTW: the updateFromModel() method throws an exception if I call the this
> method in an ActionListener after the initialization.
> e.g.:
> final ITreeRidget tree = (ITreeRidget)getRidget("tree");
> tree.bindToModel(array, MyClass.class, "children", "parent",
> "value", null, null, "icon");
> tree.updateFromModel() //Thats works fine, no Exception
>
> later, throws an IllegalArgumentException
> button.addListener(new IActionListener() {
> @Override
> public void callback() {
> //stuff
> pTreeRidget.updateFromModel() // throws
> IllegalArgumentException
> }
> });
>
> Stack trace:
> Tue Sep 22 08:25:55 CEST 2009 ERROR [main]
> org.eclipse.riena.internal.core.exceptionmanager.SimpleExcep tionHandlerManager
> Unhandled event loop exception
> java.lang.IllegalArgumentException:
> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
> at
> org.eclipse.riena.internal.ui.ridgets.swt.TableRidgetLabelPr ovider.setFormatters(TableRidgetLabelProvider.java:165)
>
> at
> org.eclipse.riena.internal.ui.ridgets.swt.TreeRidget.updateF romModel(TreeRidget.java:430)
>
> at
> de.archtech.myapplication.client.ClientSubModuleController.m yMethod(ClientSubModuleController.java:288)
>
>
> Leaving out the "icon"-argument in the bindToModel() method and
> supplying the method argument null or catching the exception, works fine.
>
> I hope that somebody knows what's going on there. If this turns out to
> be a bug, I would file a bug report.
>
> Greetings Ralf
|
|
|
Re: Icons in an ITreeRidget [message #583614 is a reply to message #487675] |
Wed, 30 September 2009 05:46 |
Matt Seashore Messages: 58 Registered: July 2009 |
Member |
|
|
For reference, the bugzilla issues created from this thread are:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290586 (TreeRidget: custom
node icons in a TreeRidget)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290365 (TreeRidget:
updateFromModel() throws IllegalArgumentException)
Elias Volanakis wrote:
> Hi Ralf,
>
> if you want to replace the icons for all tree ridgets you should change
> node_collapsed.gif and node_expanded.gif.
>
> Having different node icons for each tree ridget is not supported.
> Please open a bugzilla issue for this, so we can keep track of this
> feature request.
>
> Thanks,
> Elias.
>
> Ralf Heilek wrote:
>> Hey,
>>
>> I'm using the ITreeRidget in my application and want to paint icons on
>> the nodes and leaves. In the javadoc (bindToModel()) I have read that
>> you can't alter the icon of a node, but of a leaf. That's a pity,
>> cause changing node icons is an essential feature for my application.
>> Is there any workaround?
>>
>> BTW: the updateFromModel() method throws an exception if I call the
>> this method in an ActionListener after the initialization.
>> e.g.:
>> final ITreeRidget tree = (ITreeRidget)getRidget("tree");
>> tree.bindToModel(array, MyClass.class, "children", "parent",
>> "value", null, null, "icon");
>> tree.updateFromModel() //Thats works fine, no Exception
>>
>> later, throws an IllegalArgumentException
>> button.addListener(new IActionListener() {
>> @Override
>> public void callback() {
>> //stuff
>> pTreeRidget.updateFromModel() // throws
>> IllegalArgumentException
>> }
>> });
>>
>> Stack trace:
>> Tue Sep 22 08:25:55 CEST 2009 ERROR [main]
>> org.eclipse.riena.internal.core.exceptionmanager.SimpleExcep tionHandlerManager
>> Unhandled event loop exception
>> java.lang.IllegalArgumentException:
>> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
>> at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
>> at
>> org.eclipse.riena.internal.ui.ridgets.swt.TableRidgetLabelPr ovider.setFormatters(TableRidgetLabelProvider.java:165)
>>
>> at
>> org.eclipse.riena.internal.ui.ridgets.swt.TreeRidget.updateF romModel(TreeRidget.java:430)
>>
>> at
>> de.archtech.myapplication.client.ClientSubModuleController.m yMethod(ClientSubModuleController.java:288)
>>
>>
>> Leaving out the "icon"-argument in the bindToModel() method and
>> supplying the method argument null or catching the exception, works fine.
>>
>> I hope that somebody knows what's going on there. If this turns out to
>> be a bug, I would file a bug report.
>>
>> Greetings Ralf
|
|
|
Goto Forum:
Current Time: Sun Oct 06 23:06:22 GMT 2024
Powered by FUDForum. Page generated in 0.02899 seconds
|