Hi,
Please change your code to:
public class CellRenderer extends DefaultTableTreeCellRenderer {
public IRendererComponent getTableTreeCellRendererComponent(ULCTableTree
tableTree, Object value, boolean selected, boolean hasFocus, boolean
expanded, boolean leaf, Object node) {
setIcon(IconFactory.getIcon("E:/eclipse/workspace/TmxMPApplicationAlpha/se
rver/images/up-icon.gif"));
>>> return this;
}
Right now you are specifying an icon from your E disk. In deployment, you
will have to bundle your gif file as a resource that is available on the
class path of your ULC application.
I hope this helps.
Thanks and regards,
Janak
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Pankaj Patro
Sent: Sunday, December 17, 2006 8:11 PM
To: [email protected]
Subject: [ULC-developer] Cell rendere in TableTree application
hi ,
//Problem : Cell renderer is not working, (what image I am setting for a
particluar cell it is not showing)
I am setting a image Icon to 2nd column of my table tree application. There
I am using DefaultTableTreeCellRenderer, my renderer classes is given below
public
class CellRenderer extends DefaultTableTreeCellRenderer {
public IRendererComponent getTableTreeCellRendererComponent(ULCTableTree
table, Object value, boolean arg2, boolean arg3, boolean arg4, boolean arg5,
Object arg6) {
setIcon(IconFactory.getIcon("E:/eclipse/workspace/TmxMPApplicationAlpha/serv
er/images/up-icon.gif")); // this Icon is exist in my system & path is
correct
setVisible(true);
return super.getTableTreeCellRendererComponent(table, value, arg2, arg3,
arg4, arg5, arg6);
}
}
/**
in this class i m setting my renderer class to 2nd column,
public void start() {
rootPane = getRootPane();
DriveListTreeTableModal listTableTree =
new DriveListTreeTableModal();
ULCTableTree tableTree =
new ULCTableTree(listTableTree);
tableTree.getColumnModel().getColumn(1).setCellRenderer(
new CellRenderer());
ULCScrollPane scrollPane =
new ULCScrollPane(tableTree);
rootPane.add(scrollPane);
rootPane.setVisible(true);
}
**/
Problem : Cell renderer is not working, (what image I am setting for a
particluar cell it is not showing
please help me, how to work it out or is there any alternative solution for
it.
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer