public LogPanel(ToolState toolState, StatusView statusView) { this.statusView = statusView; splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); logRecordTable = new LogRecordTable(toolState, statusView); logRecordPanel = new LogRecordPanel(); splitPane.add(logRecordTable.getScrollPane()); splitPane.add(logRecordPanel); setPreferredSize(new Dimension(1000, 800)); splitPane.setDividerLocation(400); setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.BOTH; gbc.weightx = 1.0; gbc.weighty = 1.0; add(splitPane, gbc); logRecordTable .getSelectionModel() .addListSelectionListener( new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } ListSelectionModel lsm = (ListSelectionModel) e.getSource(); if (lsm.isSelectionEmpty()) { logRecordPanel.reset(); } int selectionIndex = lsm.getAnchorSelectionIndex(); LogRecord lr = logRecordTable.getLogRecordAt(selectionIndex); logRecordPanel.setLogRecord(lr); } }); }
public void resetView() { logRecordTable.clear(); }
public void gotoNextTag() { logRecordTable.gotoNextTag(); }
@Override public void toggleShowOnlyTaggedRecords() throws FilterException { logRecordTable.toggleShowOnlyTaggedRecords(); }
public void clearRecordTags() { logRecordTable.clearRecordTags(); }
public void gotoPrevTag() { logRecordTable.gotoPrevTag(); }
public void toggleRecordTag() { logRecordTable.toggleRecordTag(); }
public int getSelectedRow() { return logRecordTable.getSelectedRow(); }
public void setFilter(String filter) throws FilterException { logRecordTable.setFilter(filter); }
private void updateList(final Log log, final String filter) throws FilterException { numberOfRecords = log.size(); logRecordTable.setLog(log, filter); }
public void setLogData(Log log, String filter) throws FilterException { updateList(log, filter); logRecordTable.changeSelection(0, 0, true, false); }