1// BEGIN LICENSE BLOCK
2// Version: CMPL 1.1
3//
4// The contents of this file are subject to the Cisco-style Mozilla Public
5// License Version 1.1 (the "License"); you may not use this file except
6// in compliance with the License.  You may obtain a copy of the License
7// at www.eclipse-clp.org/license.
8//
9// Software distributed under the License is distributed on an "AS IS"
10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
11// the License for the specific language governing rights and limitations
12// under the License.
13//
14// The Original Code is  The ECLiPSe Constraint Logic Programming System.
15// The Initial Developer of the Original Code is  Cisco Systems, Inc.
16// Portions created by the Initial Developer are
17// Copyright (C) 2006 Cisco Systems, Inc.  All Rights Reserved.
18//
19// Contributor(s):
20//
21// END LICENSE BLOCK
22
23package com.parctechnologies.eclipse.visualisation;
24
25import com.parctechnologies.eclipse.*;
26
27import javax.swing.table.TableCellRenderer;
28import att.grappa.CustomRenderer;
29import att.grappa.Element;
30import att.grappa.Node;
31import java.util.List;
32import java.util.Collection;
33
34/**
35 * A ViewletType is a Java object which contains info on how to
36 * render, store, extract data from ECLiPSe and apply actions to
37 * representations of viewable elements.
38 *
39 * <p> Single instances of ViewletTypes willbe associated with any
40 * given viewer.
41 * */
42public interface ViewletType extends SymRefable
43{
44    /**
45     * Returns the renderer for this type of viewlet
46     */
47    public TableCellRenderer getTableCellRenderer();
48
49    /**
50     * Setup the graph element
51     */
52    public void customizeElement(ViewletDataStore store,
53                                 java.util.List index,
54                                 Element element);
55
56
57    BatchGoal collectPreBuildGoal(Viewer viewer,
58                                  ViewletDataStore store,
59                                  ViewletRange range);
60
61    void startBuild(Viewer viewer,
62                    ViewletDataStore store,
63		    ViewletRange range,
64		    List goalResults);
65
66    void stopBuild();
67
68    BatchGoal collectPreUpdateGoal(Viewer viewer,
69                                   ViewletDataStore store,
70				   ViewletRange range,
71				   UpdateEvent updateEvent);
72
73    void startUpdate(Viewer viewer,
74                     ViewletDataStore store,
75                     ViewletRange range,
76                     List results,
77                     UpdateEvent updateEvent);
78
79    void stopUpdate(Viewer viewer,
80                    ViewletDataStore store,
81		    ViewletRange range);
82
83    Collection getActions(ViewletDataStore store,
84                          ViewletRange range) ;
85
86    /**
87     * Description of the viewlet type produced, e.g. "Bounds Viewlet"
88     */
89    String getDescription();
90}
91
92
93
94
95