javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallConfirmationView.java
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
    31 import org.eclipse.swt.widgets.Combo;
    31 import org.eclipse.swt.widgets.Combo;
    32 import org.eclipse.swt.widgets.Composite;
    32 import org.eclipse.swt.widgets.Composite;
    33 import org.eclipse.swt.widgets.Button;
    33 import org.eclipse.swt.widgets.Button;
    34 import org.eclipse.swt.widgets.Event;
    34 import org.eclipse.swt.widgets.Event;
    35 import org.eclipse.swt.widgets.Label;
    35 import org.eclipse.swt.widgets.Label;
       
    36 import org.eclipse.swt.widgets.Link;
    36 import org.eclipse.swt.widgets.Listener;
    37 import org.eclipse.swt.widgets.Listener;
    37 import org.eclipse.swt.widgets.Shell;
    38 import org.eclipse.swt.widgets.Shell;
    38 import org.eclipse.swt.widgets.Text;
    39 import org.eclipse.swt.widgets.Text;
    39 
    40 
    40 /**
    41 /**
   104      * This method is called once before view is opened.
   105      * This method is called once before view is opened.
   105      */
   106      */
   106     protected void createView()
   107     protected void createView()
   107     {
   108     {
   108         // Add header.
   109         // Add header.
   109         addHeader(null, iInstallInfo, null);
   110         String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_QUERY);
       
   111         if (iInstallInfo != null)
       
   112         {
       
   113             if (iInstallInfo.getOldVersion() != null)
       
   114             {
       
   115                 title = InstallerUiTexts.get(InstallerUiTexts.UPDATE_QUERY);
       
   116             }
       
   117         }
       
   118         addHeader(title, iInstallInfo, null);
   110 
   119 
   111         GridData gridData = null;
   120         GridData gridData = null;
   112         int horizontalSpan = getColumns();
   121         int horizontalSpan = getColumns();
   113         int labelStyle = SWT.WRAP;
   122         int labelStyle = SWT.WRAP;
   114 
   123 
   116         int[] driveIds = iInstallInfo.getDriveIds();
   125         int[] driveIds = iInstallInfo.getDriveIds();
   117         if (driveIds != null && driveIds.length > 0)
   126         if (driveIds != null && driveIds.length > 0)
   118         {
   127         {
   119             // Add installation drive selector.
   128             // Add installation drive selector.
   120             iDriveSelector = new Combo(getComposite(), SWT.READ_ONLY);
   129             iDriveSelector = new Combo(getComposite(), SWT.READ_ONLY);
   121             setCssId(iDriveSelector, "driveSelector");
       
   122             gridData = new GridData(GridData.FILL_HORIZONTAL);
   130             gridData = new GridData(GridData.FILL_HORIZONTAL);
   123             gridData.horizontalSpan = horizontalSpan;
   131             gridData.horizontalSpan = horizontalSpan;
   124             iDriveSelector.setLayoutData(gridData);
   132             iDriveSelector.setLayoutData(gridData);
   125             int[] driveTypes = iInstallInfo.getDriveTypes();
   133             int[] driveTypes = iInstallInfo.getDriveTypes();
   126             long[] driveFreeSpaces = iInstallInfo.getDriveFreeSpaces();
   134             long[] driveFreeSpaces = iInstallInfo.getDriveFreeSpaces();
   146 
   154 
   147         if (iInstallInfo.getRetainData() != null)
   155         if (iInstallInfo.getRetainData() != null)
   148         {
   156         {
   149             // Add retain user data option.
   157             // Add retain user data option.
   150             iRetainDataButton = new Button(getComposite(), SWT.CHECK);
   158             iRetainDataButton = new Button(getComposite(), SWT.CHECK);
   151             setCssId(iRetainDataButton, "retainDataButton");
       
   152             gridData = new GridData(GridData.FILL_HORIZONTAL);
   159             gridData = new GridData(GridData.FILL_HORIZONTAL);
   153             gridData.horizontalSpan = horizontalSpan;
   160             gridData.horizontalSpan = horizontalSpan;
   154             iRetainDataButton.setLayoutData(gridData);
   161             iRetainDataButton.setLayoutData(gridData);
   155             iRetainDataButton.setSelection
   162             iRetainDataButton.setSelection
   156             (iInstallInfo.getRetainData().booleanValue());
   163             (iInstallInfo.getRetainData().booleanValue());