Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » different icons in outline tree
different icons in outline tree [message #1017745] Tue, 12 March 2013 13:24 Go to next message
Wolfgang Strunk is currently offline Wolfgang StrunkFriend
Messages: 6
Registered: July 2009
Junior Member
I am evaluating Scout and try to mimic an application we already built.

The app is heavily using something like a tree to navigate through available elements of a database. I would like to have different icons in the tree representing different node types like in the following example: index.php/fa/13805/0/

What is the best way to achieve that? Would I have to overide getConfiguredIconId() for every Page type I define?

[Updated on: Sat, 16 March 2013 14:58]

Report message to a moderator

Re: different icons in outline tree [message #1017998 is a reply to message #1017745] Tue, 12 March 2013 23:42 Go to previous messageGo to next message
Lukas Huser is currently offline Lukas HuserFriend
Messages: 42
Registered: March 2010
Member
Hi Wolfgang

Your screenshot matches very well with an outline based application. I think it should be straight forward to create a similar application with Scout Smile

In a Scout application, the "Schema" (and possibly "Database") nodes become node pages, the "Object Classes" (and possibly "Attributes") nodes become table pages (See pages for more info).

Icons for tree nodes and table rows are easily configured in the Scout SDK (or by overriding the corresponding getConfiguredXXX() methods). There are three different places where you want to define an icon:

  • Icon for a node page (e.g. the tree node icon for the "Schema" node): Override getConfiguredIconId() on your node page (e.g. SchemaNodePage). See [1] in example below.
  • Icon for a table page (e.g. the tree node icon for the "Object Classes" node): Override getConfiguredIconId() on your table page (e.g. ObjectClassesTablePage). See [2] and [4] in example below.
  • Icon for each row in a table page (e.g. the row icon for each object in the object table): Override getConfiguredDefaultIconId() on the table (inner class) of your table page. See [3] in example below.
  • If you want to display different icons for different rows within a table, you need to provide the iconId for each row and explicitly set it on the row. See [5] in example below (It uses an invisible icon column which is filled for each row, the icon is then explicitly set on each row in the execDecorateCell() method).

To make an icon available to your application, see the corresponding howto.

Here is an example of what the structure of your application could look like:
index.php/fa/13820/0/

With the corresponding screenshots (using somewhat arbitrary icons Smile):
index.php/fa/13823/0/

index.php/fa/13824/0/

[Updated on: Tue, 12 March 2013 23:49]

Report message to a moderator

Re: different icons in outline tree [message #1046957 is a reply to message #1017998] Mon, 22 April 2013 15:41 Go to previous message
Wolfgang Strunk is currently offline Wolfgang StrunkFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks Lukas, that confirmed my assumption and also pointed to the table part which I was missing.
Previous Topic:JUnit version used by testing support?
Next Topic:CODES.getAllCodeTypes(..)
Goto Forum:
  


Current Time: Thu Apr 25 01:52:14 GMT 2024

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

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

Back to the top