Revision 1836 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/newlayer/CreateNewLayerPanelImpl.java
CreateNewLayerPanelImpl.java | ||
---|---|---|
61 | 61 |
private FileNameManagement fileNameManagement = null; |
62 | 62 |
private OpenFileContainer openFileContainer = null; |
63 | 63 |
|
64 |
/** |
|
65 |
* Constructor de un CreateLayerPanel |
|
66 |
*/ |
|
67 |
public CreateNewLayerPanelImpl(FileNameManagement fileNameManagement) { |
|
64 |
public CreateNewLayerPanelImpl(FileNameManagement fileNameManagement, String tittle) { |
|
68 | 65 |
this.fileNameManagement = fileNameManagement; |
69 | 66 |
this.extList = fileNameManagement.getPrefixSupported(); |
70 |
initialize(); |
|
67 |
initialize(tittle);
|
|
71 | 68 |
translate(); |
72 | 69 |
|
73 | 70 |
getFileSelectorPanel().setPath(fileNameManagement.getDefaultFilePath()); |
74 | 71 |
updateNewLayerText(); |
75 | 72 |
} |
73 |
|
|
74 |
public CreateNewLayerPanelImpl(FileNameManagement fileNameManagement) { |
|
75 |
this(fileNameManagement, ""); |
|
76 |
} |
|
76 | 77 |
|
77 | 78 |
|
78 |
private void initialize() { |
|
79 |
private void initialize(String tittle) {
|
|
79 | 80 |
ButtonGroup buttonGroup2; |
80 |
GridBagConstraints gridBagConstraints; |
|
81 |
|
|
82 |
setLayout(new GridBagLayout()); |
|
83 |
|
|
84 |
setBorder(BorderFactory.createTitledBorder("")); |
|
85 | 81 |
buttonGroup2 = new ButtonGroup(); |
86 | 82 |
buttonGroup2.add(getRadioFileGenerate()); |
87 |
gridBagConstraints = new GridBagConstraints(); |
|
83 |
buttonGroup2.add(getRadioOpenMemory()); |
|
84 |
|
|
85 |
setLayout(new GridBagLayout()); |
|
86 |
setBorder(BorderFactory.createTitledBorder(tittle)); |
|
87 |
|
|
88 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
|
88 | 89 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
89 | 90 |
gridBagConstraints.weightx = 1.0D; |
90 | 91 |
gridBagConstraints.anchor = GridBagConstraints.WEST; |
... | ... | |
96 | 97 |
gridBagConstraints.insets = new Insets(2, 25, 5, 2); |
97 | 98 |
add((JComponent)getFileSelectorPanel(), gridBagConstraints); |
98 | 99 |
|
99 |
buttonGroup2.add(getRadioOpenMemory()); |
|
100 |
gridBagConstraints.gridx = 0; |
|
101 | 100 |
gridBagConstraints.gridy = 2; |
102 | 101 |
gridBagConstraints.anchor = GridBagConstraints.WEST; |
103 | 102 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
... | ... | |
158 | 157 |
private JTextField getFilenameTextField() { |
159 | 158 |
if (filenameTextField == null) { |
160 | 159 |
filenameTextField = new JTextField(); |
161 |
filenameTextField.setPreferredSize(new Dimension(150, filenameTextField.getPreferredSize().height));
|
|
160 |
filenameTextField.setPreferredSize(new Dimension(0, filenameTextField.getPreferredSize().height)); |
|
162 | 161 |
} |
163 | 162 |
return filenameTextField; |
164 | 163 |
} |
Also available in: Unified diff