//////////////////////////////////////////////////////////////////////////// // KeyListener //////////////////////////////////////////////////////////////////////////// @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (!eventsDatabase.getEvents().isEmpty()) { String searchCriteria = searchBox.getText().trim(); if (searchCriteria.length() > 0) { filters.setFilterCriteria(searchCriteria); List<Event> events = filters.filterEvents(eventsDatabase.getEvents()); TableWindow window = new TableWindow("Filtered by : " + searchCriteria, events); window.setVisible(true); jCloudTrailViewer.DESKTOP.add(window); try { window.setSelected(true); } catch (java.beans.PropertyVetoException pve) { } } } else { JOptionPane.showMessageDialog( jCloudTrailViewer.DESKTOP, "No Events Loaded!", "Data Error", JOptionPane.WARNING_MESSAGE); } } }
private void showTable(boolean combined) { if (!eventsDatabase.getEvents().isEmpty()) { AbstractInternalFrame window; if (combined) { window = new CombinedWindow("All Events", eventsDatabase.getEvents(), null); } else { window = new TableWindow("All Evetns", eventsDatabase.getEvents()); } window.setVisible(true); jCloudTrailViewer.DESKTOP.add(window); try { window.setSelected(true); } catch (java.beans.PropertyVetoException pve) { } } else { JOptionPane.showMessageDialog( jCloudTrailViewer.DESKTOP, "No Events Loaded!", "Data Error", JOptionPane.WARNING_MESSAGE); } }
private void securityScan() { SecurityWindow securityPanel = new SecurityWindow(); securityPanel.setVisible(true); jCloudTrailViewer.DESKTOP.add(securityPanel); try { securityPanel.setSelected(true); } catch (java.beans.PropertyVetoException pve) { } }
private void showChart() { if (!eventsDatabase.getEvents().isEmpty()) { ChartData chartData = ChartDialog.showDialog(jCloudTrailViewer.DESKTOP); if (chartData != null) { ChartWindow chart = new ChartWindow(chartData, eventsDatabase.getEvents()); chart.setVisible(true); jCloudTrailViewer.DESKTOP.add(chart); } } else { JOptionPane.showMessageDialog( jCloudTrailViewer.DESKTOP, "No Events Loaded!", "Data Error", JOptionPane.WARNING_MESSAGE); } }