Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6723611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:35:23+00:00 2026-05-26T09:35:23+00:00

I don’t know if I understand the Viewer framework exactly. This is an image

  • 0

I don’t know if I understand the Viewer framework exactly. This is an image I think that describes the framework :

enter image description here.

In my understanding, when we setInput on an object for a Tree, this object is feeded to the ContentProvider. The elements come out from the ContentProvider will be filtered by various filters. After that, the remaining elements will be sorted. Finally, the tree widget will take these elements and display them.
Is it correct ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:35:23+00:00Added an answer on May 26, 2026 at 9:35 am

    In my understanding, when we setInput on an object for a Tree, this
    object is feeded to the ContentProvider. The elements come out from
    the ContentProvider will be filtered by various filters. After that,
    the remaining elements will be sorted. Finally, the tree widget will
    take these elements and display them. Is it correct ?

    Yes it is correct.


    Explanation

    A viewer never directly talks to the data/domain objects. For example, the TreeViewer doesn’t talk to the domain objects directly. Instead, it uses another object called a ContentProvider, and this object uses your domain objects.

    enter image description here

    Just as there is a content provider object that gets the children of the tree nodes, when it comes to actually displaying the nodes, the tree viewer has another helper object: the label provider.

    enter image description here

    Similarly in order to handle tables, JFace has a TableViewer. Just like the TreeViewer, it has an input (a root object), a content provider, and a label provider. It’s simpler than the tree viewer since it doesn’t need to deal with trees.

    enter image description here

    Now if you look at the default TreeViwer implementation then you will find that in the createChildren() method (which is called on expansion of a node) there is a call to getSortedChildren(), which basically applies all the filters on the provided input (and on demand i.e. when the node is expanded) and finally applies the sorter that you have provided. Once all this is done the label provider will come into picture.

    Links:

    1. Using JFace and SWT in stand-alone mode
    2. Using the JFace image registry
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't think that I'm mad, I understand how php works! That being said. I
Don't know if there is a better way to do this, so that is
I don't understand where the extra bits are coming from in this article about
(Don't know if this is strictly on-topic, but I don't see any better Stack
Don't know if this has been asked before, so point me to another question
Don't know whats exactly going on, but it's definitely killing my time for nothing.
I don't know how better to describe this. So take this example. var a
I don't understand why this code doesn't work: function Messages(type,text) { console.log(In function Message);
Don't know if this is the right place to ask this, but I will
I don’t think I’ve grokked currying yet. I understand what it does, and how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.