svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.prov / org.gvsig.exportto.swing.prov.jdbc / src / main / java / org / gvsig / export / jdbc / swing / panels / UpdateTableStatisticsPanel.java @ 43968
History | View | Annotate | Download (2.37 KB)
1 | 41638 | jjdelcerro | |
---|---|---|---|
2 | 43925 | jjdelcerro | package org.gvsig.export.jdbc.swing.panels; |
3 | 41638 | jjdelcerro | |
4 | import javax.swing.JComponent; |
||
5 | 43925 | jjdelcerro | import org.gvsig.export.jdbc.service.ExportJDBCParameters; |
6 | import org.gvsig.export.swing.JExportProcessPanel; |
||
7 | import org.gvsig.export.swing.spi.ExportPanel; |
||
8 | import org.gvsig.export.swing.spi.ExportPanelValidationException; |
||
9 | 41638 | jjdelcerro | import org.gvsig.tools.ToolsLocator; |
10 | import org.gvsig.tools.i18n.I18nManager; |
||
11 | |||
12 | |||
13 | 43925 | jjdelcerro | public class UpdateTableStatisticsPanel |
14 | extends UpdateTableStatisticsPanelLayout
|
||
15 | implements ExportPanel
|
||
16 | { |
||
17 | 41638 | jjdelcerro | private static final long serialVersionUID = -8450431632002084194L; |
18 | |||
19 | 43925 | jjdelcerro | private final ExportJDBCParameters parameters; |
20 | private final JExportProcessPanel processPanel; |
||
21 | 41638 | jjdelcerro | |
22 | 43925 | jjdelcerro | public UpdateTableStatisticsPanel(
|
23 | JExportProcessPanel processPanel, |
||
24 | ExportJDBCParameters parameters |
||
25 | ) { |
||
26 | this.processPanel = processPanel;
|
||
27 | this.parameters = parameters;
|
||
28 | 41638 | jjdelcerro | initComponents(); |
29 | } |
||
30 | |||
31 | private void initComponents() { |
||
32 | this.chkUpdateStatisticsTableAfterInserts.setEnabled(true); |
||
33 | this.chkUpdateStatisticsTableAfterInserts.setSelected(true); |
||
34 | 41728 | jjdelcerro | this.translate();
|
35 | 41638 | jjdelcerro | } |
36 | 41728 | jjdelcerro | |
37 | private void translate() { |
||
38 | I18nManager i18nManager = ToolsLocator.getI18nManager(); |
||
39 | |||
40 | this.lblHeader.setText("<html>"+i18nManager.getTranslation("_update_table_statistics_header")+"</html>"); |
||
41 | this.chkUpdateStatisticsTableAfterInserts.setText(i18nManager.getTranslation("_Recalcular_estadisticas_de_la_tabla_al_terminar")); |
||
42 | } |
||
43 | 41638 | jjdelcerro | |
44 | 43920 | jjdelcerro | @Override
|
45 | 43925 | jjdelcerro | public String getIdPanel() { |
46 | return this.getClass().getCanonicalName(); |
||
47 | } |
||
48 | |||
49 | @Override
|
||
50 | public String getTitlePanel() { |
||
51 | 41638 | jjdelcerro | I18nManager i18nManager = ToolsLocator.getI18nManager(); |
52 | 41728 | jjdelcerro | return i18nManager.getTranslation("_update_table_statistics"); |
53 | 41638 | jjdelcerro | } |
54 | |||
55 | 43920 | jjdelcerro | @Override
|
56 | 43968 | jjdelcerro | public void previousPanel() { |
57 | |||
58 | } |
||
59 | |||
60 | @Override
|
||
61 | public void nextPanel() { |
||
62 | 43925 | jjdelcerro | this.parameters.setUpdateTableStatistics(this.getUpdateTableStatistics()); |
63 | } |
||
64 | |||
65 | @Override
|
||
66 | public boolean validatePanel() throws ExportPanelValidationException { |
||
67 | 41638 | jjdelcerro | return true; |
68 | } |
||
69 | |||
70 | 43920 | jjdelcerro | @Override
|
71 | 41638 | jjdelcerro | public void enterPanel() { |
72 | // Default do nothing
|
||
73 | } |
||
74 | |||
75 | 43920 | jjdelcerro | @Override
|
76 | 41638 | jjdelcerro | public JComponent asJComponent() { |
77 | return this; |
||
78 | } |
||
79 | |||
80 | public boolean getUpdateTableStatistics() { |
||
81 | return this.chkUpdateStatisticsTableAfterInserts.isSelected(); |
||
82 | } |
||
83 | } |