Difference between revisions of "JFace Viewer - Implementation of Pluggable Adapter Pattern"

From Eclipsepedia

Jump to: navigation, search
(JFace Viewer - Implementation of Pluggable Adapater Pattern)
 
 
Line 1: Line 1:
'''JFace Viewer - Implementation of Pluggable Adapter Pattern.'''
+
==Introduction to Pluggable Adapter Pattern==
  
 
Pluggable Adapter Pattern is a Variant of Adapter Pattern which could be implemented in 2 Fashions.<br>
 
Pluggable Adapter Pattern is a Variant of Adapter Pattern which could be implemented in 2 Fashions.<br>
Line 5: Line 5:
 
#Using Delegating Objects
 
#Using Delegating Objects
  
 +
==How is it used in JFace Viewers==
 
The main responsibility of the Viewer is to populate a widget from a domain model without making any assumptions about domain itself. JFace viewer uses the Delegating Objects mechanism in Pluggable Adapter Pattern to implement the above requirement.<br>
 
The main responsibility of the Viewer is to populate a widget from a domain model without making any assumptions about domain itself. JFace viewer uses the Delegating Objects mechanism in Pluggable Adapter Pattern to implement the above requirement.<br>
  

Latest revision as of 14:22, 30 November 2008

[edit] Introduction to Pluggable Adapter Pattern

Pluggable Adapter Pattern is a Variant of Adapter Pattern which could be implemented in 2 Fashions.

  1. Using Abstract Methods
  2. Using Delegating Objects

[edit] How is it used in JFace Viewers

The main responsibility of the Viewer is to populate a widget from a domain model without making any assumptions about domain itself. JFace viewer uses the Delegating Objects mechanism in Pluggable Adapter Pattern to implement the above requirement.

Viewer uses two seperate Delegating Objects called as

  1. Content Provider - For traversing the domain structure.
  2. Label Provider - For presenting the domain object.