18
18
import javax .swing .JScrollPane ;
19
19
import javax .swing .JTextField ;
20
20
import javax .swing .ListSelectionModel ;
21
+ import java .awt .Color ;
21
22
import java .awt .GridBagConstraints ;
22
23
import java .awt .GridBagLayout ;
23
24
import java .awt .GridLayout ;
@@ -94,6 +95,7 @@ else if(exportDialogType == ExportDialogType.RESULT_SET_EXPORT)
94
95
bg .add (radMultipleSQLRes );
95
96
96
97
setBorder (BorderFactory .createEtchedBorder ());
98
+ setBorder (BorderFactory .createLineBorder (Color .red ));
97
99
}
98
100
99
101
private JPanel createButtonPanelForResultSetExport ()
@@ -158,27 +160,26 @@ private JPanel createSQLResultExportListPanel()
158
160
gbc = new GridBagConstraints (0 , 0 , 1 , 1 , 1 , 1 , GridBagConstraints .WEST , GridBagConstraints .BOTH , new Insets (0 , 0 , 0 , 0 ), 0 , 0 );
159
161
lstSQLResultsToExport = new JList <>();
160
162
lstSQLResultsToExport .setSelectionMode (ListSelectionModel .SINGLE_SELECTION );
161
- ret .add (new JScrollPane (lstSQLResultsToExport ), gbc );
163
+ ret .add (GUIUtils . setPreferredHeight ( new JScrollPane (lstSQLResultsToExport ), 50 ), gbc );
162
164
163
- gbc = new GridBagConstraints (1 , 0 , 1 , 1 , 0 , 0 , GridBagConstraints .NORTHEAST , GridBagConstraints .NONE , new Insets (0 , 0 , 0 , 0 ), 0 , 0 );
164
- ret .add (createRightSideListEditButtons (), gbc );
165
+ gbc = new GridBagConstraints (0 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .NORTHWEST , GridBagConstraints .NONE , new Insets (0 , 0 , 0 , 0 ), 0 , 0 );
166
+ ret .add (createEditButtonsAtBottomOfList (), gbc );
165
167
166
168
167
-
168
- gbc = new GridBagConstraints (0 , 1 , 2 , 1 , 0 , 0 , GridBagConstraints .NORTHWEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 0 , 0 , 0 ), 0 , 0 );
169
+ gbc = new GridBagConstraints (0 , 2 , 2 , 1 , 0 , 0 , GridBagConstraints .NORTHWEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 0 , 0 , 0 ), 0 , 0 );
169
170
txtExportFileOrDir = GUIUtils .styleTextFieldToCopyableLabel (new JTextField ());
170
171
ret .add (txtExportFileOrDir , gbc );
171
172
172
- return GUIUtils . setPreferredHeight ( ret , 200 ) ;
173
+ return ret ;
173
174
}
174
175
175
- private JPanel createRightSideListEditButtons ()
176
+ private JPanel createEditButtonsAtBottomOfList ()
176
177
{
177
178
JPanel ret = new JPanel (new GridBagLayout ());
178
179
179
180
180
181
GridBagConstraints gbc ;
181
- gbc = new GridBagConstraints (1 , 0 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 0 , 0 , 0 ), 0 , 0 );
182
+ gbc = new GridBagConstraints (0 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 0 , 0 , 0 ), 0 , 0 );
182
183
btnUp = new JButton (Main .getApplication ().getResources ().getIcon (SquirrelResources .IImageNames .ARROW_UP ));
183
184
btnUp .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.edit.excel.table_sheet.order.tooltip" ));
184
185
ret .add (GUIUtils .styleAsToolbarButton (btnUp ), gbc );
@@ -188,27 +189,27 @@ private JPanel createRightSideListEditButtons()
188
189
btnDown .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.edit.excel.table_sheet.order.tooltip" ));
189
190
ret .add (GUIUtils .styleAsToolbarButton (btnDown ), gbc );
190
191
191
- gbc = new GridBagConstraints (1 , 2 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (3 , 0 , 0 , 0 ), 0 , 0 );
192
+ gbc = new GridBagConstraints (2 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 3 , 0 , 0 ), 0 , 0 );
192
193
btnEdit = new JButton (Main .getApplication ().getResources ().getIcon (SquirrelResources .IImageNames .EDIT ));
193
194
btnEdit .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.edit.excel.table_sheet.name.tooltip" ));
194
195
ret .add (GUIUtils .styleAsToolbarButton (btnEdit ), gbc );
195
196
196
- gbc = new GridBagConstraints (1 , 3 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (3 , 0 , 0 , 0 ), 0 , 0 );
197
+ gbc = new GridBagConstraints (3 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 3 , 0 , 0 ), 0 , 0 );
197
198
btnDelete = new JButton (Main .getApplication ().getResources ().getIcon (SquirrelResources .IImageNames .DELETE ));
198
199
btnDelete .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.remove.sql.result.tooltip" ));
199
200
ret .add (GUIUtils .styleAsToolbarButton (btnDelete ), gbc );
200
201
201
- gbc = new GridBagConstraints (1 , 4 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (3 , 0 , 0 , 0 ), 0 , 0 );
202
+ gbc = new GridBagConstraints (4 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 3 , 0 , 0 ), 0 , 0 );
202
203
btnSaveNames = new JButton (Main .getApplication ().getResources ().getIcon (SquirrelResources .IImageNames .SAVE ));
203
204
btnSaveNames .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.save.names.tooltip" ));
204
205
ret .add (GUIUtils .styleAsToolbarButton (btnSaveNames ), gbc );
205
206
206
- gbc = new GridBagConstraints (1 , 5 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (3 , 0 , 0 , 0 ), 0 , 0 );
207
+ gbc = new GridBagConstraints (5 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 3 , 0 , 0 ), 0 , 0 );
207
208
btnApplySavedNames = new JButton (Main .getApplication ().getResources ().getIcon (SquirrelResources .IImageNames .OPEN ));
208
209
btnApplySavedNames .setToolTipText (s_stringMgr .getString ("TableExportSelectionPanel.apply.saved.names.tooltip" ));
209
210
ret .add (GUIUtils .styleAsToolbarButton (btnApplySavedNames ), gbc );
210
211
211
- gbc = new GridBagConstraints (1 , 6 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (3 , 0 , 0 , 0 ), 0 , 0 );
212
+ gbc = new GridBagConstraints (6 , 1 , 1 , 1 , 0 , 0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (0 , 3 , 0 , 0 ), 0 , 0 );
212
213
btnInfo = new SmallToolTipInfoButton (s_stringMgr .getString ("TableExportSelectionPanel.info.button" ));
213
214
ret .add (btnInfo .getButton (), gbc );
214
215
0 commit comments