Skip to content

Commit

Permalink
SQL formatting
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/jailer/code/trunk@1377 3dd849cd-670e-4645-a7cd-dd197c8d0e81
  • Loading branch information
rwisser committed Sep 27, 2017
1 parent c537aaa commit 5eed953
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ public void actionPerformed(ActionEvent e) {
panel.removeAll();
final Pair<MetaDataDetails, MDTable> cacheKey = new Pair<MetaDataDetails, MDTable>(mdd, mdTable);
if (detailsViews.containsKey(cacheKey)) {
panel.add(detailsViews.get(cacheKey));
tabbedPane.repaint();
continue;
JComponent comp = detailsViews.get(cacheKey);
panel.add(comp);
tabbedPane.repaint();
continue;
}
panel.add(new JLabel(" loading..."));
tabbedPane.repaint();
Expand Down Expand Up @@ -307,24 +308,24 @@ public void run() {
} catch (SQLException e) {
e.printStackTrace();
}
}
});

SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
LoadJob loadJob = rb.newLoadJob(metaDataDetails[0]);
loadJob.run();
panel.removeAll();
JComponent rTabContainer = rb.getRowsTableContainer();
panel.add(rTabContainer);
tabbedPane.repaint();
detailsViews.put(cacheKey, rTabContainer);
final JTable rTab = rb.getRowsTable();
SwingUtilities.invokeLater(new Runnable() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
mdd.adjustRowsTable(rTab);
LoadJob loadJob = rb.newLoadJob(metaDataDetails[0]);
loadJob.run();
JComponent rTabContainer = rb.getRowsTableContainer();
detailsViews.put(cacheKey, rTabContainer);
final JTable rTab = rb.getRowsTable();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
mdd.adjustRowsTable(rTab);
panel.removeAll();
JComponent rTabContainer = rb.getRowsTableContainer();
panel.add(rTabContainer);
tabbedPane.repaint();
}
});
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,16 @@ public void valueChanged(TreeSelectionEvent e) {
}
if (last instanceof DefaultMutableTreeNode) {
final Object uo = ((DefaultMutableTreeNode) last).getUserObject();
if (uo instanceof MDSchema) {
onSchemaSelect((MDSchema) uo);
} else if (uo instanceof MDTable) {
if (uo instanceof MDTable) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (metaDataTree.getSelectionPath() != null && metaDataTree.getSelectionPath().getLastPathComponent() == last) {
onTableSelect((MDTable) uo);
if (uo instanceof MDSchema) {
onSchemaSelect((MDSchema) uo);
} else if (uo instanceof MDTable) {
onTableSelect((MDTable) uo);
}
}
}
});
Expand Down

0 comments on commit 5eed953

Please sign in to comment.