public void showCustomScanDialog ( Target target ) { if ( customScanDialog == null ) { // Work out the tabs String [ ] tabs = CustomScanDialog . STD_TAB_LABELS ; if ( this . customScanPanels . size ( ) > 0 ) { List < String > tabList = new ArrayList < String > ( ) ; for ( String str : CustomScanDialog . STD_TAB_LABELS ) { tabList . add ( str ) ; } for ( CustomScanPanel csp : customScanPanels ) { tabList . add ( csp . getLabel ( ) ) ; } tabs = tabList . toArray ( new String [ tabList . size ( ) ] ) ; } customScanDialog = new CustomScanDialog ( this , tabs , this . customScanPanels , View . getSingleton ( ) . getMainFrame ( ) , new Dimension ( 700 , 500 ) ) ; } if ( customScanDialog . isVisible ( ) ) { customScanDialog . requestFocus ( ) ; // Its behind you! Actually not needed no the window is alwaysOnTop, but keeping in case we change that ;) customScanDialog . toFront ( ) ; return ; } if ( target != null ) { customScanDialog . init ( target ) ; } else { // Keep the previously selected target customScanDialog . init ( null ) ; } customScanDialog . setVisible ( true ) ; }
Shows the active scan dialogue with the given target if not already visible .