コード例 #1
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
  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);
  }
コード例 #2
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
  /**
   * 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);
  }
コード例 #3
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
  /** 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);
  }
コード例 #4
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
  /** 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);
  }
コード例 #5
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
 public void actionPerformed(ActionEvent e) {
   LogView4JEvent markerEvent = new LogView4JEvent(LogView4JEventId.NEXT_MARKED);
   LogView4JEventManager.getInstance().fireEvent(markerEvent);
 }
コード例 #6
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
 public void actionPerformed(ActionEvent e) {
   LogView4JEvent markerEvent = new LogView4JEvent(LogView4JEventId.TOGGLE_SELECTION_MARKER);
   LogView4JEventManager.getInstance().fireEvent(markerEvent);
 }
コード例 #7
0
ファイル: LogTableToolBar.java プロジェクト: iceant/c-logger
 /** 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);
 }