protected void logEventSelected(LogView4JEvent event) { Object eventObj = event.get(LogView4JEventKey.LOGGING_EVENT); markerButton.setEnabled(false); if (eventObj == null) { markerButton.setEnabled(false); } else { LogView4JLoggingEvent[] events = (LogView4JLoggingEvent[]) eventObj; if (events.length > 0) { markerButton.setEnabled(true); } } }
/** Initializes the toolbar buttons */ protected void init() { super.init(); markerButton.setEnabled(false); quickFilterTextField.setMaximumSize(new Dimension(250, 20)); quickFilterTextField.setToolTipText("Quick filter"); regularExpressionCheckBox.setOpaque(false); regularExpressionCheckBox.setToolTipText("Treat the filter text as a regular expression"); add(quickFilterTextField); add(regularExpressionCheckBox); addDividerButton(); add(debugButton); add(infoButton); add(warnButton); add(errorButton); add(fatalButton); addDividerButton(); add(markerButton); add(prevMarkedButton); add(nextMarkedButton); addDividerButton(); add(playButton); add(deleteButton); registerListeners(); }