KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > designer > view > ViewProducer


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.designer.view;
5
6 import java.awt.Component JavaDoc;
7 import java.awt.Container JavaDoc;
8
9 /**
10  * Define something cabable of producing a a GUI Component in various situations.
11  *
12  */

13 public interface ViewProducer {
14
15
16     /**
17      * The component should be rendered for use in a model dialog. With a border
18      * and sized correctly.
19      *
20      * @return The component.
21      */

22     public Component JavaDoc dialog();
23     
24     
25     /**
26      * The component should be rendered as a group for use on the design
27      * panel, with a border.
28      *
29      * @return The compoent.
30      */

31     public Component JavaDoc group();
32     
33     /**
34      * The component should be rendered for use as a detail edit.
35      * Used for Field Element View.
36      *
37      * @return The compoent.
38      */

39     public Component JavaDoc detailEdit();
40     
41     /**
42      * The component should be rendered for use in a table cell.
43      *
44      * @return The compoent.
45      */

46     public Component JavaDoc cell();
47     
48     /**
49      * The class should add
50      * it's component to the container which has a GridBagLayout.
51      *
52      * @param container The container to add the component to.
53      * @param row The row to add the component at.
54      * @param The column to add the component at.
55      *
56      * @return The row the next component should be added at.
57      */

58     public int inline(Container JavaDoc container,
59             int row,
60             int column,
61             boolean selectionInGroup);
62     
63     /**
64      * Used when a component is part of a selection.
65      *
66      * @param enabled
67      */

68     public void setEnabled(boolean enabled);
69 }
70
Popular Tags