Icons in an ITreeRidget [message #583482] |
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
|
|
|
Powered by
FUDForum. Page generated in 0.02012 seconds