Search in sources :

Example 21 with Profile

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;
}
Also used : ListSelectionEvent(javax.swing.event.ListSelectionEvent) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) MessageDialogFactory(com.att.aro.ui.commonui.MessageDialogFactory) IOException(java.io.IOException) Profile(com.att.aro.core.configuration.pojo.Profile) ListSelectionListener(javax.swing.event.ListSelectionListener)

Aggregations

Profile (com.att.aro.core.configuration.pojo.Profile)21 IOException (java.io.IOException)7 File (java.io.File)4 IProfileFactory (com.att.aro.core.configuration.IProfileFactory)3 PacketInfo (com.att.aro.core.packetanalysis.pojo.PacketInfo)3 RRCState (com.att.aro.core.packetanalysis.pojo.RRCState)3 RrcStateRange (com.att.aro.core.packetanalysis.pojo.RrcStateRange)3 MessageDialogFactory (com.att.aro.ui.commonui.MessageDialogFactory)3 ArrayList (java.util.ArrayList)3 Properties (java.util.Properties)3 TableCellEditor (javax.swing.table.TableCellEditor)3 ProfileLTE (com.att.aro.core.configuration.pojo.ProfileLTE)2 ProfileType (com.att.aro.core.configuration.pojo.ProfileType)2 EnergyModel (com.att.aro.core.packetanalysis.pojo.EnergyModel)2 TimeRange (com.att.aro.core.packetanalysis.pojo.TimeRange)2 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 FileNotFoundException (java.io.FileNotFoundException)2 BaseTest (com.att.aro.core.BaseTest)1 BestPracticeType (com.att.aro.core.bestpractice.pojo.BestPracticeType)1