use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.
the class BPAdaptiveBitrateTablePanel method getContentTable.
@SuppressWarnings("unchecked")
public DataTable<QualityTime> getContentTable() {
if (contentTable == null) {
contentTable = new DataTable<QualityTime>(tableModel);
contentTable.setName(ResourceBundleHelper.getMessageString("video.adaptive.bitrate.tableName"));
contentTable.setAutoCreateRowSorter(true);
contentTable.setGridColor(Color.LIGHT_GRAY);
contentTable.setRowHeight(ROW_HEIGHT);
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
TableRowSorter<TableModel> sorter = new TableRowSorter<>(tableModel);
contentTable.setRowSorter(sorter);
sorter.toggleSortOrder(AdaptiveBitrateTableModel.COL_2);
sorter.setComparator(AdaptiveBitrateTableModel.COL_3, Util.getFloatSorter());
sorter.toggleSortOrder(AdaptiveBitrateTableModel.COL_4);
sorter.setComparator(AdaptiveBitrateTableModel.COL_5, Util.getFloatSorter());
sorter.setComparator(AdaptiveBitrateTableModel.COL_6, Util.getFloatSorter());
sorter.setComparator(AdaptiveBitrateTableModel.COL_7, Util.getFloatSorter());
sorter.setComparator(AdaptiveBitrateTableModel.COL_8, Util.getFloatSorter());
// set default sort
sorter.toggleSortOrder(AdaptiveBitrateTableModel.COL_1);
DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
popupMenu.initialize();
}
return contentTable;
}
use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.
the class BPVideoStallTablePanel method getContentTable.
@SuppressWarnings("unchecked")
public DataTable<VideoStall> getContentTable() {
if (contentTable == null) {
contentTable = new DataTable<VideoStall>(tableModel);
contentTable.setName(ResourceBundleHelper.getMessageString("video.stalls.tableName"));
contentTable.setAutoCreateRowSorter(true);
contentTable.setGridColor(Color.LIGHT_GRAY);
contentTable.setRowHeight(ROW_HEIGHT);
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
TableRowSorter<TableModel> sorter = new TableRowSorter<>(tableModel);
contentTable.setRowSorter(sorter);
sorter.setComparator(VideoStallTableModel.COL_2, Util.getIntSorter());
sorter.setComparator(VideoStallTableModel.COL_3, Util.getFloatSorter());
sorter.setComparator(VideoStallTableModel.COL_4, Util.getFloatSorter());
sorter.setComparator(VideoStallTableModel.COL_5, Util.getFloatSorter());
sorter.toggleSortOrder(SimultnsConnTableModel.COL_1);
DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
popupMenu.initialize();
}
return contentTable;
}
use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.
the class DiagnosticsTab method getJPacketViewTable.
/**
* Initializes and returns the Packet View Table.
*/
public DataTable<PacketInfo> getJPacketViewTable() {
if (jPacketViewTable == null) {
jPacketViewTable = new DataTable<PacketInfo>(jPacketViewTableModel);
jPacketViewTable.setName(ResourceBundleHelper.getMessageString("diagnostics.packet.view.tableName"));
jPacketViewTable.setAutoCreateRowSorter(true);
jPacketViewTable.setGridColor(Color.LIGHT_GRAY);
jPacketViewTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
PacketInfo packetInfo;
@Override
public void valueChanged(ListSelectionEvent arg0) {
PacketInfo packetInfo = jPacketViewTable.getSelectedItem();
if (packetInfo != null && packetInfo != this.packetInfo) {
double crossHairValue = packetInfo.getTimeStamp();
boolean centerGraph = !(crossHairValue <= graphPanel.getViewportUpperBound() && crossHairValue >= graphPanel.getViewportLowerBound());
// crossHairValue+103
graphPanel.setGraphView(crossHairValue, centerGraph);
// packetInfo.getRequestResponseInfo());
if (videoPlayer != null) {
// logger.info("enter getJPacketViewTable()");
videoPlayer.setMediaTime(graphPanel.getCrosshair());
// logger.info("leave getJPacketViewTable()");
}
}
this.packetInfo = packetInfo;
}
});
DataTablePopupMenu popupMenu = (DataTablePopupMenu) jPacketViewTable.getPopup();
popupMenu.initialize();
}
return jPacketViewTable;
}
use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.
the class RequestResponseDetailsPanel method getJRequestResponseTable.
/**
* Initializes and returns the the DataTable that contains Http request and
* response informations.
*/
public DataTable<HttpRequestResponseInfo> getJRequestResponseTable() {
if (jRequestResponseTable == null) {
jRequestResponseTable = new DataTable<HttpRequestResponseInfo>(jRequestResponseTableModel);
jRequestResponseTable.setName(ResourceBundleHelper.getMessageString("diagnostics.request.response.view.tableName"));
jRequestResponseTable.setAutoCreateRowSorter(true);
jRequestResponseTable.setGridColor(Color.LIGHT_GRAY);
DataTablePopupMenu popupMenu = (DataTablePopupMenu) jRequestResponseTable.getPopup();
popupMenu.initialize();
jRequestResponseTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent event) {
// Enable view and save as buttons appropriately
HttpRequestResponseInfo httpRRInfo = jRequestResponseTable.getSelectedItem();
boolean validResponse = httpRRInfo != null && httpRRInfo.getContentLength() > 0 && httpRRInfo.getDirection() == HttpDirection.RESPONSE && httpRRInfo.getStatusCode() != 0;
boolean isVideo = (validResponse) ? ((httpRRInfo != null && httpRRInfo.getContentType() != null) ? httpRRInfo.getContentType().contains("video/") : false) : false;
boolean isApplicationZip = httpRRInfo != null && httpRRInfo.getContentType() != null && httpRRInfo.getContentType().contains("application/zip");
boolean isContentTypeAvailable = httpRRInfo != null && httpRRInfo.getContentType() != null;
getViewBtn().setEnabled(!isApplicationZip && !isVideo && validResponse && isContentTypeAvailable);
getSaveBtn().setEnabled(!isApplicationZip && validResponse && isContentTypeAvailable);
}
});
jRequestResponseTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent event) {
if (event.getClickCount() == 2 && getViewBtn().isEnabled()) {
try {
viewContent(jRequestResponseTable.getSelectedItem());
} catch (Exception e) {
LOG.error("Failed to open the content in the view window with unexpected error", e);
new MessageDialogFactory().showPlainDialog(RequestResponseDetailsPanel.this.getTopLevelAncestor(), ResourceBundleHelper.getMessageString("view.requestresponsedetails.error.Message"), ResourceBundleHelper.getMessageString("view.requestresponsedetails.error.Title"));
}
}
}
});
}
return jRequestResponseTable;
}
use of com.att.aro.ui.model.DataTablePopupMenu in project VideoOptimzer by attdevsupport.
the class BpSecurityUnsecureSSLVersionTablePanel method getContentTable.
@SuppressWarnings("unchecked")
@Override
public DataTable<UnsecureSSLVersionEntry> getContentTable() {
if (contentTable == null) {
contentTable = new DataTable<UnsecureSSLVersionEntry>(tableModel);
contentTable.setName(ResourceBundleHelper.getMessageString("security.unsecure.ssl.version.tableName"));
contentTable.setAutoCreateRowSorter(true);
contentTable.setGridColor(Color.LIGHT_GRAY);
contentTable.setRowHeight(ROW_HEIGHT);
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
popupMenu.initialize();
}
return contentTable;
}
Aggregations