Search in sources :

Example 1 with DomainsTCPSessions

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

the class OverviewTabTableSplitPane method getAccessedDomainContentTable.

/**
 * Initializes and returns the RequestResponseTable.
 */
public JTable getAccessedDomainContentTable() {
    if (accessedDataTable == null) {
        accessedDataTable = new DataTable<DomainsTCPSessions>(accessDomainModel);
        accessedDataTable.setName(ResourceBundleHelper.getMessageString("overview.accessed.domains.tableName"));
        DataTablePopupMenu popupMenu = (DataTablePopupMenu) accessedDataTable.getPopup();
        popupMenu.initialize();
        accessedDataTable.setAutoCreateRowSorter(true);
        accessedDataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        accessedDataTable.setGridColor(Color.LIGHT_GRAY);
        TableRowSorter<TableModel> sorter = new TableRowSorter<>(accessDomainModel);
        accessedDataTable.setRowSorter(sorter);
        sorter.setComparator(0, Util.getDomainSorter());
        accessedDataTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent arg0) {
                DomainsTCPSessions aTCpSession = accessedDataTable.getSelectedItem();
                if (null != aTCpSession) {
                    expandedDomainModel.setData(aTCpSession.getTcpSessions());
                } else {
                    expandedDomainModel.removeAllRows();
                }
            }
        });
    }
    return accessedDataTable;
}
Also used : DomainsTCPSessions(com.att.aro.ui.model.overview.DomainsTCPSessions) DataTablePopupMenu(com.att.aro.ui.model.DataTablePopupMenu) ListSelectionEvent(javax.swing.event.ListSelectionEvent) 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) ListSelectionListener(javax.swing.event.ListSelectionListener)

Aggregations

DataTablePopupMenu (com.att.aro.ui.model.DataTablePopupMenu)1 AccessedDomainsTableModel (com.att.aro.ui.model.overview.AccessedDomainsTableModel)1 DomainsTCPSessions (com.att.aro.ui.model.overview.DomainsTCPSessions)1 ExpandedDomainTableModel (com.att.aro.ui.model.overview.ExpandedDomainTableModel)1 ListSelectionEvent (javax.swing.event.ListSelectionEvent)1 ListSelectionListener (javax.swing.event.ListSelectionListener)1 TableModel (javax.swing.table.TableModel)1 TableRowSorter (javax.swing.table.TableRowSorter)1