Changeset 17622


Ignore:
Timestamp:
10/29/08 16:18:29 (12 years ago)
Author:
oranfry
Message:

extra options to directory chooser and page

Location:
release-kits/shared/ant-installer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/DirectoryInput.java

    r17569 r17622  
    3131 * @version $Id: DirectoryInput.java,v 1.5 2007/01/28 10:25:48 teknopaul Exp $
    3232 */
    33 public class DirectoryInput
    34     extends OSSpecific {
     33
     34public class DirectoryInput extends OSSpecific {
    3535
    3636    private boolean abort = false;
    3737    private String create;
    3838    private String checkExists;
     39
     40    //to detect previous installations
     41    private String flagFile;
     42    private String flagFileExistsProperty;
    3943
    4044    public DirectoryInput() {
     
    119123    }
    120124
     125    public String getFlagFile() {
     126        return flagFile;
     127    }
     128
     129    public void setFlagFile(String flagFile) {
     130        this.flagFile = flagFile;
     131    }
     132
     133    public String getFlagFileExistsProperty() {
     134        return flagFileExistsProperty;
     135    }
     136
     137    public void setFlagFileExistsProperty( String flagFileExistsProperty ) {
     138        this.flagFileExistsProperty = flagFileExistsProperty;
     139    }
     140
    121141    /**
    122142     * Used by checkConfig to validate the configuration file.
     
    154174    }
    155175
     176    public void setInputResult(String inputResult) {
     177        resultContainer.setProperty(getProperty(), inputResult);
     178
     179        if ( flagFile != null ) {
     180            File ff = new File( inputResult + File.separator + flagFile );
     181            Boolean ffExists = new Boolean(ff.exists());
     182            resultContainer.setProperty( flagFileExistsProperty, ffExists.toString() );
     183        }
     184   
     185    }
     186
     187
    156188}
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/page/Page.java

    r17514 r17622  
    5050    private OutputField[] outputField;
    5151    private boolean abort;
     52
     53    private boolean showNextButton = true;
     54
    5255    /**
    5356     *  target to be called as the installer is running
     
    102105    }
    103106
     107    public boolean isShowNextButton() {
     108        return showNextButton;
     109    }
     110    public void setShowNextButton(boolean snb) {
     111        this.showNextButton = snb;
     112    }
     113    public void setShowNextButton(String snb) {
     114        this.showNextButton = OutputField.isTrue(snb);
     115    }
    104116
    105117    /**
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/page/SimpleInputPage.java

    r15311 r17622  
    2828    private boolean overflow;
    2929
     30    private boolean showNextButton;
     31
    3032    public SimpleInputPage() {
    3133    }
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/SwingPageRenderer.java

    r17578 r17622  
    160160        cancelButton.setText(org.tp23.antinstaller.Installer.langPack.getString("cancelButton"));// "Cancel");
    161161        nextButton.setText(org.tp23.antinstaller.Installer.langPack.getString("nextButton"));// "Next >>");
     162        nextButton.setVisible( page.isShowNextButton() );
    162163        finishButton.setText(ctx.getInstaller().getFinishButtonText());
    163164        finishButton.setVisible(false);
Note: See TracChangeset for help on using the changeset viewer.