import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
import org.tizen.dynamicanalyzer.widgets.progress.Progress;
public class ProgressDialog {
- public static final int PROGRESS_STYLE_CANCEL = 0; // default
- public static final int PROGRESS_STYLE_WARNING = 1;
+ public static final int PROGRESS_STYLE_DEFAULT = 0;// default
+ public static final int PROGRESS_STYLE_CANCEL = 1;
+ public static final int PROGRESS_STYLE_WARNING = 2;
public static final int DIALOG_TYPE_SMALL = 0; // default, 41 letters in 1 line (max 3 line)
public static final int DIALOG_TYPE_MIDDLE = 1; // 41 letters in 1 line (max 6 line)
public static final int DIALOG_TYPE_LARGE = 2; // 41 letters in 1 line (max 10 line)
- private int progressStyle = PROGRESS_STYLE_CANCEL;
+ private int progressStyle = PROGRESS_STYLE_DEFAULT;
private int dialogType = DIALOG_TYPE_SMALL;
private Shell parent = null;
public void open() {
switch (progressStyle) {
+ case PROGRESS_STYLE_DEFAULT:
case PROGRESS_STYLE_CANCEL:
// create progress dialog
createProgress();
cancelData.height = 22;
// cancel button
- cancelButton = createButton(progressComp, "Cancel", cancelData);
- cancelButton.setLayoutData(cancelData);
- if (cancelButtonListener != null) {
- cancelButton.addClickListener(cancelButtonListener);
+ if(progressStyle == PROGRESS_STYLE_CANCEL) {
+ cancelButton = createButton(progressComp, "Cancel", cancelData);
+ cancelButton.setLayoutData(cancelData);
+ if (cancelButtonListener != null) {
+ cancelButton.addClickListener(cancelButtonListener);
+ }
}
+
}
public void createWarningProgress() {