-
Book Overview & Buying
-
Table Of Contents
Eclipse Plug-in Development Beginner's Guide - Second Edition
By :
Another common feature of viewers is filtering. This is used both when performing a manual search, as well as for filtering specific aspects from a view. Quite often, the filtering is connected to the view's menu, which is the drop-down triangle on the top right of the view, using a common name such as Filters. The ViewerFilter class provides a filtering method, confusingly called select (there are some filter methods, but these are used to filter the entire array; the select is used to determine if a specific element is shown or not).
Create a class TimeZoneViewerFilter in the com.packtpub.e4.clock.ui.internal package, which extends ViewerFilter. It should take a String pattern in the constructor, and return true if the element is a TimeZone with that pattern in its display name:
public class TimeZoneViewerFilter extends ViewerFilter {
private String pattern;
public TimeZoneViewerFilter(String pattern) {
this.pattern = pattern;
}
public...
Change the font size
Change margin width
Change background colour