Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.api / src / main / java / org / gvsig / tools / swing / api / dynobject / DynObjectSwingManager.java @ 298

History | View | Annotate | Download (4.95 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22
package org.gvsig.tools.swing.api.dynobject;
23

    
24
import org.gvsig.tools.dynobject.DynClass;
25
import org.gvsig.tools.dynobject.DynObject;
26
import org.gvsig.tools.dynobject.DynObjectSet;
27
import org.gvsig.tools.exception.BaseException;
28
import org.gvsig.tools.service.Manager;
29
import org.gvsig.tools.service.ServiceException;
30
import org.gvsig.tools.swing.api.dynobject.dynfield.JDynFieldComponent;
31
import org.gvsig.tools.swing.api.dynobject.dynfield.ValueField;
32
import org.gvsig.tools.swing.api.dynobject.set.JDynObjectSetComponent;
33

    
34
/**
35
 * Manager for {@link DynObject} related Swing components.
36
 * 
37
 * @author 2010 - <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG Team
38
 * @author 2010 - <a href="mailto:reinhold@uji.es">Cristian Mart?n&nbsp;</a> -
39
 *         gvSIG Team
40
 * @version $Id$
41
 * 
42
 */
43
public interface DynObjectSwingManager extends Manager {
44

    
45
    /** Full DynObject visualization or editing form mode. */
46
    public static final String MODE_FORM = "form";
47
    /** DynObject visualization in a list mode. */
48
    public static final String MODE_LIST = "list";
49

    
50
    /**
51
     * Creates a {@link JDynFieldComponent} to render a {@link DynObject} field.
52
     * 
53
     * @param dynClass
54
     *            with the value to render
55
     * @return the component
56
     * @throws ServiceException
57
     */
58
    public DynObjectModel createDynObjectModel(DynClass dynClass)
59
        throws ServiceException;
60

    
61
    /**
62
     * Creates a {@link JDynFieldComponent} to render a {@link DynObject} field.
63
     * 
64
     * @param dynClass
65
     *            with the value to render
66
     * @return the component
67
     * @throws ServiceException
68
     */
69
    public DynObjectModel createEmptyDynObjectModel(DynClass dynClass)
70
        throws ServiceException;
71

    
72
    /**
73
     * Creates a {@link JDynFieldComponent} to render a {@link DynObject} field.
74
     * 
75
     * @param field
76
     *            to render
77
     * @param dynObject
78
     *            with the value to render
79
     * @return the component
80
     * @throws ServiceException
81
     */
82
    public JDynFieldComponent createJDynFieldComponent(ValueField valueItem)
83
        throws ServiceException;
84

    
85
    /**
86
     * Creates a {@link JDynObjectComponent} for a {@link DynObject} in the
87
     * default mode.
88
     * 
89
     * @param dynObject
90
     *            to create the component for
91
     * @return a {@link JDynObjectComponent}
92
     * @throws ServiceException
93
     */
94
    public JDynObjectComponent createJDynObjectComponent(DynObject dynObject)
95
        throws ServiceException;
96

    
97
    /**
98
     * Creates a {@link JDynObjectComponent} for a {@link DynObject}.
99
     * 
100
     * @param dynObject
101
     *            to create the component for
102
     * @param mode
103
     * @return a {@link JDynObjectComponent}
104
     * @throws ServiceException
105
     */
106
    public JDynObjectComponent createJDynObjectComponent(DynObject dynObject,
107
        DynObjectModel model) throws ServiceException;
108

    
109
    /**
110
     * Creates a {@link JDynObjectComponent} for a {@link DynObject}.
111
     * 
112
     * @param dynObject
113
     *            to create the component for
114
     * @param mode
115
     * @return a {@link JDynObjectComponent}
116
     * @throws ServiceException
117
     */
118
    public JDynObjectComponent createJDynObjectComponent(DynObject dynObject,
119
        DynObjectModel model, String mode) throws ServiceException;
120

    
121
    /**
122
     * Creates a {@link JDynObjectComponent} for a {@link DynObject}.
123
     * 
124
     * @param dynObject
125
     *            to create the component for
126
     * @param mode
127
     * @return a {@link JDynObjectComponent}
128
     * @throws ServiceException
129
     */
130
    public JDynObjectComponent createJDynObjectComponent(DynObject dynObject,
131
        String mode) throws ServiceException;
132

    
133
    /**
134
     * Creates a {@link JDynObjectSetComponent} to render a {@link DynObjectSet}
135
     * .
136
     * 
137
     * @param dynObjectSet
138
     *            to create the component for
139
     * @return a {@link JDynObjectSetComponent}
140
     * @throws BaseException
141
     *             if there is an error creating the component
142
     */
143
    public JDynObjectSetComponent createJDynObjectSetComponent(
144
        DynObjectSet dynObjectSet) throws BaseException;
145

    
146
}