Difference: DpHipeViews (3 vs. 4)

Revision 42008-01-15 - JaimeSaiz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Creating a View

Line: 19 to 19
 The aim is that your contribution is automatically picked up by the infrastructure, such that your view is added to the view menu, as shown in the picture on the right.

To make this happen, you will have to:

Changed:
<
<
  • Implement the herschel.ia.core.parts.Viewable interface by extended a JComponent implementation.
  • Register your implementation to the herschel.ia.core.ExtensionRegistry in the __init__.py
>
>
  • Implement the herschel.ia.kernel.parts.Viewable interface by extended a JComponent implementation.
  • Register your implementation to the herschel.ia.kernel.ExtensionRegistry in the __init__.py
  The Viewable interface is a light-weight interface that provides the contents of a View. Your implementation should take the following into account:
  • The implementation must be an extension of a swing component
Line: 86 to 86
 

Trigger events

Changed:
<
<
Your viewable may want to trigger site events which might be interesting to other views. The herschel.ia.core.parts.ViewPart interface that is passed on through the init method gives you the means of triggering site events:
>
>
Your viewable may want to trigger site events which might be interesting to other views. The herschel.ia.kernel.parts.ViewPart interface that is passed on through the init method gives you the means of triggering site events:
 
    private void somemethod() {
        :

Line: 98 to 98
 

Receiving events

Changed:
<
<
Your viewable may want to listen to site events produced by other views. For that you have to implement the herschel.ia.core.SiteEventListener interface and inform the event handler that you are interested in one or more event types, e.g.:
>
>
Your viewable may want to listen to site events produced by other views. For that you have to implement the herschel.ia.kernel.SiteEventListener interface and inform the event handler that you are interested in one or more event types, e.g.:
 
public class MyView extends SomeSwingComponent implements Viewable, SiteEventListener {
   

 
This site is powered by the TWiki collaboration platform Powered by Perl