Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "JFace Viewer - Implementation of Strategy Pattern"

(New page: ==JFace Viewers - Implementation of Strategy Pattern== In the Viewers implementation you would want to customise its behaviour #Sorting #Filtering <br> In addition to customising, you may ...)
 
(JFace Viewers - Implementation of Strategy Pattern)
 
Line 1: Line 1:
==JFace Viewers - Implementation of Strategy Pattern==
+
==Introduction==
 
In the Viewers implementation you would want to customise its behaviour
 
In the Viewers implementation you would want to customise its behaviour
 
#Sorting
 
#Sorting
Line 5: Line 5:
 
<br>
 
<br>
 
In addition to customising, you may also want to reuse the same Sorting and Filtering Algorithm in some other viewer also. Therefore eclipse uses Strategy Pattern to implement these features without disturbing the loading and filling of the Viewer.
 
In addition to customising, you may also want to reuse the same Sorting and Filtering Algorithm in some other viewer also. Therefore eclipse uses Strategy Pattern to implement these features without disturbing the loading and filling of the Viewer.
<br>
+
 
In Strategy Pattern, the expected behaviour is handled by a seperate object. Therefore the concept of ViewerSorter and ViewerFilter are available in JFace Viewers and these are initialised when required to apply the customised behaviour in a Viewer.
+
==How is Strategy Pattern used?==
 +
In Strategy Pattern, the expected behaviour is handled by a seperate object. <br>
 +
Therefore the concept of ViewerSorter and ViewerFilter are implementation examples of Strategy Pattern used in JFace Viewers. These are initialised when required to apply the customised behaviour in a Viewer.

Latest revision as of 14:13, 30 November 2008

Introduction

In the Viewers implementation you would want to customise its behaviour

  1. Sorting
  2. Filtering


In addition to customising, you may also want to reuse the same Sorting and Filtering Algorithm in some other viewer also. Therefore eclipse uses Strategy Pattern to implement these features without disturbing the loading and filling of the Viewer.

How is Strategy Pattern used?

In Strategy Pattern, the expected behaviour is handled by a seperate object.
Therefore the concept of ViewerSorter and ViewerFilter are implementation examples of Strategy Pattern used in JFace Viewers. These are initialised when required to apply the customised behaviour in a Viewer.

Back to the top