trace/traceviewer/com.nokia.traceviewer/src/com/nokia/traceviewer/view/ProcessProgressBarUpdater.java
changeset 11 5b9d4d8641ce
equal deleted inserted replaced
10:ed1c9f64298a 11:5b9d4d8641ce
       
     1 /*
       
     2  * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "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  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  *
       
    16  * Process ProgressBar updater class
       
    17  *
       
    18  */
       
    19 package com.nokia.traceviewer.view;
       
    20 
       
    21 import com.nokia.traceviewer.dialog.ProgressBarDialog;
       
    22 
       
    23 /**
       
    24  * Process ProgressBar Updater
       
    25  */
       
    26 public class ProcessProgressBarUpdater implements Runnable {
       
    27 
       
    28 	/**
       
    29 	 * Progressbar to be closed
       
    30 	 */
       
    31 	private final ProgressBarDialog dialog;
       
    32 
       
    33 	/**
       
    34 	 * Constructor
       
    35 	 * 
       
    36 	 * @param dialog
       
    37 	 */
       
    38 	ProcessProgressBarUpdater(ProgressBarDialog dialog) {
       
    39 		this.dialog = dialog;
       
    40 	}
       
    41 
       
    42 	/*
       
    43 	 * (non-Javadoc)
       
    44 	 * 
       
    45 	 * @see java.lang.Runnable#run()
       
    46 	 */
       
    47 	public void run() {
       
    48 		// Close the progress bar
       
    49 		if (dialog != null && dialog.getShell() != null
       
    50 				&& !dialog.getShell().isDisposed()) {
       
    51 			dialog.close();
       
    52 		}
       
    53 	}
       
    54 }