1 /** |
|
2 * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Symbian Foundation - initial contribution. |
|
11 * Contributors: |
|
12 * Description: |
|
13 * Overview: |
|
14 * Details: |
|
15 * Platforms/Drives/Compatibility: |
|
16 * Assumptions/Requirement/Pre-requisites: |
|
17 * Failures and causes: |
|
18 */ |
|
19 package org.symbian.tools.mtw.internal.deployment; |
|
20 |
|
21 import org.eclipse.jface.wizard.WizardPage; |
|
22 import org.eclipse.swt.SWT; |
|
23 import org.eclipse.swt.widgets.Composite; |
|
24 import org.eclipse.swt.widgets.Text; |
|
25 |
|
26 public class DeploymentSummaryWizardPage extends WizardPage { |
|
27 private StringBuilder buffer = new StringBuilder(1000); |
|
28 private Text log; |
|
29 |
|
30 public DeploymentSummaryWizardPage() { |
|
31 super("deploy"); |
|
32 setTitle("WRT Application Deployment"); |
|
33 setDescription("Please wait while deployment is in progress"); |
|
34 } |
|
35 |
|
36 public void createControl(Composite parent) { |
|
37 log = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.WRAP); |
|
38 setControl(log); |
|
39 } |
|
40 |
|
41 public void log(String line) { |
|
42 synchronized (buffer) { |
|
43 buffer.append(line).append("\n"); |
|
44 } |
|
45 log.getDisplay().asyncExec(new Runnable() { |
|
46 public void run() { |
|
47 synchronized (buffer) { |
|
48 log.setText(buffer.toString()); |
|
49 } |
|
50 } |
|
51 }); |
|
52 } |
|
53 |
|
54 public void clear() { |
|
55 log.setText(""); |
|
56 buffer = new StringBuilder(); |
|
57 } |
|
58 } |
|