[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Creating Dynamic Entry of Objects In Palette

This question sounds familiar...

Yes, this is quite possible and the palette model contains notification for 
this purpose.  You can do either of the following:

1) PaletteEntry#setVisible(false)
2) PaletteContainer.remove(childEntry)

The rules for when to call these methods would be specific to your 
application.  Also, you might want to use a unique instance of the palette 
model for each editor.  That way the state of one editor would not affect 
the palette display of another.

"Ved gunjan" <gunjan_sir@xxxxxxxxx> wrote in message 
news:3324bdcac7e458f32a13f6f61ac3e5c6$1@xxxxxxxxxxxxxxxxxx
>
> Hi,
> This is my case.
> I want to make dynamic entries of objects in palette based on some action.
> When i click on an enitity (which are pre-populated)in the Property Sheet, 
> then  based on some business logic i would like my Palette to be 
> populated.
> i.e suppose if i have total of 10 objects in the palette,then based on 
> some user actions ,few out of that 10 should be populated in the 
> palette,say 5... when other conditions are satisfied i get 8 objects in 
> the palette....
> and so on...so the point the objects in the palette should be added in the 
> runtime and not at the compile time as normally it happens.
> can any one throw some knowledge, whether it is possible in GEF framework 
> ,and if it is then how should i go about it.
>
> Best regards
> Ved Gunjan
>