AW: [udig-devel] Custom App Information View
Jesse Eichar
jeichar.w at gmail.com
Mon Apr 28 00:48:12 PDT 2008
The secret behind what is showing in the Info view is eclipse's
properties framework. A couple places to continue this search:
net.refractions.udig.project.ui.internal.adapters.FeatureAdapterFactory
And the definition of the adapters in the plugin.xml in the project.ui
plugin:
<extension
id="net.refractions.udig.project.ui.adapters"
point="org.eclipse.core.runtime.adapters">
<factory
class
=
"net
.refractions.udig.project.ui.internal.adapters.FeatureAdapterFactory"
adaptableType="org.geotools.feature.Feature">
<adapter
type="org.eclipse.ui.views.properties.IPropertySource"/>
<adapter
type="org.eclipse.ui.views.properties.IPropertySource2"/>
<adapter
type="org.eclipse.jface.viewers.ITreeContentProvider"/>
<adapter
type="org.eclipse.jface.viewers.IStructuredContentProvider"/>
<adapter type="org.eclipse.jface.viewers.IContentProvider"/>
<adapter type="org.eclipse.jface.viewers.ILabelProvider"/>
<adapter type="org.eclipse.jface.viewers.ITableColorProvider"/>
<adapter type="org.eclipse.jface.viewers.ITableLabelProvider"/>
<adapter
type
=
"net
.refractions.udig.project.ui.internal.adapters.FeatureTableProvider"/>
<adapter type="org.eclipse.core.runtime.IAdaptable"/>
</factory>
What the info view is doing is just showing the properties table of
the features. If you add the Eclipse properties view and select a
feature you will see the same output. So you can also research the
properties view.
Although in all honesty you may be best served by just implementing
your own tree/table. It will probably be faster.
Jesse
On 27-Apr-08, at 5:13 AM, Geoff Hay wrote:
> Hi
> The Information view (which responds to the Info Tool) seems to have
> a tree in the first column of the table. I would like to add some
> entries in that table. I have looked through the
> net.refractions.udig.tool.select.TableView and associated classes
> and cannot find any mention of a tree so I guess I am looking at the
> wrong class. The classes in net.refractions.udig.tool.info seem more
> like what I am after. Can you confirm which class it is I should be
> subclassing and which adapter (or what mechanism) I need to provide
> to be able to add my data to this Information View?
>
> I imagine I can add my new infomation view cass as a pluggin. I'll
> then need to have it respond to the infotool - perhaps you could
> advise me on how to do this.
>
> and there's a whole bunch of other things that can wait....
>
> thanks for your help :)
> geoff
>
> Geoff Hay wrote:
>>> That is a good approach; you can even subclass the TableView
>>> implementation and ask it to a tree table viewer ...
>>>
>> I have looked through TableView and FeatureTableControl but am not
>> sure how to ask it to be a treeview.
>>
> Use it as an example, literally copy the the code to a new file, and
> where it makes a JFace TableViewer use a JFace TreeTable viewer
> instead.
> You will need to supply an additional adapter teaching the TreeTable
> how
> you want your content organized ...
>
> Now I can think of a couple reasons you would like a TreeTable....
> - hide the display of attributes until the user opens them up
> - break the results down into folders 0..1000, 1001,2000 etc...
> - etc....
>
> I would be interested in known which one of these stories you are
> looking into. There is some work to support "paged' queries on trunk
> which really would be very helpful for making the TableView work with
> large content.
>> Another possibility is using a separate tree control that responds
>> to map selections and provides FeatureSources? (db records) to the
>> TableViewer? Would that be easier?
>>
> I don't have the code in front of me (to check what is done now) so I
> cannot say which is going to be easier.
>>> What do you mean by "select related tables and view their
>>> attributes"?
>>> It sounds like you have a more interesting data structure than just
>>> "simple" Features, if you are getting into the use of external
>>> keys and
>>> so on you will need to talk to Gabriel about the work he is doing on
>>> trunk with Associations.
>>>
>> I am working on an idea for temporal maps where featues are
>> organised based on transitions rather than snapshot states. I am
>> hoping to be able to present a prototype soon and am very pleased
>> with udig and the eclipse RCP so far although its all abit of a
>> learning curve.
>>
> Very cool. You will find there are a whole range of facinating JFace
> viewers around (one you get your tree table concept worked out you can
> use any of them). Check out the Zest project done by the university
> here
> in town ...
> - http://wiki.eclipse.org/Mylyn_Zest_Visualization
> - http://www.eclipse.org/gef/zest/zest.php
>
> I am glad you are having a good time,
> Jody
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20080428/9a907168/attachment-0001.html
More information about the udig-devel
mailing list