Revision 981 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/java/org/gvsig/scripting/swing/impl/composer/editors/ExternalFileEditorView.java
ExternalFileEditorView.java | ||
---|---|---|
10 | 10 |
import java.awt.Dimension; |
11 | 11 |
import javax.swing.Box; |
12 | 12 |
import javax.swing.ImageIcon; |
13 |
import javax.swing.JButton; |
|
13 | 14 |
import javax.swing.JFrame; |
14 | 15 |
import javax.swing.JLabel; |
15 | 16 |
import javax.swing.JPanel; |
17 |
import javax.swing.JTabbedPane; |
|
16 | 18 |
import javax.swing.JTextField; |
17 | 19 |
|
18 | 20 |
|
19 | 21 |
public class ExternalFileEditorView extends JPanel |
20 | 22 |
{ |
21 |
JLabel lblName = new JLabel();
|
|
22 |
JTextField txtName = new JTextField();
|
|
23 |
JTabbedPane tabEditor = new JTabbedPane();
|
|
24 |
JPanel addtionalPanel = new JPanel();
|
|
23 | 25 |
JLabel lblMimeType = new JLabel(); |
24 | 26 |
JTextField txtMimeType = new JTextField(); |
25 |
JPanel addtionalPanel = new JPanel(); |
|
27 |
JTextField txtName = new JTextField(); |
|
28 |
JLabel lblName = new JLabel(); |
|
29 |
JButton btnOpenWithSystemEditor = new JButton(); |
|
26 | 30 |
|
27 | 31 |
/** |
28 | 32 |
* Default constructor |
... | ... | |
114 | 118 |
public JPanel createPanel() |
115 | 119 |
{ |
116 | 120 |
JPanel jpanel1 = new JPanel(); |
117 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:4DLU:NONE");
|
|
121 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
|
|
118 | 122 |
CellConstraints cc = new CellConstraints(); |
119 | 123 |
jpanel1.setLayout(formlayout1); |
120 | 124 |
|
121 |
lblName.setName("lblName"); |
|
122 |
lblName.setText("Name"); |
|
123 |
jpanel1.add(lblName,cc.xy(2,2)); |
|
125 |
tabEditor.setName("tabEditor"); |
|
126 |
tabEditor.setTabPlacement(JTabbedPane.BOTTOM); |
|
127 |
tabEditor.addTab("Properties",null,createPanel1()); |
|
128 |
jpanel1.add(tabEditor,cc.xy(1,1)); |
|
124 | 129 |
|
125 |
txtName.setBackground(new Color(236,233,216)); |
|
126 |
txtName.setEditable(false); |
|
127 |
txtName.setName("txtName"); |
|
128 |
jpanel1.add(txtName,cc.xy(4,2)); |
|
130 |
addFillComponents(jpanel1,new int[0],new int[0]); |
|
131 |
return jpanel1; |
|
132 |
} |
|
129 | 133 |
|
134 |
public JPanel createPanel1() |
|
135 |
{ |
|
136 |
JPanel jpanel1 = new JPanel(); |
|
137 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE"); |
|
138 |
CellConstraints cc = new CellConstraints(); |
|
139 |
jpanel1.setLayout(formlayout1); |
|
140 |
|
|
141 |
addtionalPanel.setName("addtionalPanel"); |
|
142 |
jpanel1.add(addtionalPanel,cc.xywh(2,6,3,1)); |
|
143 |
|
|
130 | 144 |
lblMimeType.setName("lblMimeType"); |
131 | 145 |
lblMimeType.setText("Mime type"); |
132 | 146 |
jpanel1.add(lblMimeType,cc.xy(2,4)); |
... | ... | |
136 | 150 |
txtMimeType.setName("txtMimeType"); |
137 | 151 |
jpanel1.add(txtMimeType,cc.xy(4,4)); |
138 | 152 |
|
139 |
addtionalPanel.setName("addtionalPanel"); |
|
140 |
jpanel1.add(addtionalPanel,cc.xywh(2,6,3,1)); |
|
153 |
txtName.setBackground(new Color(236,233,216)); |
|
154 |
txtName.setEditable(false); |
|
155 |
txtName.setName("txtName"); |
|
156 |
jpanel1.add(txtName,cc.xy(4,2)); |
|
141 | 157 |
|
142 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 }); |
|
158 |
lblName.setName("lblName"); |
|
159 |
lblName.setText("Name"); |
|
160 |
jpanel1.add(lblName,cc.xy(2,2)); |
|
161 |
|
|
162 |
jpanel1.add(createPanel2(),cc.xy(4,8)); |
|
163 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
143 | 164 |
return jpanel1; |
144 | 165 |
} |
145 | 166 |
|
167 |
public JPanel createPanel2() |
|
168 |
{ |
|
169 |
JPanel jpanel1 = new JPanel(); |
|
170 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
|
171 |
CellConstraints cc = new CellConstraints(); |
|
172 |
jpanel1.setLayout(formlayout1); |
|
173 |
|
|
174 |
btnOpenWithSystemEditor.setActionCommand("Open with system editor"); |
|
175 |
btnOpenWithSystemEditor.setName("btnOpenWithSystemEditor"); |
|
176 |
btnOpenWithSystemEditor.setText("Open with system editor"); |
|
177 |
jpanel1.add(btnOpenWithSystemEditor,cc.xy(2,1)); |
|
178 |
|
|
179 |
addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 }); |
|
180 |
return jpanel1; |
|
181 |
} |
|
182 |
|
|
146 | 183 |
/** |
147 | 184 |
* Initializer |
148 | 185 |
*/ |
Also available in: Unified diff