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