Changeset 15210 for release-kits/shared


Ignore:
Timestamp:
2008-04-24T13:40:21+12:00 (15 years ago)
Author:
oranfry
Message:

Lots of changes to the installer. Now only look in LanguagePack resource bundle for strings.

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

Legend:

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

    r14982 r15210  
    3535
    3636    private final SwingInstallerContext swingCtx;
    37     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     37    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3838
    3939    public FeedbackListener(SwingInstallerContext swingCtx) {
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/AppRootInput.java

    r14982 r15210  
    3636    extends DirectoryInput {
    3737
    38     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     38    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3939
    4040
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/DirectoryInput.java

    r14982 r15210  
    3434    extends OSSpecific {
    3535
    36     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     36    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3737
    3838
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/page/Page.java

    r14982 r15210  
    4646//   i18n support
    4747    private static ResourceBundle langPack = null;
     48    //private static ResourceBundle otherLangPack = null;
    4849    static{
    4950        try {
    50             langPack = ResourceBundle.getBundle("LanguagePack");
     51            langPack = ResourceBundle.getBundle("resources.LanguagePack");
    5152        } catch (MissingResourceException e) {
    5253            // ignore, signifies no lang packs installed 
     
    7879
    7980    public String getDisplayText() {
    80         if(langPack != null){
    81             return langPack.getString("page." + getName() + ".displayText");
    82         }
    83         return displayText;
     81        if( langPack != null){
     82            return langPack.getString("page." + getName() + ".displayText") + "r";
     83        }
     84        return displayText + "c";
    8485    }
    8586
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/Res.properties

    r14982 r15210  
    1 #org.tp23.antinstaller.renderer.Res
     1#resources.LanguagePack
    22#Wed Nov 10 01:06:42 CET 2004
    33
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/Res_de.properties

    r14982 r15210  
    1 #org.tp23.antinstaller.renderer.Res
     1#resources.LanguagePack
    22#Wed Nov 10 01:06:42 CET 2004
    33
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/Res_es.properties

    r14982 r15210  
    1 #org.tp23.antinstaller.renderer.Res
     1#resources.LanguagePack
    22#Wed Nov 10 01:06:42 CET 2004
    33
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/Res_es_EU.properties

    r14982 r15210  
    1 #org.tp23.antinstaller.renderer.Res
     1#resources.LanguagePack
    22#Wed Nov 10 01:06:42 CET 2004
    33
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/ConditionalFieldRenderer.java

    r14982 r15210  
    3636public class ConditionalFieldRenderer extends SwingOutputFieldRenderer {
    3737   
    38     private ResourceBundleHelper resHelper = new ResourceBundleHelper( "org.tp23.antinstaller.renderer.Res" );
     38    private ResourceBundleHelper resHelper = new ResourceBundleHelper( "resources.LanguagePack" );
    3939    private ConditionalField condField;
    4040    private ArrayList renderers = new ArrayList( );
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/ConfirmPasswordTextInputRenderer.java

    r14982 r15210  
    2020public class ConfirmPasswordTextInputRenderer extends PasswordTextInputRenderer{
    2121   
    22     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     22    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    2323   
    2424    protected String getErrorMessage(){
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/DateInputRenderer.java

    r14982 r15210  
    3333    extends SwingOutputFieldRenderer {
    3434
    35     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     35    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3636   
    3737    protected DateInput inputField;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/DirectoryInputRenderer.java

    r15206 r15210  
    3737    extends SwingOutputFieldRenderer {
    3838
    39     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     39    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    4040
    4141    private static final String EMPTY_STRING = "";
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/FileInputRenderer.java

    r14982 r15210  
    3737    extends SwingOutputFieldRenderer {
    3838
    39     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     39    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    4040
    4141    protected FileInput inputField;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/LargeSelectInputRenderer.java

    r14982 r15210  
    3131    extends SwingOutputFieldRenderer {
    3232
    33     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     33    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3434
    3535    protected LargeSelectInput inputField;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/LicensePageRenderer.java

    r14982 r15210  
    4343    extends SwingPageRenderer {
    4444
    45     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     45    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    4646
    4747    private JTextArea licenseTextArea = new JTextArea();
     
    5959        InputStream licensein = this.getClass().getResourceAsStream(resource);
    6060        if (licensein == null) {
     61            //delete me
     62            System.out.println( "licensein is null" );
    6163            throw new ConfigurationException("License resource '" + resource + "' is missing from installer");
    6264        }
     
    7981        scrollPane.getViewport().add(licenseTextArea);
    8082        scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    81         scrollPane.setBorder(BorderFactory.createCompoundBorder(
    82                         BorderFactory.createEmptyBorder(4, 4, 4, 4),
    83                         BorderFactory.createEtchedBorder()));
     83
     84        scrollPane.setBorder(
     85            BorderFactory.createCompoundBorder(
     86                BorderFactory.createEmptyBorder(4, 4, 4, 4),
     87                BorderFactory.createEtchedBorder()
     88                )
     89            );
    8490        this.add(scrollPane, BorderLayout.CENTER);
    8591
    86         getNextButton().setText( res.getString( "license.next.text" ) );
    87         getNextButton().setIcon(getImage("/resources/icons/ok.png"));
    88         getCancelButton().setText( res.getString( "license.cancel.text" ) );
     92        getNextButton().setText( res.getString( "license.next.text" ) );
     93        getNextButton().setIcon(getImage("/resources/icons/ok.png"));
     94        getCancelButton().setText( res.getString( "license.cancel.text" ) );
    8995
    9096    }
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/PasswordTextInputRenderer.java

    r14982 r15210  
    2828public class PasswordTextInputRenderer extends ValidatedTextInputRenderer{
    2929   
    30     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     30    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3131   
    3232    public PasswordTextInputRenderer() {
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/ProgressPageRenderer.java

    r14982 r15210  
    4747    implements AntOutputRenderer {
    4848
    49     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     49    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5050    private static final int MESSAGE_PANEL_HEIGHT = 30;
    5151
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/SelectInputRenderer.java

    r14982 r15210  
    3333    extends SwingOutputFieldRenderer {
    3434   
    35     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     35    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3636
    3737    protected SelectInput inputField;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/SwingPageRenderer.java

    r15206 r15210  
    4949    extends JPanel {
    5050   
    51     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     51    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5252
    5353    // gui components
     
    135135        titleLayout.setRows(2);
    136136        titleLayout.setVgap(2);
    137         //titlePanel.setMinimumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
    138         //titlePanel.setMaximumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
    139         //titlePanel.setPreferredSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
     137        titlePanel.setMinimumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
     138        titlePanel.setMaximumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
     139        titlePanel.setPreferredSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_PANEL_HEIGHT));
    140140
    141141        titleLabel.setText(page.getDisplayText());
    142142        titleLabel.setFont(titleFont);
    143143        setImage(page.getImageResource());
    144         //imagePanel.setMinimumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
    145         //imagePanel.setMaximumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
    146         //imagePanel.setPreferredSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
     144        imagePanel.setMinimumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
     145        imagePanel.setMaximumSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
     146        imagePanel.setPreferredSize(new Dimension(SizeConstants.PAGE_WIDTH, SizeConstants.TITLE_IMAGE_HEIGHT));
    147147
    148148        // Ctrl Panel
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/swing/ValidatedTextInputRenderer.java

    r14982 r15210  
    3333public class ValidatedTextInputRenderer extends SwingOutputFieldRenderer {
    3434
    35     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     35    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    3636
    3737    protected ValidatedTextInput inputField;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/renderer/text/ConfirmPasswordTextInputRenderer.java

    r14982 r15210  
    55public class ConfirmPasswordTextInputRenderer extends PasswordTextInputRenderer {
    66   
    7     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     7    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    88   
    99    protected String getErrorMessage(){
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/ExecInstall.java

    r14982 r15210  
    4949public class ExecInstall {
    5050
    51     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     51    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5252    public static final String CONFIG_RESOURCE = "/org/tp23/antinstaller/runtime/exe/script.fconfig";
    5353   
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/SwingRunner.java

    r15206 r15210  
    5454public class SwingRunner extends AntRunner implements Runner, PageCompletionListener {
    5555
    56     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     56    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5757
    5858
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/TextRunner.java

    r14982 r15210  
    4747    implements Runner {
    4848   
    49     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     49    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5050
    5151    protected final InstallerContext ctx;
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/exe/AntLauncherFilter.java

    r14982 r15210  
    3838public class AntLauncherFilter implements ExecuteFilter {
    3939
    40     private static final ResourceBundleHelper resHelper = new ResourceBundleHelper("org.tp23.antinstaller.renderer.Res");
     40    private static final ResourceBundleHelper resHelper = new ResourceBundleHelper("resources.LanguagePack");
    4141
    4242
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/exe/LoadConfigFilter.java

    r14982 r15210  
    279279     */
    280280    private OutputField getOutputFieldType(String type, Element field) throws ConfigurationException {
     281
    281282        if (type.equalsIgnoreCase("text")) {
    282283            return new UnvalidatedTextInput();
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/exe/PropertyLoaderFilter.java

    r14982 r15210  
    6060public class PropertyLoaderFilter implements ExecuteFilter {
    6161   
    62     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     62    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    6363   
    6464    public static final String LOAD = "true";
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/selfextract/ProgressIndicator.java

    r14982 r15210  
    5252
    5353    public static final String IMAGE_RESOURCE = "/resources/extract-image.png";
    54     private static final ResourceBundle res = ResourceBundle.getBundle("org.tp23.antinstaller.renderer.Res");
     54    private static final ResourceBundle res = ResourceBundle.getBundle("resources.LanguagePack");
    5555
    5656    private JPanel jPanel1 = new JPanel();
  • release-kits/shared/ant-installer/src_ext/org/tp23/antinstaller/taskdefs/Installer.java

    r14982 r15210  
    335335        }
    336336        catch (Exception ex) {
     337            log("validation failed");
    337338            ex.printStackTrace();
    338339            err();
Note: See TracChangeset for help on using the changeset viewer.