javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/RuntimeConfirmationView.java
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
    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 1:
    61         case 2: setCommands(answerOptions[0], answerOptions[1]); break;
    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;
       
    69         default: setCommands(null, null); break;
    62         default: setCommands(null, null); break;
    70         }
    63         }
    71 
       
    72     }
    64     }
    73 
    65 
    74     /**
    66     /**
    75      * This method is called once before view is opened.
    67      * This method is called once before view is opened.
    76      */
    68      */
    77     protected void createView()
    69     protected void createView()
    78     {
    70     {
    79         // Add header.
    71         // Add title.
    80         addHeader(null, iInstallerUi.getInstallInfo(), null);
    72         if (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         }
    81 
    85 
    82         GridData gridData = null;
    86         GridData gridData = null;
    83         int horizontalSpan = getColumns();
    87         int horizontalSpan = getColumns();
    84         int labelStyle = SWT.WRAP;
    88         int labelStyle = SWT.WRAP;
       
    89 
       
    90         // Begin widgets creation.
    85 
    91 
    86         // Add question label.
    92         // Add question label.
    87         Label errorLabel = createLabel(
    93         Label errorLabel = createLabel(
    88             iConfirmData.getQuestion(), horizontalSpan, labelStyle);
    94             iConfirmData.getQuestion(), horizontalSpan, labelStyle);
    89 
    95 
   124             iParent.setDefaultButton(
   130             iParent.setDefaultButton(
   125                 iAnswerButtons[iConfirmData.getAnswerSuggestion()]);
   131                 iAnswerButtons[iConfirmData.getAnswerSuggestion()]);
   126             iAnswerButtons[iConfirmData.getAnswerSuggestion()].setFocus();
   132             iAnswerButtons[iConfirmData.getAnswerSuggestion()].setFocus();
   127         }
   133         }
   128 
   134 
   129         // After other widgets have been added, add content to
   135         // End of widgets creation.
   130         // application info Composite.
       
   131         addAppInfo(iInstallerUi.getInstallInfo(), false);
       
   132     }
   136     }
   133 
   137 
   134     /**
   138     /**
   135      * This method is called when user answers to the dialog.
   139      * This method is called when user answers to the dialog.
   136      */
   140      */