private ZapMenuItem getMenuToolsFilter ( ) { if ( menuToolsFilter == null ) { menuToolsFilter = new ZapMenuItem ( "menu.tools.filter" ) ; menuToolsFilter . addActionListener ( new java . awt . event . ActionListener ( ) { @ Override public void actionPerformed ( java . awt . event . ActionEvent e ) { FilterDialog dialog = new FilterDialog ( getView ( ) . getMainFrame ( ) ) ; dialog . setAllFilters ( filterFactory . getAllFilter ( ) ) ; dialog . showDialog ( false ) ; boolean startThread = false ; for ( Filter filter : filterFactory . getAllFilter ( ) ) { if ( filter . isEnabled ( ) ) { startThread = true ; break ; } } if ( startThread ) { if ( timerFilterThread == null ) { timerFilterThread = new TimerFilterThread ( filterFactory . getAllFilter ( ) ) ; timerFilterThread . start ( ) ; } } else if ( timerFilterThread != null ) { timerFilterThread . setStopped ( ) ; timerFilterThread = null ; } } } ) ; } return menuToolsFilter ; }
This method initializes menuToolsFilter