Difference: DpHipeViews (16 vs. 17)

Revision 172012-07-06 - DavideRizzo

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

Basic steps

Line: 38 to 39
 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 Viewable interface by sub-classing any %JCOMPONENT% implementation.
>
>
  • Implement the Viewable interface by sub-classing any %JCOMPONENT% implementation.
 
  • Register your implementation to the Extension Registry in the init.py file of your sub-system.
Changed:
<
<
The Viewable interface is a light-weight interface that provides the contents of a View. Your implementation should take the following into account:
>
>
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
  • The implementation requires a default, but light-weight constructor. Actual construction of a popup menu, a view menu, or a tool bar or contributions to the main tool bar or main menu (or combinations of them) should be done in the init(ViewPart part) method.
  • In principle only one instance of a view should exist.
Line: 101 to 102
 

Triggering events

Changed:
<
<
Your viewable may want to trigger site events which might be interesting to other views. The 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 [[ViewPart interface that is passed on through the init method gives you the means of triggering site events:
 
    private void someMethod() {
        :

Line: 113 to 114
 

Receiving events

Changed:
<
<
Your viewable may want to listen to site events produced by other views. For that you have to implement the 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 SiteEventListener interface and inform the event handler that you are interested in one or more event types, for instance:
 
public class MyView extends SomeSwingComponent implements Viewable, SiteEventListener {
   

Line: 168 to 169
 
<-- END OF COMMENT BOX CODE -->

Deleted:
<
<
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE View menu" date="1200329384" name="hipe-menu-view.jpg" path="hipe-menu-view.jpg" size="24016" user="Main.JorgoBakker" version="1"
 
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE View menu" date="1341414796" name="hipe-menu-view.png" path="hipe-menu-view.png" size="29796" user="Main.DavideRizzo" version="1"
Added:
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="HIPE View menu" date="1200329384" name="hipe-menu-view.jpg" path="hipe-menu-view.jpg" size="24016" user="Main.JorgoBakker" version="1"
 
META TOPICMOVED by="DavideRizzo" date="1272527966" from="Hcss.DpHipeViews" to="Public.DpHipeViews"
 
This site is powered by the TWiki collaboration platform Powered by Perl