} else if (datastore instanceof SasDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(SasDatastore.class, datastore).createInjector();
SasDatastoreDialog dialog = injector.getInstance(SasDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof XmlDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(XmlDatastore.class, datastore).createInjector();
XmlDatastoreDialog dialog = injector.getInstance(XmlDatastoreDialog.class);
dialog.setVisible(true);
}
});
} 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);
}