private WButton newVisibilityToggleForTab ( final int idx ) { WButton toggleButton = new WButton ( "Toggle visibility of tab " + ( idx + 1 ) ) ; toggleButton . setAction ( new Action ( ) { @ Override public void execute ( final ActionEvent event ) { boolean tabVisible = tabset . isTabVisible ( idx ) ; tabset . setTabVisible ( idx , ! tabVisible ) ; } } ) ; return toggleButton ; }
Creates a button to toggle the visibility of a tab .