Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Which function gets called first
Which function gets called first [message #454580] Mon, 25 April 2005 00:35 Go to next message
Eclipse UserFriend
I have the following code for a labelProvider:
class ViewLabelProvider extends LabelProvider implements IColorProvider{
....
...
public Image getImage(Object obj) {
....
}

public Color getForeground(Object element) {
...
}

public Color getBackground(Object element) {
....
}

}
which of these three function are called first when the viewer is
associated with this label provider
Say,
TreeViewer tv = new TreeViewer(...);
tv.setLabelProvider(new ViewLabelProvider());

and is the order of call same always, i.e when tree is expanded or
collapsed etc..
Re: Which function gets called first [message #454648 is a reply to message #454580] Tue, 26 April 2005 03:10 Go to previous message
Eclipse UserFriend
If you add some debug messages in each of the methods, you'll find out
that..

1. getImage(...)
2. getForeground(...)
3. getBackground(...)
4. getFont(...)
5. Looks like it

Emil

"Neeraj" <neerajkrishnag@yahoo.com> wrote in message
news:f0c5e651bad1493cdea3ec3a436f7e3d$1@www.eclipse.org...
>I have the following code for a labelProvider:
> class ViewLabelProvider extends LabelProvider implements IColorProvider{
> ...
> ..
> public Image getImage(Object obj) {
> ...
> }
>
> public Color getForeground(Object element) {
> ..
> }
>
> public Color getBackground(Object element) {
> ...
> }
>
> }
> which of these three function are called first when the viewer is
> associated with this label provider
> Say,
> TreeViewer tv = new TreeViewer(...);
> tv.setLabelProvider(new ViewLabelProvider());
>
> and is the order of call same always, i.e when tree is expanded or
> collapsed etc..
>
Previous Topic:How to avoid Composite Flicker ?
Next Topic:TableItem length
Goto Forum:
  


Current Time: Mon Jul 14 00:42:32 EDT 2025

Powered by FUDForum. Page generated in 0.26796 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top