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 / exportto / swing / prov / jdbc / panel / IdentifiersOptionsPanel.java @ 43377
History | View | Annotate | Download (2.32 KB)
1 | 41598 | jjdelcerro | /*
|
---|---|---|---|
2 | * To change this license header, choose License Headers in Project Properties.
|
||
3 | * To change this template file, choose Tools | Templates
|
||
4 | * and open the template in the editor.
|
||
5 | */
|
||
6 | |||
7 | package org.gvsig.exportto.swing.prov.jdbc.panel; |
||
8 | |||
9 | import javax.swing.JComponent; |
||
10 | import org.gvsig.exportto.swing.prov.jdbc.ExporttoJDBCOptions; |
||
11 | import org.gvsig.exportto.swing.spi.ExporttoPanelValidationException; |
||
12 | import org.gvsig.exportto.swing.spi.ExporttoSwingProviderPanel; |
||
13 | import org.gvsig.tools.ToolsLocator; |
||
14 | import org.gvsig.tools.i18n.I18nManager; |
||
15 | |||
16 | /**
|
||
17 | *
|
||
18 | * @author usuario
|
||
19 | */
|
||
20 | 43377 | jjdelcerro | public class IdentifiersOptionsPanel extends IdentifiersOptionsPanelView implements ExporttoSwingProviderPanel { |
21 | 41598 | jjdelcerro | private static final long serialVersionUID = -6390855050271511346L; |
22 | |||
23 | private final ExporttoJDBCOptions provider; |
||
24 | |||
25 | public IdentifiersOptionsPanel(ExporttoJDBCOptions provider) {
|
||
26 | this.provider = provider;
|
||
27 | initComponents(); |
||
28 | } |
||
29 | |||
30 | private void initComponents() { |
||
31 | this.chkRemoveSpaces.setSelected(true); |
||
32 | this.chkTraslateToLowerCase.setSelected(true); |
||
33 | 41724 | jjdelcerro | |
34 | this.translate();
|
||
35 | 41598 | jjdelcerro | } |
36 | |||
37 | 41724 | jjdelcerro | private void translate() { |
38 | I18nManager i18nManager = ToolsLocator.getI18nManager(); |
||
39 | |||
40 | this.chkRemoveSpaces.setText(i18nManager.getTranslation("_Trasladar_espacios_a_guiones")); |
||
41 | this.chkTraslateToLowerCase.setText(i18nManager.getTranslation("_Trasladar_identificadores_a_minusculas")); |
||
42 | this.lblHeader.setText("<html>"+i18nManager.getTranslation("_Table_and_fields_name_options_header")+"<html>"); |
||
43 | } |
||
44 | |||
45 | 43377 | jjdelcerro | @Override
|
46 | 41598 | jjdelcerro | public String getPanelTitle() { |
47 | I18nManager i18nManager = ToolsLocator.getI18nManager(); |
||
48 | return i18nManager.getTranslation("_Table_and_fields_name_options"); |
||
49 | } |
||
50 | |||
51 | 43377 | jjdelcerro | @Override
|
52 | 41598 | jjdelcerro | public boolean isValidPanel() throws ExporttoPanelValidationException { |
53 | return true; |
||
54 | } |
||
55 | |||
56 | 43377 | jjdelcerro | @Override
|
57 | 41598 | jjdelcerro | public void enterPanel() { |
58 | |||
59 | } |
||
60 | |||
61 | 43377 | jjdelcerro | @Override
|
62 | 41598 | jjdelcerro | public JComponent asJComponent() { |
63 | return this; |
||
64 | } |
||
65 | |||
66 | public boolean getTranslateToLowerCase() { |
||
67 | return this.chkTraslateToLowerCase.isSelected(); |
||
68 | } |
||
69 | |||
70 | public boolean getRemoveSpacesInTableName() { |
||
71 | return this.chkRemoveSpaces.isSelected(); |
||
72 | } |
||
73 | 43377 | jjdelcerro | |
74 | public boolean getTranslateHyphens() { |
||
75 | return this.chkTraslateHyphens.isSelected(); |
||
76 | } |
||
77 | |||
78 | 41598 | jjdelcerro | } |