Search in sources :

Example 21 with DataTablePopupMenu

use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.

the class EndPointSummaryPanel method getIPTable.

/**
 * Returns a DataTable containing the end point summary per IP address data.
 *
 * @return A DataTable object containing the end point summary per IP address data.
 */
public DataTable<IPPacketSummary> getIPTable() {
    if (ipTable == null) {
        ipTable = new DataTable<IPPacketSummary>(ipTableModel);
        ipTable.setName(ResourceBundleHelper.getMessageString("statistics.ip.summary.tableName"));
        ipTable.setAutoCreateRowSorter(true);
        TableRowSorter<TableModel> sorter = new TableRowSorter<>(ipTableModel);
        sorter.setComparator(0, Util.getDomainSorter());
        ipTable.setRowSorter(sorter);
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) ipTable.getPopup();
        popupMenu.initialize();
    }
    return ipTable;
}
Also used : DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) IPPacketSummary(com.att.aro.core.packetanalysis.pojo.IPPacketSummary) TableModel(javax.swing.table.TableModel) TableRowSorter(javax.swing.table.TableRowSorter)

Example 22 with DataTablePopupMenu

use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.

the class DuplicateContentTablePanel method getJDuplicateContentTable.

/**
 * Initializes and returns the RequestResponseTable.
 */
public DataTable<CacheEntry> getJDuplicateContentTable() {
    if (duplicateContentTable == null) {
        duplicateContentTable = new DataTable<CacheEntry>(duplicateContentTableModel);
        duplicateContentTable.setName(ResourceBundleHelper.getMessageString("overview.duplicate.content.tableName"));
        duplicateContentTable.setAutoCreateRowSorter(true);
        duplicateContentTable.setGridColor(Color.LIGHT_GRAY);
        duplicateContentTable.addMouseListener(this);
        duplicateContentTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent listEvent) {
                CacheEntry entry = duplicateContentTable.getSelectedItem();
                HttpRequestResponseInfo rrInfo = entry != null ? entry.getResponse() : null;
                boolean enabled = rrInfo != null && rrInfo.getContentLength() > 0 && rrInfo.getDirection() == HttpDirection.RESPONSE && entry != null && entry.getSession() != null;
                boolean isContentTypeVideo = (rrInfo != null && rrInfo.getContentType() != null) ? rrInfo.getContentType().contains("video/") : false;
                boolean bVideo = enabled ? isContentTypeVideo : false;
                getViewBtn().setEnabled((bVideo) ? false : enabled);
                getSaveBtn().setEnabled(enabled);
            }
        });
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) duplicateContentTable.getPopup();
        popupMenu.initialize();
    }
    DataTablePopupMenu popupMenu = (DataTablePopupMenu) duplicateContentTable.getPopup();
    popupMenu.initialize();
    return duplicateContentTable;
}
Also used : HttpRequestResponseInfo(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo) ListSelectionEvent(javax.swing.event.ListSelectionEvent) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) CacheEntry(com.att.aro.core.packetanalysis.pojo.CacheEntry) ListSelectionListener(javax.swing.event.ListSelectionListener)

Example 23 with DataTablePopupMenu

use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.

the class OverviewTabTableSplitPane method getExpandedDomainContentTable.

/**
 * Initializes and returns the RequestResponseTable.
 */
public JTable getExpandedDomainContentTable() {
    if (expandedDataTable == null) {
        expandedDataTable = new DataTable<Session>(expandedDomainModel);
        expandedDataTable.setName(ResourceBundleHelper.getMessageString("overview.domain.tcp.sessions.tableName"));
        expandedDataTable.setAutoCreateRowSorter(true);
        expandedDataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        expandedDataTable.setGridColor(Color.LIGHT_GRAY);
        expandedDataTable.addMouseListener(this);
        TableRowSorter<TableModel> sorter = new TableRowSorter<>(expandedDomainModel);
        expandedDataTable.setRowSorter(sorter);
        sorter.setComparator(1, Util.getDomainSorter());
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) expandedDataTable.getPopup();
        popupMenu.initialize();
    }
    return expandedDataTable;
}
Also used : DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) AccessedDomainsTableModel(com.att.aro.ui.model.overview.AccessedDomainsTableModel) TableModel(javax.swing.table.TableModel) ExpandedDomainTableModel(com.att.aro.ui.model.overview.ExpandedDomainTableModel) TableRowSorter(javax.swing.table.TableRowSorter) Session(com.att.aro.core.packetanalysis.pojo.Session)

Example 24 with DataTablePopupMenu

use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.

the class FilterApplicationsAndIpDialog method getJApplicationsTable.

/**
 * Initializes and returns the table that contains the list of applications
 * found in the trace data.
 */
private JTable getJApplicationsTable() {
    if (jApplicationsTable == null) {
        // Make sure to make a copy of the current data before modifying
        jApplicationsTable = new DataTable<ApplicationSelection>(jApplicationsTableModel);
        jApplicationsTable.setAutoCreateRowSorter(true);
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) jApplicationsTable.getPopup();
        popupMenu.initialize();
    }
    return jApplicationsTable;
}
Also used : ApplicationSelection(com.att.aro.core.packetanalysis.pojo.ApplicationSelection) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu)

Example 25 with DataTablePopupMenu

use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.

the class FilterProcessesDialog method getJApplicationsTable.

/**
 * Initializes and returns the table that contains the list of applications
 * found in the trace data.
 */
private JTable getJApplicationsTable() {
    if (jProcessesTable == null) {
        jProcessesTable = new DataTable<ProcessSelection>(jProcessesTableModel);
        jProcessesTable.setAutoCreateRowSorter(true);
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) jProcessesTable.getPopup();
        popupMenu.initialize();
    }
    return jProcessesTable;
}
Also used : ProcessSelection(com.att.aro.core.packetanalysis.pojo.ProcessSelection) FilteredProcessSelection(com.att.aro.core.packetanalysis.pojo.FilteredProcessSelection) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu)

Aggregations

DataTablePopupMenu (com.att.aro.ui.model.DataTablePopupMenu)37 TableModel (javax.swing.table.TableModel)12 TableRowSorter (javax.swing.table.TableRowSorter)12 ListSelectionEvent (javax.swing.event.ListSelectionEvent)5 ListSelectionListener (javax.swing.event.ListSelectionListener)5 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)4 MinificationEntry (com.att.aro.core.bestpractice.pojo.MinificationEntry)2 CacheEntry (com.att.aro.core.packetanalysis.pojo.CacheEntry)2 Session (com.att.aro.core.packetanalysis.pojo.Session)2 MessageDialogFactory (com.att.aro.ui.commonui.MessageDialogFactory)2 SimultnsConnTableModel (com.att.aro.ui.model.bestpractice.SimultnsConnTableModel)2 AccessedDomainsTableModel (com.att.aro.ui.model.overview.AccessedDomainsTableModel)2 ExpandedDomainTableModel (com.att.aro.ui.model.overview.ExpandedDomainTableModel)2 MouseAdapter (java.awt.event.MouseAdapter)2 MouseEvent (java.awt.event.MouseEvent)2 IOException (java.io.IOException)2 AsyncCheckEntry (com.att.aro.core.bestpractice.pojo.AsyncCheckEntry)1 DisplayNoneInCSSEntry (com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry)1 FileOrderEntry (com.att.aro.core.bestpractice.pojo.FileOrderEntry)1 ForwardSecrecyEntry (com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry)1