Exemplo n.º 1
0
  protected void quickFilterChanged() {
    LogView4JEvent clearEvent = new LogView4JEvent(LogView4JEventId.CLEAR_EVENT_SELECTION);
    LogView4JEventManager.getInstance().fireEvent(clearEvent);

    LogView4JEvent filterChangedEvent = new LogView4JEvent(LogView4JEventId.QUICK_FILTER_CHANGED);
    filterChangedEvent.set(LogView4JEventKey.QUICK_FILTER, quickFilterTextField.getText());
    filterChangedEvent.set(
        LogView4JEventKey.REGEX_FILTER,
        (regularExpressionCheckBox.isSelected()) ? Boolean.TRUE : Boolean.FALSE);
    LogView4JEventManager.getInstance().fireEvent(filterChangedEvent);
  }
Exemplo n.º 2
0
  /**
   * Toggles the button level state and notifies listeners of the change
   *
   * @param button the button that was clicked
   */
  protected void updateLevelFilter(SimpleToggleButton button) {
    button.toggleOn();

    LogView4JEvent clearEvent = new LogView4JEvent(LogView4JEventId.CLEAR_EVENT_SELECTION);
    LogView4JEventManager.getInstance().fireEvent(clearEvent);

    LogView4JEvent event = new LogView4JEvent(LogView4JEventId.LOGGING_LEVEL_FILTER_CHANGED);
    event.set(LogView4JEventKey.LEVEL_FILTER_FLAGS, getLevelFlags());
    event.set(LogView4JEventKey.JUST_FIRE_EVENT, Boolean.TRUE);
    LogView4JEventManager.getInstance().fireEvent(event);
  }
Exemplo n.º 3
0
  /** Toggles the play button state and fires an event */
  protected void togglePlayPause() {
    playButton.toggleOn();

    if (playButton.isOn()) {
      playButton.setToolTipText("Event receival is active, click to pause");
    } else {
      playButton.setToolTipText("Event receival is inactive, click to start");
    }

    LogView4JEvent event = new LogView4JEvent(LogView4JEventId.PAUSE_PROCESSING_EVENTS);
    event.set(LogView4JEventKey.PAUSED, new Boolean(!playButton.isOn()));
    LogView4JEventManager.getInstance().fireEvent(event);
  }
Exemplo n.º 4
0
  /** Registers listeners on the buttons */
  protected void registerListeners() {
    LevelChangeActionListener levelChangeListener = new LevelChangeActionListener();
    debugButton.addActionListener(levelChangeListener);
    infoButton.addActionListener(levelChangeListener);
    warnButton.addActionListener(levelChangeListener);
    errorButton.addActionListener(levelChangeListener);
    fatalButton.addActionListener(levelChangeListener);
    playButton.addActionListener(new PlayPauseActionListener());
    deleteButton.addActionListener(new ClearEventsActionListener());
    quickFilterTextField.getDocument().addDocumentListener(new QuickFilterDocumentListener());
    markerButton.addActionListener(new EventMarkerAction());
    prevMarkedButton.addActionListener(new PrevMarkedAction());
    nextMarkedButton.addActionListener(new NextMarkedAction());
    regularExpressionCheckBox.addActionListener(new RegexToggleListener());

    LogView4JEventManager.getInstance().register(this);
  }
Exemplo n.º 5
0
 public void actionPerformed(ActionEvent e) {
   LogView4JEvent markerEvent = new LogView4JEvent(LogView4JEventId.NEXT_MARKED);
   LogView4JEventManager.getInstance().fireEvent(markerEvent);
 }
Exemplo n.º 6
0
 public void actionPerformed(ActionEvent e) {
   LogView4JEvent markerEvent = new LogView4JEvent(LogView4JEventId.TOGGLE_SELECTION_MARKER);
   LogView4JEventManager.getInstance().fireEvent(markerEvent);
 }
Exemplo n.º 7
0
 /** Fired to clear events */
 protected void clearEvents() {
   LogView4JEvent event = new LogView4JEvent(LogView4JEventId.REMOVE_ALL_EVENTS);
   event.set(LogView4JEventKey.JUST_FIRE_EVENT, Boolean.TRUE);
   LogView4JEventManager.getInstance().fireEvent(event);
 }