Revision 43802 branches/org.gvsig.desktop-2018a/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/swing/FilesystemExplorerWizardPanelController.java
FilesystemExplorerWizardPanelController.java | ||
---|---|---|
14 | 14 |
import java.util.Locale; |
15 | 15 |
|
16 | 16 |
import javax.swing.DefaultListSelectionModel; |
17 |
import javax.swing.JComponent; |
|
17 | 18 |
import javax.swing.JFileChooser; |
18 | 19 |
import javax.swing.ListSelectionModel; |
19 | 20 |
import javax.swing.event.ListSelectionEvent; |
... | ... | |
47 | 48 |
* @author fdiaz |
48 | 49 |
* |
49 | 50 |
*/ |
50 |
public class FilesystemExplorerWizardPanelController extends FilesystemExplorerWizardPanelView { |
|
51 |
public class FilesystemExplorerWizardPanelController extends FilesystemExplorerWizardPanelView implements org.gvsig.tools.swing.api.Component {
|
|
51 | 52 |
|
52 | 53 |
|
53 | 54 |
/** |
... | ... | |
88 | 89 |
translate(); |
89 | 90 |
} |
90 | 91 |
|
92 |
@Override |
|
93 |
public JComponent asJComponent() { |
|
94 |
return this; |
|
95 |
} |
|
96 |
|
|
91 | 97 |
private void translate() { |
92 | 98 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
93 | 99 |
btnAdd.setText(i18nManager.getTranslation("Anadir")); |
... | ... | |
95 | 101 |
btnRemove.setText(i18nManager.getTranslation("Eliminar")); |
96 | 102 |
btnUp.setText(i18nManager.getTranslation("arriba")); |
97 | 103 |
btnDown.setText(i18nManager.getTranslation("abajo")); |
98 |
|
|
104 |
|
|
99 | 105 |
btnAdd.setToolTipText(i18nManager.getTranslation(btnAdd.getToolTipText())); |
100 | 106 |
btnProperties.setToolTipText(i18nManager.getTranslation(btnProperties.getToolTipText())); |
101 | 107 |
btnRemove.setToolTipText(i18nManager.getTranslation(btnRemove.getToolTipText())); |
102 | 108 |
btnUp.setToolTipText(i18nManager.getTranslation(btnUp.getToolTipText())); |
103 | 109 |
btnDown.setToolTipText(i18nManager.getTranslation(btnDown.getToolTipText())); |
104 |
|
|
110 |
|
|
105 | 111 |
btnChangeViewProjection.setText(i18nManager.getTranslation(btnChangeViewProjection.getText())); |
106 | 112 |
btnChangeViewProjection.setToolTipText(i18nManager.getTranslation(btnChangeViewProjection.getToolTipText())); |
107 | 113 |
} |
... | ... | |
161 | 167 |
doChangeViewProjection(); |
162 | 168 |
} |
163 | 169 |
}); |
164 |
|
|
170 |
|
|
165 | 171 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
166 | 172 |
|
167 | 173 |
this.tableFiles.setModel(new FilesystemExplorerWizardTableModel()); |
... | ... | |
274 | 280 |
((FilesystemExplorerWizardTableModel)this.tableFiles.getModel()).fireTableDataChanged(); |
275 | 281 |
updateRowHeights(); |
276 | 282 |
this.tableFiles.getSelectionModel().setSelectionInterval(selectedIndex, selectedIndex); |
283 |
firePropertyChange("all", null, null); |
|
277 | 284 |
} |
278 | 285 |
|
279 | 286 |
private void updateRowHeights() { |
... | ... | |
514 | 521 |
} |
515 | 522 |
} |
516 | 523 |
} |
517 |
|
|
524 |
|
|
518 | 525 |
private void doChangeViewProjection() { |
519 | 526 |
FilesystemExplorerWizardTableModel model = (FilesystemExplorerWizardTableModel) this.tableFiles.getModel(); |
520 |
if( model.getRowCount() <= 0 ||
|
|
527 |
if( model.getRowCount() <= 0 || |
|
521 | 528 |
(selectedIndex < 0 && selectedIndex >= model.getRowCount()) ) { |
522 | 529 |
this.btnChangeViewProjection.setEnabled(false); |
523 | 530 |
return; |
... | ... | |
530 | 537 |
mapContext.setProjection(projection); |
531 | 538 |
updateTable(); |
532 | 539 |
} |
533 |
}
|
|
540 |
} |
|
534 | 541 |
} |
535 | 542 |
|
536 | 543 |
void setTabularOnly(boolean tabularOnly) { |
Also available in: Unified diff