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 { |
167 // UI updates must be executed in UI thread. |
171 // UI updates must be executed in UI thread. |
168 getDisplay().syncExec(new Runnable() |
172 getDisplay().syncExec(new Runnable() |
169 { |
173 { |
170 public void run() |
174 public void run() |
171 { |
175 { |
|
176 // Set horizontalSpan to 2 for one button, |
|
177 // and to 1 for one two buttons. |
|
178 int horizontalSpan = 2; |
|
179 GridData gridData = null; |
|
180 /* |
172 iHideCommand = new Button(getCommandComposite(), SWT.PUSH); |
181 iHideCommand = new Button(getCommandComposite(), SWT.PUSH); |
173 GridData gridData = new GridData(GridData.FILL_HORIZONTAL); |
182 setCssId(iHideCommand, "softKeyButton"); |
174 gridData.horizontalSpan = 1; |
183 gridData = new GridData(GridData.FILL_HORIZONTAL); |
|
184 gridData.horizontalSpan = horizontalSpan; |
175 iHideCommand.setLayoutData(gridData); |
185 iHideCommand.setLayoutData(gridData); |
176 iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE)); |
186 iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE)); |
177 iHideCommand.addSelectionListener |
187 iHideCommand.addSelectionListener(new SelectionListener() |
178 (new SelectionListener() |
|
179 { |
188 { |
180 public void widgetDefaultSelected(SelectionEvent aEvent) |
189 public void widgetDefaultSelected(SelectionEvent aEvent) |
181 { |
190 { |
182 widgetSelected(aEvent); |
191 widgetSelected(aEvent); |
183 } |
192 } |
185 { |
194 { |
186 confirmHide(); |
195 confirmHide(); |
187 } |
196 } |
188 }); |
197 }); |
189 addSoftKeyListenerFor(iHideCommand); |
198 addSoftKeyListenerFor(iHideCommand); |
|
199 */ |
190 |
200 |
191 iCancelCommand = new Button(getCommandComposite(), SWT.PUSH); |
201 iCancelCommand = new Button(getCommandComposite(), SWT.PUSH); |
|
202 setCssId(iCancelCommand, "softKeyButtonWide"); |
192 gridData = new GridData(GridData.FILL_HORIZONTAL); |
203 gridData = new GridData(GridData.FILL_HORIZONTAL); |
193 gridData.horizontalSpan = 1; |
204 gridData.horizontalSpan = horizontalSpan; |
194 iCancelCommand.setLayoutData(gridData); |
205 iCancelCommand.setLayoutData(gridData); |
195 iCancelCommand.setText( |
206 iCancelCommand.setText( |
196 InstallerUiTexts.get(InstallerUiTexts.CANCEL)); |
207 InstallerUiTexts.get(InstallerUiTexts.CANCEL)); |
197 iCancelCommand.addSelectionListener |
208 iCancelCommand.addSelectionListener(new SelectionListener() |
198 (new SelectionListener() |
|
199 { |
209 { |
200 public void widgetDefaultSelected(SelectionEvent aEvent) |
210 public void widgetDefaultSelected(SelectionEvent aEvent) |
201 { |
211 { |
202 widgetSelected(aEvent); |
212 widgetSelected(aEvent); |
203 } |
213 } |