/** * This method is called when the wizard should finish. This may be * overridden to change the default behavior (jumpting to next page until * the wizard finished). */ public void doFinish() { doNext(); }
/** * Get translated string to be used on this page (see {@link * #getTranslatedValue} for details about the translation process). * * @param value Value to translate. * * @return Translated value (may be same as argument if no translation is * available). * * @see #getTranslatedValue */ protected String getTranslatedString( final String value ) { return (String)getTranslatedValue( value ); }
/** * Construct page. * * @param wizard Wizard that controls this page. * @param res Resource bundle for this page (optional). * @param name Name and resource key of page (optional). * @param layout Layout manager for this page. */ protected WizardPage( final Wizard wizard, final ResourceBundle res, final String name, final LayoutManager layout ) { super( layout ); setLocale( wizard.getLocale() ); setName( name ); _wizard = wizard; _res = res; }
@Nullable @Override public String getDescription() { final String name = getName(); return ( name != null ) ? ResourceBundleTools.getString( _res, name + ".description", null ) : null; }
/** * This method is called when the wizard should jump to the next page. This * may be overridden to change the default behavior (jumpting to the next * available page). */ public void doNext() { final Wizard wizard = getWizard(); wizard.jumpRelative( 1 ); }
/** * Jump to previous page. */ public void doPrevious() { final WizardPage page = getActivePage(); if ( page != null ) { page.doPrevious(); } }
/** * Handle 'Finish' action. * * The default implementation finishes all pages non-interactively, sets the * '{@code finished}' flag, and calls {@link #doClose}. */ public void doFinish() { //noinspection ObjectEquality for ( WizardPage page = getActivePage(), last = null; page != null && page != last; last = page, page = getActivePage() ) { page.doFinish(); } _finished = true; doClose(); }
@Nullable @Override public String getTitle() { final String name = getName(); return ( name != null ) ? ResourceBundleTools.getString( _res, name + ".title", null ) : null; }
/** * This method is called when the wizard should jump to the previous page. * This may be overridden to change the default behavior (jumping to the * previous available page). */ public void doPrevious() { final Wizard wizard = getWizard(); wizard.jumpRelative( -1 ); }
final String name = getName(); if ( name != null )
/** * Jump to next page. */ public void doNext() { final WizardPage page = getActivePage(); if ( page != null ) { page.doNext(); } }
@Override public void doNext() { final VirtualFile selectedFile = getSelectedFile(); if ( selectedFile != null ) { if ( selectedFile.isDirectory() ) { final Explorer explorer = getExplorer(); explorer.setCurrentFolder( selectedFile.getPath() ); } else { super.doNext(); } } } }