KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > CompositeView


1 /*
2   Copyright (C) 2002 Renaud Pawlak, Laurent Martelli
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.gui;
19
20 import java.util.Collection JavaDoc;
21
22 /**
23  * This view is a composite view (i.e. a view that can contains other
24  * view). View and CompositeView follow the GoF composite pattern. */

25
26 public interface CompositeView extends View {
27     /**
28      * Adds a component view in the composite.
29      *
30      * @param component the component view
31      * @param extraInfos some positionning infos on where the component
32      * should be added in the composite
33      */

34     void addView(View component, Object JavaDoc extraInfos);
35
36     /**
37      * Adds a component view in the composite.
38      *
39      * @param component the component view
40      */

41     void addView(View component);
42
43     /**
44      * Adds an horizontal separator in the composite in order to insert
45      * blanks between components.
46      */

47     void addHorizontalStrut(int width);
48
49     /**
50      * Adds a vertical separator in the composite in order to insert
51      * blanks between components.
52      */

53     void addVerticalStrut(int height);
54
55     /**
56      * Gets a component view from an id object.
57      */

58     View getView(Object JavaDoc id);
59
60     /**
61      * Gets all the component views in this composite.
62      */

63     Collection JavaDoc getViews();
64
65     /**
66      * Tells wether the composite view contains a view with some given
67      * view type and paramters
68      *
69      * @param viewType the type of the view to look for
70      * @param parameters the parameters of the view to look for
71      * @return true if the composite contains a view with the given
72      * type and parameters
73      */

74     boolean containsView(String JavaDoc viewType, Object JavaDoc[] parameters);
75
76     /**
77      * Removes a component view in this composite.
78      *
79      * @param component the component view to remove
80      * @param validate wether to validate values in editors
81      */

82     void removeView(View component, boolean validate);
83
84     /**
85      * Removes all the views in this composite.
86      *
87      * @param validate wether to validate values in editors
88      */

89     void removeAllViews(boolean validate);
90 }
91
Popular Tags