use of org.zaproxy.zap.view.ZapTable in project zaproxy by zaproxy.
the class SpiderPanel method getAddedNodesTable.
private JXTable getAddedNodesTable() {
if (addedNodesTable == null) {
// Create the table with a default, empty TableModel and the proper settings
addedNodesTable = new ZapTable(EMPTY_URLS_NO_FLAGS_TABLE_MODEL);
addedNodesTable.setColumnSelectionAllowed(false);
addedNodesTable.setCellSelectionEnabled(false);
addedNodesTable.setRowSelectionAllowed(true);
addedNodesTable.setAutoCreateRowSorter(true);
addedNodesTable.setAutoCreateColumnsFromModel(false);
addedNodesTable.getColumnExt(0).setCellRenderer(new DefaultTableRenderer(new MappedValue(StringValues.EMPTY, IconValues.NONE), JLabel.CENTER));
addedNodesTable.getColumnExt(0).setHighlighters(new ProcessedCellItemIconHighlighter(0));
addedNodesTable.getColumnModel().getColumn(0).setMinWidth(80);
// processed
addedNodesTable.getColumnModel().getColumn(0).setPreferredWidth(90);
addedNodesTable.getColumnModel().getColumn(1).setMinWidth(60);
// method
addedNodesTable.getColumnModel().getColumn(1).setPreferredWidth(70);
// name
addedNodesTable.getColumnModel().getColumn(2).setMinWidth(400);
addedNodesTable.getColumnModel().getColumn(2).setPreferredWidth(1000);
addedNodesTable.setName(ADDED_NODES_CONTAINER_NAME);
addedNodesTable.setDoubleBuffered(true);
addedNodesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
addedNodesTable.setComponentPopupMenu(new JPopupMenu() {
private static final long serialVersionUID = 6608291059686282641L;
@Override
public void show(Component invoker, int x, int y) {
View.getSingleton().getPopupMenu().show(invoker, x, y);
}
});
}
return addedNodesTable;
}
Aggregations