}
}
private void createGUI()
{
final IApplication app = _session.getApplication();
synchronized (getClass())
{
if (!s_loadedSQLHistory)
{
final SQLHistory sqlHistory = app.getSQLHistory();
SQLHistoryComboBoxModel.initializeSharedInstance(sqlHistory.getData());
s_loadedSQLHistory = true;
}
}
// _tabbedResultsPanel = UIFactory.getInstance().createTabbedPane();
_tabbedExecuterPanel = UIFactory.getInstance().createTabbedPane();
_tabbedExecuterPanel.addChangeListener(new MyExecuterPaneListener());
setLayout(new BorderLayout());
_nbrRows.setColumns(8);
final SessionProperties props = _session.getProperties();
_sqlCombo = new SQLHistoryComboBox(props.getSQLShareHistory());
_sqlCombo.setEditable(false);
if (_sqlCombo.getItemCount() > 0)
{
_sqlCombo.setSelectedIndex(_sqlCombo.getItemCount() - 1);
}
{
JPanel pnl = new JPanel();
pnl.setLayout(new BorderLayout());
pnl.add(_sqlCombo, BorderLayout.CENTER);
Box box = Box.createHorizontalBox();
box.add(new CopyLastButton(app));
box.add(new ShowHistoryButton(app));
box.add(Box.createHorizontalStrut(10));
// i18n[SQLPanel.limitrowscheckbox.hint=Limit rows: ]
String hint =
s_stringMgr.getString("SQLPanel.limitrowscheckbox.label");
_limitRowsChk = new JCheckBox(hint);
box.add(_limitRowsChk);
box.add(Box.createHorizontalStrut(5));
box.add(_nbrRows);
pnl.add(box, BorderLayout.EAST);
add(pnl, BorderLayout.NORTH);
}
createSplitPaneWithHackToSetSplitLocation();
_splitPane.setOneTouchExpandable(true);
installSQLEntryPanel(
app.getSQLEntryPanelFactory().createSQLEntryPanel(
_session,
new HashMap<String, Object>()));
_executerPanleHolder = new JPanel(new GridLayout(1,1));
_simpleExecuterPanel = new JPanel(new GridLayout(1,1));