} else if (datastore instanceof OdbDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(OdbDatastore.class, datastore).createInjector();
OdbDatastoreDialog dialog = injector.getInstance(OdbDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof FixedWidthDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(FixedWidthDatastore.class, datastore).createInjector();
FixedWidthDatastoreDialog dialog = injector.getInstance(FixedWidthDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof DbaseDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(DbaseDatastore.class, datastore).createInjector();
DbaseDatastoreDialog dialog = injector.getInstance(DbaseDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof CompositeDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
CompositeDatastoreDialog dialog = new CompositeDatastoreDialog((CompositeDatastore) datastore,
_datastoreCatalog, _windowContext);
dialog.setVisible(true);
}
});
} else {
editButton.setEnabled(false);
}