예제 #1
0
 private void filterValidStateChanged(LogView4JEvent event) {
   Boolean isValid = (Boolean) event.get(LogView4JEventKey.FILTER_VALID);
   if (Boolean.TRUE.equals(isValid)) {
     quickFilterTextField.setToolTipText("Quick filter");
     quickFilterTextField.setBackground(Color.WHITE);
     quickFilterTextField.setForeground(Color.BLACK);
   } else {
     String error = (String) event.get(LogView4JEventKey.ERROR_MESSAGE);
     quickFilterTextField.setToolTipText("Quick filter : " + error);
     quickFilterTextField.setBackground(INVALID_COLOR);
     quickFilterTextField.setForeground(Color.WHITE);
   }
 }
예제 #2
0
  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);
      }
    }
  }