javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/RuntimeConfirmationView.java
changeset 48 e0d6e9bd3ca7
parent 23 98ccebc37403
child 72 1f0034e370aa
child 83 26b2b12093af
equal deleted inserted replaced
47:f40128debb5d 48:e0d6e9bd3ca7
    55         iConfirmData = aConfirmData;
    55         iConfirmData = aConfirmData;
    56         setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED));
    56         setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED));
    57         String[] answerOptions = iConfirmData.getAnswerOptions();
    57         String[] answerOptions = iConfirmData.getAnswerOptions();
    58         switch (answerOptions.length)
    58         switch (answerOptions.length)
    59         {
    59         {
    60         case 1: setCommands(answerOptions[0], null); break;
    60         //case 1: setCommands(answerOptions[0], null); break;
    61         case 2: setCommands(answerOptions[0], answerOptions[1]); break;
    61         case 1:
       
    62             setCommands(InstallerUiTexts.get(InstallerUiTexts.OK), null);
       
    63             break;
       
    64         //case 2: setCommands(answerOptions[0], answerOptions[1]); break;
       
    65         case 2:
       
    66             setCommands(InstallerUiTexts.get(InstallerUiTexts.OK),
       
    67                         InstallerUiTexts.get(InstallerUiTexts.CANCEL));
       
    68             break;
    62         default: setCommands(null, null); break;
    69         default: setCommands(null, null); break;
    63         }
    70         }
       
    71 
    64     }
    72     }
    65 
    73 
    66     /**
    74     /**
    67      * This method is called once before view is opened.
    75      * This method is called once before view is opened.
    68      */
    76      */
    69     protected void createView()
    77     protected void createView()
    70     {
    78     {
    71         // Add title.
    79         // Add header.
    72         if (iInstallerUi.getInstallInfo() != null)
    80         addHeader(null, iInstallerUi.getInstallInfo(), null);
    73         {
       
    74             Label titleLabel = createLabel(iAppName, getColumns() - 1, SWT.WRAP);
       
    75             titleLabel.setFont(iInstallerUi.getBoldFont());
       
    76             // Add security icon.
       
    77             iCertificates = iInstallerUi.getInstallInfo().getCertificates();
       
    78             createSecurityButton();
       
    79         }
       
    80         else
       
    81         {
       
    82             Label titleLabel = createLabel(iAppName, getColumns(), SWT.WRAP);
       
    83             titleLabel.setFont(iInstallerUi.getBoldFont());
       
    84         }
       
    85 
    81 
    86         GridData gridData = null;
    82         GridData gridData = null;
    87         int horizontalSpan = getColumns();
    83         int horizontalSpan = getColumns();
    88         int labelStyle = SWT.WRAP;
    84         int labelStyle = SWT.WRAP;
    89 
       
    90         // Begin widgets creation.
       
    91 
    85 
    92         // Add question label.
    86         // Add question label.
    93         Label errorLabel = createLabel(
    87         Label errorLabel = createLabel(
    94             iConfirmData.getQuestion(), horizontalSpan, labelStyle);
    88             iConfirmData.getQuestion(), horizontalSpan, labelStyle);
    95 
    89 
   130             iParent.setDefaultButton(
   124             iParent.setDefaultButton(
   131                 iAnswerButtons[iConfirmData.getAnswerSuggestion()]);
   125                 iAnswerButtons[iConfirmData.getAnswerSuggestion()]);
   132             iAnswerButtons[iConfirmData.getAnswerSuggestion()].setFocus();
   126             iAnswerButtons[iConfirmData.getAnswerSuggestion()].setFocus();
   133         }
   127         }
   134 
   128 
   135         // End of widgets creation.
   129         // After other widgets have been added, add content to
       
   130         // application info Composite.
       
   131         addAppInfo(iInstallerUi.getInstallInfo(), false);
   136     }
   132     }
   137 
   133 
   138     /**
   134     /**
   139      * This method is called when user answers to the dialog.
   135      * This method is called when user answers to the dialog.
   140      */
   136      */