use of com.att.aro.core.configuration.pojo.Profile in project VideoOptimzer by attdevsupport.
the class SelectProfileDialog method getProfilesTable.
/**
* Initializes and returns the JTable that displays the the list of
* predefined profiles with their types on the SElect Profile dialog.
*/
private DataTable<Profile> getProfilesTable() {
if (jProfilesTable == null) {
MessageDialogFactory dialog = new MessageDialogFactory();
try {
jProfilesTable = new DataTable<Profile>(new ProfileListTableModel(ProfileManager.getInstance().getPredefinedProfilesList()));
jProfilesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jProfilesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if (jProfilesTable.getSelectedRowCount() != -1) {
getOpenButton().setEnabled(true);
}
getFilenameTextField().setText(null);
}
});
DataTablePopupMenu popupMenu = (DataTablePopupMenu) jProfilesTable.getPopup();
popupMenu.initialize();
} catch (IOException e) {
dialog.showErrorDialog(SelectProfileDialog.this, MessageFormat.format(ResourceBundleHelper.getMessageString("profile.profileListError"), e.getMessage()));
} catch (ProfileException e) {
dialog.showErrorDialog(SelectProfileDialog.this, MessageFormat.format(ResourceBundleHelper.getMessageString("profile.profileListError"), e.getMessage()));
}
}
return jProfilesTable;
}
Aggregations