Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.dynform / org.gvsig.tools.dynform.impl / src / main / java / org / gvsig / tools / dynform / impl / DefaultDynFormLibrary.java @ 2031

History | View | Annotate | Download (5.62 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.dynform.impl;
25

    
26

    
27
import org.gvsig.tools.ToolsLocator;
28
import org.gvsig.tools.dynform.DynFormLibrary;
29
import org.gvsig.tools.dynform.DynFormLocator;
30
import org.gvsig.tools.dynform.spi.DynFormSPILocator;
31
import org.gvsig.tools.dynform.spi.DynFormSPIManager;
32
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ACTION_CLOSE;
33
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ACTION_DELETE;
34
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ACTION_NEW;
35
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ACTION_SEARCH;
36
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ACTION_UPDATE;
37
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_AUTOSAVE;
38
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_BORDER;
39
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_DROPDOWN;
40
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_HEIGHT;
41
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_LABEL_EMPTY;
42
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_READONLY;
43
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_RESIZEWEIGHT;
44
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_ROWS;
45
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_SEPARATOR;
46
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_TRANSLATE_EMPTY_TO_NULL;
47
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_USESCROLLBARS;
48
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_VIEWMODE;
49
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_WIDTH;
50
import org.gvsig.tools.dynobject.DynObjectManager;
51
import org.gvsig.tools.library.AbstractLibrary;
52
import org.gvsig.tools.library.LibraryException;
53

    
54
public class DefaultDynFormLibrary extends AbstractLibrary {
55

    
56
        public void doRegistration() {
57
                super.doRegistration();
58
                registerAsImplementationOf(DynFormLibrary.class);
59
        }
60
        
61
        protected void doInitialize() throws LibraryException {
62
                DynFormLocator.registerDefaultDynFormManager(DefaultDynFormManager.class);
63
                DynFormSPILocator.registerDefaultDynFormSPIManager(DefaultDynFormSPIManager.class);
64
                
65
            DynObjectManager dynObjectManager = ToolsLocator.getDynObjectManager();
66
            dynObjectManager.registerTag(TAG_DYNFORM_AUTOSAVE, "Boolean value to activate/deactivate the autosave mode in the form.");
67
            dynObjectManager.registerTag(TAG_DYNFORM_BORDER, null);
68
            dynObjectManager.registerTag(TAG_DYNFORM_VIEWMODE, null);
69
            dynObjectManager.registerTag(TAG_DYNFORM_HEIGHT, "Integer value to set the height of field or form to this value.");
70
            dynObjectManager.registerTag(TAG_DYNFORM_WIDTH, "Integer value to set the width of form to this value.");
71
            dynObjectManager.registerTag(TAG_DYNFORM_LABEL_EMPTY, "Boolean value to force the label of field to empty, the label can't be show.");
72
            dynObjectManager.registerTag(TAG_DYNFORM_ACTION_NEW, "Boolean value to show/hide the action button new in form.");
73
            dynObjectManager.registerTag(TAG_DYNFORM_ACTION_UPDATE, "Boolean value to show/hide the action button save in form.");
74
            dynObjectManager.registerTag(TAG_DYNFORM_ACTION_DELETE, "Boolean value to show/hide the action button delete in form.");
75
            dynObjectManager.registerTag(TAG_DYNFORM_ACTION_SEARCH, "Boolean value to show/hide the action button search in form.");
76
            dynObjectManager.registerTag(TAG_DYNFORM_ACTION_CLOSE, "Boolean value to show/hide the action button close in form.");
77
            dynObjectManager.registerTag(TAG_DYNFORM_ROWS, "Integer value to set the number of rows for text fields.");
78
            dynObjectManager.registerTag(TAG_DYNFORM_USESCROLLBARS, "Boolean value to show/hide scrollbars in the form (default value true).");
79
            dynObjectManager.registerTag(TAG_DYNFORM_READONLY, "Boolean value to force the field or form to be in read-only mode.");
80
            dynObjectManager.registerTag(TAG_DYNFORM_TRANSLATE_EMPTY_TO_NULL, null);
81
            dynObjectManager.registerTag(TAG_DYNFORM_SEPARATOR, "String value to add a separator previos this field with this.");
82
            dynObjectManager.registerTag(TAG_DYNFORM_DROPDOWN, "String value to force the type of dropdown to use, must be 'label' or 'combo'.");
83
            dynObjectManager.registerTag(TAG_DYNFORM_RESIZEWEIGHT, "Integer value between 0 and 100 indicating what the field should expand. A value of 0 indicates that it should not be expanded.");
84
        }
85

    
86
        protected void doPostInitialize() throws LibraryException {
87

    
88
        }
89

    
90
}