javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java
changeset 48 e0d6e9bd3ca7
parent 47 f40128debb5d
child 76 4ad59aaee882
equal deleted inserted replaced
47:f40128debb5d 48:e0d6e9bd3ca7
    84         }
    84         }
    85         else
    85         else
    86         {
    86         {
    87             setTitle(iMsg);
    87             setTitle(iMsg);
    88             iLabel = createLabel(iMsg, SWT.WRAP);
    88             iLabel = createLabel(iMsg, SWT.WRAP);
       
    89             setCssId(iLabel, "heading");
    89         }
    90         }
    90 
    91 
    91         iIndeterminate = aIndeterminate;
    92         iIndeterminate = aIndeterminate;
    92         if (iIndeterminate)
    93         if (iIndeterminate)
    93         {
    94         {
   100             (getComposite(), SWT.SMOOTH | SWT.HORIZONTAL);
   101             (getComposite(), SWT.SMOOTH | SWT.HORIZONTAL);
   101             iProgressBar.setMinimum(0);
   102             iProgressBar.setMinimum(0);
   102             iProgressBar.setMaximum(100);
   103             iProgressBar.setMaximum(100);
   103             iProgressBar.setSelection(iValue);
   104             iProgressBar.setSelection(iValue);
   104         }
   105         }
       
   106         setCssId(iProgressBar, "progressBar");
   105         GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
   107         GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
   106         gridData.horizontalSpan = getColumns();
   108         gridData.horizontalSpan = getColumns();
   107         iProgressBar.setLayoutData(gridData);
   109         iProgressBar.setLayoutData(gridData);
   108 
   110 
   109         // After other widgets have been added, add content to
   111         // After other widgets have been added, add content to
   113             addAppInfo(iInstallerUi.getInstallInfo(), false);
   115             addAppInfo(iInstallerUi.getInstallInfo(), false);
   114         }
   116         }
   115 
   117 
   116         // By default add cancel command to all progress bars.
   118         // By default add cancel command to all progress bars.
   117         addCancelCommand();
   119         addCancelCommand();
       
   120 
       
   121         iInstallerUi.loadCss();
   118     }
   122     }
   119 
   123 
   120     /** Update text for this progress bar. */
   124     /** Update text for this progress bar. */
   121     public void setText(String aText)
   125     public void setText(String aText)
   122     {
   126     {
   173                 // and to 1 for one two buttons.
   177                 // and to 1 for one two buttons.
   174                 int horizontalSpan = 2;
   178                 int horizontalSpan = 2;
   175                 GridData gridData = null;
   179                 GridData gridData = null;
   176                 /*
   180                 /*
   177                 iHideCommand = new Button(getCommandComposite(), SWT.PUSH);
   181                 iHideCommand = new Button(getCommandComposite(), SWT.PUSH);
       
   182                 setCssId(iHideCommand, "softKeyButton");
   178                 gridData = new GridData(GridData.FILL_HORIZONTAL);
   183                 gridData = new GridData(GridData.FILL_HORIZONTAL);
   179                 gridData.horizontalSpan = horizontalSpan;
   184                 gridData.horizontalSpan = horizontalSpan;
   180                 iHideCommand.setLayoutData(gridData);
   185                 iHideCommand.setLayoutData(gridData);
   181                 iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE));
   186                 iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE));
   182                 iHideCommand.addSelectionListener(new SelectionListener()
   187                 iHideCommand.addSelectionListener(new SelectionListener()
   192                 });
   197                 });
   193                 addSoftKeyListenerFor(iHideCommand);
   198                 addSoftKeyListenerFor(iHideCommand);
   194                 */
   199                 */
   195 
   200 
   196                 iCancelCommand = new Button(getCommandComposite(), SWT.PUSH);
   201                 iCancelCommand = new Button(getCommandComposite(), SWT.PUSH);
       
   202                 setCssId(iCancelCommand, "softKeyButtonWide");
   197                 gridData = new GridData(GridData.FILL_HORIZONTAL);
   203                 gridData = new GridData(GridData.FILL_HORIZONTAL);
   198                 gridData.horizontalSpan = horizontalSpan;
   204                 gridData.horizontalSpan = horizontalSpan;
   199                 iCancelCommand.setLayoutData(gridData);
   205                 iCancelCommand.setLayoutData(gridData);
   200                 iCancelCommand.setText(
   206                 iCancelCommand.setText(
   201                     InstallerUiTexts.get(InstallerUiTexts.CANCEL));
   207                     InstallerUiTexts.get(InstallerUiTexts.CANCEL));