Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ViewerFilter Question
ViewerFilter Question [message #444212] Fri, 10 February 2006 16:33 Go to next message
Eclipse UserFriend
Hello,

I created a ViewerFilter now I need to know how to get the little icon
at the top of the view to show with the filter. Do I need to create an
action that causes the filter to be activated? Any know examples would
be helpful.

Thanks,
Jim
Re: ViewerFilter Question [message #444214 is a reply to message #444212] Fri, 10 February 2006 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kwpeck.mersoft.com

Something like this in the createPartControl (where you create the tree)

Action filterAction = new Action("Filter") {
public void run() {
handleFilter();
}
};
filterAction.setToolTipText("Filter Data");

filterAction.setImageDescriptor(YourPlugin.getDescriptor(You rPlugin.IMAGE_FILTER));

filterAction.setDisabledImageDescriptor(YourPlugin.getDescri ptor(YourPlugin.IMAGE_FILTER_DISABLED));


getViewSite().getActionBars().getToolBarManager().add(filter Action);


James Leotta wrote:
> Hello,
>
> I created a ViewerFilter now I need to know how to get the little icon
> at the top of the view to show with the filter. Do I need to create an
> action that causes the filter to be activated? Any know examples would
> be helpful.
>
> Thanks,
> Jim
Re: ViewerFilter Question [message #444222 is a reply to message #444214] Fri, 10 February 2006 17:57 Go to previous message
Eclipse UserFriend
Thanks Kevin, worked great!

Kevin Peck wrote:
> Something like this in the createPartControl (where you create the tree)
>
> Action filterAction = new Action("Filter") {
> public void run() {
> handleFilter();
> }
> };
> filterAction.setToolTipText("Filter Data");
>
> filterAction.setImageDescriptor(YourPlugin.getDescriptor(You rPlugin.IMAGE_FILTER));
>
>
> filterAction.setDisabledImageDescriptor(YourPlugin.getDescri ptor(YourPlugin.IMAGE_FILTER_DISABLED));
>
>
>
> getViewSite().getActionBars().getToolBarManager().add(filter Action);
>
>
> James Leotta wrote:
>> Hello,
>>
>> I created a ViewerFilter now I need to know how to get the little icon
>> at the top of the view to show with the filter. Do I need to create an
>> action that causes the filter to be activated? Any know examples
>> would be helpful.
>>
>> Thanks,
>> Jim
Previous Topic:Wizard´s buttons
Next Topic:Displaying an EMF model inside a TreeViewer
Goto Forum:
  


Current Time: Sat Jul 05 10:49:05 EDT 2025

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

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

Back to the top