Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.impl / src / main / java / org / gvsig / tools / swing / impl / dynobject / DefaultJDynObjectComponent.java @ 93

History | View | Annotate | Download (1.84 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

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2010 {}  {{Task}}
26
*/
27
package org.gvsig.tools.swing.impl.dynobject;
28

    
29
import java.awt.BorderLayout;
30

    
31
import javax.swing.JLabel;
32

    
33
import org.gvsig.tools.dynobject.DynObject;
34
import org.gvsig.tools.swing.api.dynobject.JDynObjectComponent;
35

    
36
/**
37
 * Default {@link JDynObjectComponent} implementation.
38
 * <p>
39
 * <strong>NOTE:</strong> initial dummy implementation to be replaced with a
40
 * more complete one.
41
 * </p>
42
 * @author 2010- C?sar Ordi?ana - gvSIG team
43
 */
44
public class DefaultJDynObjectComponent extends JDynObjectComponent {
45

    
46
        private static final long serialVersionUID = 5716325904557339463L;
47

    
48
        /**
49
         * @see JDynObjectView#JDynObjectView(DynObject).
50
         */
51
        public DefaultJDynObjectComponent(DynObject dynObject) {
52
                super(dynObject);
53
                initUI();
54
        }
55

    
56
        private void initUI() {
57
                setLayout(new BorderLayout());
58
                JLabel label = new JLabel("<html><pre>".concat(
59
                                getDynObject().toString()).concat("</pre></html>"));
60
                add(label, BorderLayout.CENTER);
61
        }
62
}