Statistics
| Revision:

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 / SelectPkPanelLayout.java @ 44198

History | View | Annotate | Download (9.12 KB)

1 41487 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 43925 jjdelcerro
package org.gvsig.export.jdbc.swing.panels;
8 41487 jjdelcerro
9
/**
10
 *
11
 * @author jjdelcerro
12
 */
13
public class SelectPkPanelLayout extends javax.swing.JPanel {
14
15
    /**
16
     * Creates new form SelectPkPanelLayout
17
     */
18
    public SelectPkPanelLayout() {
19
        initComponents();
20
    }
21
22
    /**
23
     * This method is called from within the constructor to initialize the form.
24
     * WARNING: Do NOT modify this code. The content of this method is always
25
     * regenerated by the Form Editor.
26
     */
27
    @SuppressWarnings("unchecked")
28
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
29
    private void initComponents() {
30
        java.awt.GridBagConstraints gridBagConstraints;
31
32 41488 jjdelcerro
        buttonGroup1 = new javax.swing.ButtonGroup();
33 41487 jjdelcerro
        lblHeader = new javax.swing.JLabel();
34
        lblPrimaryKeyName = new javax.swing.JLabel();
35
        txtPrimaryKeyName = new javax.swing.JTextField();
36 41488 jjdelcerro
        filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
37
        rdoCreatePrimaryNewKey = new javax.swing.JRadioButton();
38
        rdoUseExistingFieldAsPrimariKey = new javax.swing.JRadioButton();
39
        lblSelectFieldAsPrimaryKey = new javax.swing.JLabel();
40
        jScrollPane1 = new javax.swing.JScrollPane();
41
        lstFields = new javax.swing.JList();
42
        rdoDoNotCreatePrimaryKey = new javax.swing.JRadioButton();
43
        filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(16, 0), new java.awt.Dimension(16, 0), new java.awt.Dimension(16, 32767));
44
        filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
45
        lblQuestion = new javax.swing.JLabel();
46 41487 jjdelcerro
47
        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
48 41488 jjdelcerro
        layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0};
49
        layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
50 41487 jjdelcerro
        setLayout(layout);
51
52
        lblHeader.setText("<html>\nPara que gvSIG pueda trabajar correctamente con tablas de BBDD es muy\nrecomendable que esta disponga de una clave primaria definida. Si no \nla tiene e intenta cargarla en gvSIG puede que algunas operaciones no\nfuncionen adecuadamente\n</html>"); // NOI18N
53
        gridBagConstraints = new java.awt.GridBagConstraints();
54 41488 jjdelcerro
        gridBagConstraints.gridx = 2;
55
        gridBagConstraints.gridy = 2;
56 41487 jjdelcerro
        gridBagConstraints.gridwidth = 3;
57
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
58 41488 jjdelcerro
        gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
59
        gridBagConstraints.weightx = 0.2;
60 41487 jjdelcerro
        add(lblHeader, gridBagConstraints);
61
62
        lblPrimaryKeyName.setText("Indique el nombre de a usar para la clave primaria");
63
        gridBagConstraints = new java.awt.GridBagConstraints();
64 41488 jjdelcerro
        gridBagConstraints.gridx = 4;
65
        gridBagConstraints.gridy = 8;
66 41487 jjdelcerro
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
67 41488 jjdelcerro
        gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
68 41487 jjdelcerro
        add(lblPrimaryKeyName, gridBagConstraints);
69
70
        txtPrimaryKeyName.setText("pk");
71
        txtPrimaryKeyName.addActionListener(new java.awt.event.ActionListener() {
72
            public void actionPerformed(java.awt.event.ActionEvent evt) {
73
                txtPrimaryKeyNameActionPerformed(evt);
74
            }
75
        });
76
        gridBagConstraints = new java.awt.GridBagConstraints();
77 41488 jjdelcerro
        gridBagConstraints.gridx = 4;
78
        gridBagConstraints.gridy = 10;
79
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
80
        gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
81
        add(txtPrimaryKeyName, gridBagConstraints);
82
        gridBagConstraints = new java.awt.GridBagConstraints();
83
        gridBagConstraints.gridx = 0;
84
        gridBagConstraints.gridy = 6;
85
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
86
        gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
87
        add(filler1, gridBagConstraints);
88
89
        buttonGroup1.add(rdoCreatePrimaryNewKey);
90
        rdoCreatePrimaryNewKey.setText("Generar una clave primaria con un serial");
91
        rdoCreatePrimaryNewKey.addActionListener(new java.awt.event.ActionListener() {
92
            public void actionPerformed(java.awt.event.ActionEvent evt) {
93
                rdoCreatePrimaryNewKeyActionPerformed(evt);
94
            }
95
        });
96
        gridBagConstraints = new java.awt.GridBagConstraints();
97 41487 jjdelcerro
        gridBagConstraints.gridx = 2;
98
        gridBagConstraints.gridy = 6;
