use of com.att.aro.ui.view.menu.tools.RegexWizard in project VideoOptimzer by attdevsupport.
the class VideoRequestPanel method getRequestListPanel.
private JPanel getRequestListPanel() {
if (requestListPanel == null) {
requestListPanel = new JPanel();
requestListPanel.setLayout(new BorderLayout());
getDummyData();
requestListTable = new DataTable<HttpRequestResponseInfo>();
requestListPanel.setName(ResourceBundleHelper.getMessageString("video.tab.requests.tableName"));
DataTablePopupMenu popupMenu = (DataTablePopupMenu) requestListTable.getPopup();
popupMenu.initialize();
videoRequestTableModel.setData(requestURL);
requestListTable.setModel(videoRequestTableModel);
JTableHeader header = requestListTable.getTableHeader();
requestListTable.setGridColor(Color.LIGHT_GRAY);
int width = requestListTable.getParent() != null ? requestListTable.getParent().getWidth() : 1000;
width = requestPanel.getWidth();
requestListTable.getColumnModel().getColumn(0).setPreferredWidth(width);
requestListTable.getColumnModel().getColumn(0).setCellRenderer(new WordWrapRenderer());
requestListPanel.add(header, BorderLayout.NORTH);
requestListPanel.add(requestListTable, BorderLayout.CENTER);
requestListTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent event) {
if (event.getClickCount() == 2) {
int row = requestListTable.getSelectedRow();
HttpRequestResponseInfo request = requestURL.get(row);
requestListTable.getColumnModel().getColumn(0).setCellRenderer(new WordWrapRenderer(row));
if (ResourceBundleHelper.getMessageString("videotab.videorequest.table.url").equals(requestListTable.getColumnName(requestListTable.getSelectedColumn()))) {
RegexWizard regexWizard = RegexWizard.getInstance(aroView.getJFrame());
regexWizard.setRequest(request);
regexWizard.setVisible(true);
}
}
}
});
}
return requestListPanel;
}
Aggregations