Statistics
| Revision:

gvsig-projects-pool / org.gvsig.winmgr / trunk / org.gvsig.winmgr.app / org.gvsig.winmgr.app.mainplugin / src / main / java / org / gvsig / coreplugin / mdiManager / frames / InternalFrame.java @ 682

History | View | Annotate | Download (4.94 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.coreplugin.mdiManager.frames;
25

    
26
import javax.swing.JInternalFrame;
27

    
28
/**
29
 * @author Cesar Martinez Izquierdo <cesar.martinez@iver.es>
30
 *
31
 */
32
public class InternalFrame extends JInternalFrame implements IFrame {
33
        private static final long serialVersionUID = 1L;
34
        
35
           /** 
36
     * Creates a non-resizable, non-closable, non-maximizable,
37
     * non-iconifiable <code>JInternalFrame</code> with no title.
38
     */
39
    public InternalFrame() {
40
        super();
41
    }
42

    
43
    /** 
44
     * Creates a non-resizable, non-closable, non-maximizable,
45
     * non-iconifiable <code>JInternalFrame</code> with the specified title.
46
     * Note that passing in a <code>null</code> <code>title</code> results in
47
     * unspecified behavior and possibly an exception.
48
     *
49
     * @param title  the non-<code>null</code> <code>String</code>
50
     *     to display in the title bar
51
     */
52
    public InternalFrame(String title) {
53
        super(title);
54
    }
55

    
56
    /** 
57
     * Creates a non-closable, non-maximizable, non-iconifiable 
58
     * <code>JInternalFrame</code> with the specified title
59
     * and resizability.
60
     *
61
     * @param title      the <code>String</code> to display in the title bar
62
     * @param resizable  if <code>true</code>, the internal frame can be resized
63
     */
64
    public InternalFrame(String title, boolean resizable) {
65
        super(title, resizable);
66
    }
67

    
68
    /** 
69
     * Creates a non-maximizable, non-iconifiable <code>JInternalFrame</code>
70
     * with the specified title, resizability, and
71
     * closability.
72
     *
73
     * @param title      the <code>String</code> to display in the title bar
74
     * @param resizable  if <code>true</code>, the internal frame can be resized
75
     * @param closable   if <code>true</code>, the internal frame can be closed
76
     */
77
    public InternalFrame(String title, boolean resizable, boolean closable) {
78
        super(title, resizable, closable);
79
    }
80

    
81
    /** 
82
     * Creates a non-iconifiable <code>JInternalFrame</code>
83
     * with the specified title,
84
     * resizability, closability, and maximizability.
85
     *
86
     * @param title       the <code>String</code> to display in the title bar
87
     * @param resizable   if <code>true</code>, the internal frame can be resized
88
     * @param closable    if <code>true</code>, the internal frame can be closed
89
     * @param maximizable if <code>true</code>, the internal frame can be maximized
90
     */
91
    public InternalFrame(String title, boolean resizable, boolean closable,
92
                          boolean maximizable) {
93
        super(title, resizable, closable, maximizable);
94
    }
95

    
96
    /** 
97
     * Creates a <code>JInternalFrame</code> with the specified title,
98
     * resizability, closability, maximizability, and iconifiability.
99
     * All <code>JInternalFrame</code> constructors use this one.
100
     *
101
     * @param title       the <code>String</code> to display in the title bar
102
     * @param resizable   if <code>true</code>, the internal frame can be resized
103
     * @param closable    if <code>true</code>, the internal frame can be closed
104
     * @param maximizable if <code>true</code>, the internal frame can be maximized
105
     * @param iconifiable if <code>true</code>, the internal frame can be iconified
106
     */
107
    public InternalFrame(String title, boolean resizable, boolean closable, 
108
                                boolean maximizable, boolean iconifiable) {
109
        
110
             super(title, resizable, closable, maximizable, iconifiable);
111
    }
112

    
113

    
114
        /* (non-Javadoc)
115
         * @see com.iver.core.mdiManager.frames.IFrame#setHeight(int)
116
         */
117
        public void setHeight(int height) {
118
                super.setSize(getWidth(), height);
119
        }
120

    
121
        /* (non-Javadoc)
122
         * @see com.iver.core.mdiManager.frames.IFrame#setWidth(int)
123
         */
124
        public void setWidth(int width) {
125
                super.setSize(width, getHeight());
126
        }
127

    
128
        /* (non-Javadoc)
129
         * @see com.iver.core.mdiManager.frames.IFrame#setX(int)
130
         */
131
        public void setX(int x) {
132
                super.setLocation(x, getX());
133
        }
134

    
135
        /* (non-Javadoc)
136
         * @see com.iver.core.mdiManager.frames.IFrame#setY(int)
137
         */
138
        public void setY(int y) {
139
                super.setLocation(y, getY());
140
        }
141

    
142
}