99 41488 jjdelcerro
        gridBagConstraints.gridwidth = 3;
100 41487 jjdelcerro
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
101 41488 jjdelcerro
        add(rdoCreatePrimaryNewKey, gridBagConstraints);
102
103
        buttonGroup1.add(rdoUseExistingFieldAsPrimariKey);
104
        rdoUseExistingFieldAsPrimariKey.setText("Utilizar un campo existente como clave primaria.");
105
        gridBagConstraints = new java.awt.GridBagConstraints();
106
        gridBagConstraints.gridx = 2;
107
        gridBagConstraints.gridy = 14;
108
        gridBagConstraints.gridwidth = 3;
109
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
110
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
111
        add(rdoUseExistingFieldAsPrimariKey, gridBagConstraints);
112
113
        lblSelectFieldAsPrimaryKey.setText("Seleccione el campo a usar como clave primaria:");
114
        gridBagConstraints = new java.awt.GridBagConstraints();
115
        gridBagConstraints.gridx = 4;
116
        gridBagConstraints.gridy = 16;
117
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
118
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
119
        add(lblSelectFieldAsPrimaryKey, gridBagConstraints);
120
121
        jScrollPane1.setViewportView(lstFields);
122
123
        gridBagConstraints = new java.awt.GridBagConstraints();
124
        gridBagConstraints.gridx = 4;
125
        gridBagConstraints.gridy = 18;
126
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
127
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
128
        gridBagConstraints.weightx = 0.1;
129
        gridBagConstraints.weighty = 0.3;
130
        add(jScrollPane1, gridBagConstraints);
131
132
        buttonGroup1.add(rdoDoNotCreatePrimaryKey);
133
        rdoDoNotCreatePrimaryKey.setText("No hacer nada en relacion a la creacion de la clave primaria.");
134
        gridBagConstraints = new java.awt.GridBagConstraints();
135
        gridBagConstraints.gridx = 2;
136
        gridBagConstraints.gridy = 22;
137
        gridBagConstraints.gridwidth = 3;
138
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
139
        gridBagConstraints.weightx = 0.1;
140
        add(rdoDoNotCreatePrimaryKey, gridBagConstraints);
141
        gridBagConstraints = new java.awt.GridBagConstraints();
142
        gridBagConstraints.gridx = 2;
143
        gridBagConstraints.gridy = 0;
144
        add(filler2, gridBagConstraints);
145
        gridBagConstraints = new java.awt.GridBagConstraints();
146
        gridBagConstraints.gridx = 2;
147
        gridBagConstraints.gridy = 24;
148
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
149
        gridBagConstraints.weighty = 0.1;
150
        add(filler3, gridBagConstraints);
151
152
        lblQuestion.setText("? Desea crear una clave primaria ?");
153
        gridBagConstraints = new java.awt.GridBagConstraints();
154
        gridBagConstraints.gridx = 2;
155
        gridBagConstraints.gridy = 4;
156
        gridBagConstraints.gridwidth = 3;
157
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
158
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
159
        add(lblQuestion, gridBagConstraints);
160 41487 jjdelcerro
    }// </editor-fold>//GEN-END:initComponents
161
162
    private void txtPrimaryKeyNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPrimaryKeyNameActionPerformed
163
        // TODO add your handling code here:
164
    }//GEN-LAST:event_txtPrimaryKeyNameActionPerformed
165
166 41488 jjdelcerro
    private void rdoCreatePrimaryNewKeyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreatePrimaryNewKeyActionPerformed
167
        // TODO add your handling code here:
168
    }//GEN-LAST:event_rdoCreatePrimaryNewKeyActionPerformed
169 41487 jjdelcerro
170 41488 jjdelcerro
171 41487 jjdelcerro
    // Variables declaration - do not modify//GEN-BEGIN:variables
172 41488 jjdelcerro
    protected javax.swing.ButtonGroup buttonGroup1;
173
    protected javax.swing.Box.Filler filler1;
174
    protected javax.swing.Box.Filler filler2;
175
    protected javax.swing.Box.Filler filler3;
176
    protected javax.swing.JScrollPane jScrollPane1;
177 41487 jjdelcerro
    protected javax.swing.JLabel lblHeader;
178
    protected javax.swing.JLabel lblPrimaryKeyName;
179 41488 jjdelcerro
    protected javax.swing.JLabel lblQuestion;
180
    protected javax.swing.JLabel lblSelectFieldAsPrimaryKey;
181
    protected javax.swing.JList lstFields;
182
    protected javax.swing.JRadioButton rdoCreatePrimaryNewKey;
183
    protected javax.swing.JRadioButton rdoDoNotCreatePrimaryKey;
184
    protected javax.swing.JRadioButton rdoUseExistingFieldAsPrimariKey;
185 41487 jjdelcerro
    protected javax.swing.JTextField txtPrimaryKeyName;
186
    // End of variables declaration//GEN-END:variables
187
}