|
From: Matthias K <mat...@us...> - 2006-07-03 22:10:15
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/dialogs In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv29997/src/org/jcommander/ui/filepanel/dialogs Modified Files: CopyProgressDialogComposite.java DetailsDialog.java Log Message: -New CopyProgressDialog. Less important things moved to the details. -A lot of renaming (lots of GridDatas and GridLayouts) Index: DetailsDialog.java =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/dialogs/DetailsDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DetailsDialog.java 30 Apr 2006 13:10:55 -0000 1.2 --- DetailsDialog.java 3 Jul 2006 22:10:11 -0000 1.3 *************** *** 185,189 **** protected Composite createContents(Composite parent) { - // TODO Auto-generated method stub return createDropDownDialogArea(parent); } --- 185,188 ---- Index: CopyProgressDialogComposite.java =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/dialogs/CopyProgressDialogComposite.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CopyProgressDialogComposite.java 17 May 2006 11:19:47 -0000 1.19 --- CopyProgressDialogComposite.java 3 Jul 2006 22:10:11 -0000 1.20 *************** *** 23,27 **** --- 23,30 ---- private Composite composite = null; + private HideableComposite detailsHideableComposite = null; + private Composite detailsComposite = null; private Composite buttonsComposite = null; + private Button detailsButton = null; private Button okButton = null; private Button pauseButton = null; *************** *** 36,39 **** --- 39,43 ---- private Label label2 = null; private Label toLabel = null; + private Composite detailsLeftComposite = null; private Composite speedLimitComposite = null; private Label label4 = null; *************** *** 55,60 **** private Label avgSpeedLabel = null; private Button radioButton2 = null; ! private Label spacer1 = null; ! private Label spacer2 = null; private Composite keepOpenComposite = null; private Button keepOpenCheckBox = null; --- 59,64 ---- private Label avgSpeedLabel = null; private Button radioButton2 = null; ! //private Label spacer1 = null; ! //private Label spacer2 = null; private Composite keepOpenComposite = null; private Button keepOpenCheckBox = null; *************** *** 62,69 **** private Label elapsedTimeLabel = null; private Group autoConfirmationsGroup = null; ! private Label label3 = null; private Button overwriteAskRadio = null; private Button overwriteProceedRadio = null; ! private Button overwirteSkipRadio = null; private Label label6 = null; private Label remainingTimeLabel = null; --- 66,73 ---- private Label elapsedTimeLabel = null; private Group autoConfirmationsGroup = null; ! private Label overwriteLabel = null; private Button overwriteAskRadio = null; private Button overwriteProceedRadio = null; ! private Button overwriteSkipRadio = null; private Label label6 = null; private Label remainingTimeLabel = null; *************** *** 71,74 **** --- 75,92 ---- private Button runInBackgroundButton = null; + private String avgSpeed = ""; + private String elapsedTime = ""; + private boolean overwriteAsk; + private boolean overwriteSkip; + private boolean overwriteProceed; + private String percentDone = ""; + private String remainingTime = ""; + private String sizeDone = ""; + private String totalDirs = ""; + private String totalFiles = ""; + private String totalSize = ""; + private Color percentDoneColor; + + public CopyProgressDialogComposite(Composite parent, int style) { super(parent, style); *************** *** 86,105 **** */ private void createComposite() { ! GridLayout gridLayout5 = new GridLayout(); ! GridData gridData1 = new GridData(); composite = new Composite(this, SWT.NONE); createProgressComposite(); ! createStatsGroup(); ! createComposite1(); ! gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData1.grabExcessHorizontalSpace = true; ! gridData1.grabExcessVerticalSpace = true; ! composite.setLayoutData(gridData1); ! composite.setLayout(gridLayout5); ! createGroup1(); ! gridLayout5.numColumns = 2; ! gridLayout5.marginHeight = 1; ! gridLayout5.marginWidth = 1; } /** --- 104,139 ---- */ private void createComposite() { ! GridLayout compositeLayout = new GridLayout(); ! GridData compositeData = new GridData(); composite = new Composite(this, SWT.NONE); createProgressComposite(); ! detailsHideableComposite = new HideableComposite(composite,SWT.NONE) { ! ! protected Composite createContents(Composite parent) { ! detailsComposite = new Composite(parent, SWT.BORDER); ! GridLayout detailsCompositeLayout = new GridLayout(); ! detailsCompositeLayout.numColumns=2; ! detailsComposite.setLayout(detailsCompositeLayout); ! detailsComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true)); ! createSpeedLimitComposite(); ! createStatsGroup(); ! createComposite1(); ! createGroup1(); ! parent.layout(); ! return detailsComposite; ! } ! ! }; ! detailsHideableComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true)); ! //detailsHideableComposite.appear(); ! compositeData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! compositeData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; ! compositeData.grabExcessHorizontalSpace = true; ! compositeData.grabExcessVerticalSpace = true; ! composite.setLayoutData(compositeData); ! composite.setLayout(compositeLayout); ! compositeLayout.numColumns = 2; ! compositeLayout.marginHeight = 1; ! compositeLayout.marginWidth = 1; } /** *************** *** 108,113 **** */ private void createButtonsComposite() { ! FillLayout fillLayout4 = new FillLayout(); ! GridData gridData3 = new GridData(); buttonsComposite = new Composite(this, SWT.NONE); okButton = new Button(buttonsComposite, SWT.NONE); --- 142,147 ---- */ private void createButtonsComposite() { ! FillLayout buttonsCompositeLayout = new FillLayout(); ! GridData buttonsCompositeData = new GridData(); buttonsComposite = new Composite(this, SWT.NONE); okButton = new Button(buttonsComposite, SWT.NONE); *************** *** 116,125 **** pauseButton = new Button(buttonsComposite, SWT.TOGGLE); abortButton = new Button(buttonsComposite, SWT.NONE); ! gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER; ! gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.END; ! gridData3.grabExcessHorizontalSpace = true; ! buttonsComposite.setLayoutData(gridData3); ! buttonsComposite.setLayout(fillLayout4); ! fillLayout4.spacing = 5; okButton.setText("O&K"); okButton.setEnabled(false); --- 150,160 ---- pauseButton = new Button(buttonsComposite, SWT.TOGGLE); abortButton = new Button(buttonsComposite, SWT.NONE); ! detailsButton = new Button(buttonsComposite, SWT.NONE); ! buttonsCompositeData.horizontalAlignment = org.eclipse.swt.layout.GridData.END; ! buttonsCompositeData.verticalAlignment = org.eclipse.swt.layout.GridData.END; ! buttonsCompositeData.grabExcessHorizontalSpace = true; ! buttonsComposite.setLayoutData(buttonsCompositeData); ! buttonsComposite.setLayout(buttonsCompositeLayout); ! buttonsCompositeLayout.spacing = 5; okButton.setText("O&K"); okButton.setEnabled(false); *************** *** 129,132 **** --- 164,176 ---- abortButton.setBackground(org.eclipse.swt.widgets.Display.getDefault().getSystemColor(org.eclipse.swt.SWT.COLOR_DARK_RED)); abortButton.setEnabled(true); + detailsButton.setText("&Details"); + detailsButton.addSelectionListener(new SelectionAdapter() { + + public void widgetSelected(SelectionEvent e) { + detailsHideableComposite.setVisible(!detailsHideableComposite.isVisible()); + updateDetails(); + } + + }); } /** *************** *** 135,163 **** */ private void createProgressComposite() { ! GridLayout gridLayout1 = new GridLayout(); ! GridData gridData10 = new GridData(); ! GridData gridData9 = new GridData(); ! GridData gridData6 = new GridData(); progressComposite = new Composite(composite, SWT.NONE); - createFromToIntoComposite(); totalProgressBar = new ProgressBar(progressComposite, SWT.NONE); individualProgressBar = new ProgressBar(progressComposite, SWT.NONE); ! createSpeedLimitComposite(); ! gridData6.grabExcessVerticalSpace = false; ! gridData6.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData6.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER; ! gridData6.grabExcessHorizontalSpace = true; ! progressComposite.setLayoutData(gridData6); ! progressComposite.setLayout(gridLayout1); ! gridData9.grabExcessHorizontalSpace = true; ! gridData9.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! totalProgressBar.setLayoutData(gridData9); totalProgressBar.setToolTipText("Total progress"); ! gridData10.grabExcessHorizontalSpace = true; ! gridData10.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! individualProgressBar.setLayoutData(gridData10); individualProgressBar.setToolTipText("Current progress"); ! gridLayout1.marginHeight = 1; ! gridLayout1.marginWidth = 1; } /** --- 179,207 ---- */ private void createProgressComposite() { ! GridLayout progressCompositeLayout = new GridLayout(); ! GridData individualProgressData = new GridData(); ! GridData totalProgressData = new GridData(); ! GridData progressCompositeData = new GridData(); progressComposite = new Composite(composite, SWT.NONE); totalProgressBar = new ProgressBar(progressComposite, SWT.NONE); individualProgressBar = new ProgressBar(progressComposite, SWT.NONE); ! progressCompositeData.grabExcessVerticalSpace = false; ! progressCompositeData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! progressCompositeData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER; ! progressCompositeData.grabExcessHorizontalSpace = true; ! progressCompositeData.horizontalSpan = 2; ! progressComposite.setLayoutData(progressCompositeData); ! progressComposite.setLayout(progressCompositeLayout); ! totalProgressData.grabExcessHorizontalSpace = true; ! totalProgressData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! totalProgressBar.setLayoutData(totalProgressData); totalProgressBar.setToolTipText("Total progress"); ! individualProgressData.grabExcessHorizontalSpace = true; ! individualProgressData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! individualProgressBar.setLayoutData(individualProgressData); individualProgressBar.setToolTipText("Current progress"); ! createFromToIntoComposite(); ! progressCompositeLayout.marginHeight = 1; ! progressCompositeLayout.marginWidth = 1; } /** *************** *** 167,196 **** */ private void createStatsGroup() { ! GridData gridData17 = new GridData(); ! gridData17.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData17.grabExcessHorizontalSpace = true; ! GridData gridData16 = new GridData(); ! gridData16.grabExcessHorizontalSpace = true; ! gridData16.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData gridData8 = new GridData(); ! gridData8.grabExcessHorizontalSpace = true; ! gridData8.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData gridData5 = new GridData(); ! gridData5.grabExcessHorizontalSpace = true; ! gridData5.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData gridData = new GridData(); ! gridData.grabExcessHorizontalSpace = true; ! gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData gridData21 = new GridData(); ! gridData21.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData21.grabExcessHorizontalSpace = true; ! GridData gridData13 = new GridData(); ! gridData13.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData13.widthHint = 70; ! gridData13.grabExcessHorizontalSpace = true; ! GridData gridData4 = new GridData(); ! GridLayout gridLayout17 = new GridLayout(); ! GridData gridData7 = new GridData(); ! statsGroup = new Group(composite, SWT.NONE); label7 = new Label(statsGroup, SWT.NONE); percentDoneLabel = new Label(statsGroup, SWT.RIGHT); --- 211,240 ---- */ private void createStatsGroup() { ! GridData remainingTimeLabelData = new GridData(); ! remainingTimeLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! remainingTimeLabelData.grabExcessHorizontalSpace = true; ! GridData avgSpeedLabelData = new GridData(); ! avgSpeedLabelData.grabExcessHorizontalSpace = true; ! avgSpeedLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData totalDirsLabelData = new GridData(); ! totalDirsLabelData.grabExcessHorizontalSpace = true; ! totalDirsLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData totalFilesLabelData = new GridData(); ! totalFilesLabelData.grabExcessHorizontalSpace = true; ! totalFilesLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData sizeDoneLabelData = new GridData(); ! sizeDoneLabelData.grabExcessHorizontalSpace = true; ! sizeDoneLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! GridData elapsedTimeLabelData = new GridData(); ! elapsedTimeLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! elapsedTimeLabelData.grabExcessHorizontalSpace = true; ! GridData percentDoneLabelData = new GridData(); ! percentDoneLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! percentDoneLabelData.widthHint = 70; ! percentDoneLabelData.grabExcessHorizontalSpace = true; ! GridData totalSizeLabelData = new GridData(); ! GridLayout statsGroupLayout = new GridLayout(); ! GridData statsGroupData = new GridData(); ! statsGroup = new Group(detailsComposite, SWT.NONE); label7 = new Label(statsGroup, SWT.NONE); percentDoneLabel = new Label(statsGroup, SWT.RIGHT); *************** *** 202,206 **** totalSizeLabel = new Label(statsGroup, SWT.RIGHT); totalSizeLabel.setText(""); ! totalSizeLabel.setLayoutData(gridData4); label11 = new Label(statsGroup, SWT.NONE); --- 246,250 ---- totalSizeLabel = new Label(statsGroup, SWT.RIGHT); totalSizeLabel.setText(""); ! totalSizeLabel.setLayoutData(totalSizeLabelData); label11 = new Label(statsGroup, SWT.NONE); *************** *** 210,251 **** label15 = new Label(statsGroup, SWT.NONE); avgSpeedLabel = new Label(statsGroup, SWT.RIGHT); ! gridData7.grabExcessVerticalSpace = true; ! gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.END; ! gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; ! statsGroup.setLayoutData(gridData7); statsGroup.setText("Stats"); ! statsGroup.setLayout(gridLayout17); label1 = new Label(statsGroup, SWT.NONE); label1.setText("Elapsed Time"); ! gridLayout17.numColumns = 2; elapsedTimeLabel = new Label(statsGroup, SWT.RIGHT); elapsedTimeLabel.setText(""); ! elapsedTimeLabel.setLayoutData(gridData21); label6 = new Label(statsGroup, SWT.NONE); label6.setText("Remaining Time"); remainingTimeLabel = new Label(statsGroup, SWT.RIGHT); remainingTimeLabel.setText(""); ! remainingTimeLabel.setLayoutData(gridData17); label7.setText("Progress"); label7.setFont(WindowUtils.changeFontStyle(getDisplay(), label7.getFont(), SWT.BOLD)); percentDoneLabel.setText(""); percentDoneLabel.setFont(WindowUtils.changeFontStyle(getDisplay(), percentDoneLabel.getFont(), SWT.BOLD)); ! percentDoneLabel.setLayoutData(gridData13); label9.setText("Size Done"); sizeDoneLabel.setText(""); ! sizeDoneLabel.setLayoutData(gridData); label11.setText("Total Files"); totalFilesLabel.setText(""); ! totalFilesLabel.setLayoutData(gridData5); label13.setText("Total Dirs"); totalDirsLabel.setText(""); ! totalDirsLabel.setLayoutData(gridData8); label15.setText("Avg Speed"); avgSpeedLabel.setText(""); ! avgSpeedLabel.setLayoutData(gridData16); ! gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData4.grabExcessHorizontalSpace = true; ! gridData4.grabExcessVerticalSpace = false; } /** --- 254,295 ---- label15 = new Label(statsGroup, SWT.NONE); avgSpeedLabel = new Label(statsGroup, SWT.RIGHT); ! statsGroupData.grabExcessVerticalSpace = true; ! statsGroupData.horizontalAlignment = org.eclipse.swt.layout.GridData.END; ! statsGroupData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; ! statsGroup.setLayoutData(statsGroupData); statsGroup.setText("Stats"); ! statsGroup.setLayout(statsGroupLayout); label1 = new Label(statsGroup, SWT.NONE); label1.setText("Elapsed Time"); ! statsGroupLayout.numColumns = 2; elapsedTimeLabel = new Label(statsGroup, SWT.RIGHT); elapsedTimeLabel.setText(""); ! elapsedTimeLabel.setLayoutData(elapsedTimeLabelData); label6 = new Label(statsGroup, SWT.NONE); label6.setText("Remaining Time"); remainingTimeLabel = new Label(statsGroup, SWT.RIGHT); remainingTimeLabel.setText(""); ! remainingTimeLabel.setLayoutData(remainingTimeLabelData); label7.setText("Progress"); label7.setFont(WindowUtils.changeFontStyle(getDisplay(), label7.getFont(), SWT.BOLD)); percentDoneLabel.setText(""); percentDoneLabel.setFont(WindowUtils.changeFontStyle(getDisplay(), percentDoneLabel.getFont(), SWT.BOLD)); ! percentDoneLabel.setLayoutData(percentDoneLabelData); label9.setText("Size Done"); sizeDoneLabel.setText(""); ! sizeDoneLabel.setLayoutData(sizeDoneLabelData); label11.setText("Total Files"); totalFilesLabel.setText(""); ! totalFilesLabel.setLayoutData(totalFilesLabelData); label13.setText("Total Dirs"); totalDirsLabel.setText(""); ! totalDirsLabel.setLayoutData(totalDirsLabelData); label15.setText("Avg Speed"); avgSpeedLabel.setText(""); ! avgSpeedLabel.setLayoutData(avgSpeedLabelData); ! totalSizeLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! totalSizeLabelData.grabExcessHorizontalSpace = true; ! totalSizeLabelData.grabExcessVerticalSpace = false; } /** *************** *** 254,261 **** */ private void createFromToIntoComposite() { ! GridData gridData31 = new GridData(); ! GridData gridData2 = new GridData(); ! GridData gridData11 = new GridData(); ! GridLayout gridLayout11 = new GridLayout(); fromToInfoComposite = new Composite(progressComposite, SWT.NONE); label = new Label(fromToInfoComposite, SWT.NONE); --- 298,305 ---- */ private void createFromToIntoComposite() { ! GridData toLabelData = new GridData(); ! GridData fromLabelData = new GridData(); ! GridData fromToInfoCompositeData = new GridData(); ! GridLayout fromToInfoCompositeLayout = new GridLayout(); fromToInfoComposite = new Composite(progressComposite, SWT.NONE); label = new Label(fromToInfoComposite, SWT.NONE); *************** *** 263,283 **** label2 = new Label(fromToInfoComposite, SWT.NONE); toLabel = new Label(fromToInfoComposite, SWT.NONE); ! fromToInfoComposite.setLayout(gridLayout11); ! fromToInfoComposite.setLayoutData(gridData11); label.setText("From:"); label.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN)); fromLabel.setText(""); ! fromLabel.setLayoutData(gridData2); label2.setText("To:"); label2.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED)); toLabel.setText(""); ! toLabel.setLayoutData(gridData31); ! gridLayout11.numColumns = 2; ! gridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData11.grabExcessHorizontalSpace = true; ! gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData2.grabExcessHorizontalSpace = true; ! gridData31.grabExcessHorizontalSpace = true; ! gridData31.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; } /** --- 307,327 ---- label2 = new Label(fromToInfoComposite, SWT.NONE); toLabel = new Label(fromToInfoComposite, SWT.NONE); ! fromToInfoComposite.setLayout(fromToInfoCompositeLayout); ! fromToInfoComposite.setLayoutData(fromToInfoCompositeData); label.setText("From:"); label.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN)); fromLabel.setText(""); ! fromLabel.setLayoutData(fromLabelData); label2.setText("To:"); label2.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED)); toLabel.setText(""); ! toLabel.setLayoutData(toLabelData); ! fromToInfoCompositeLayout.numColumns = 2; ! fromToInfoCompositeData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! fromToInfoCompositeData.grabExcessHorizontalSpace = true; ! fromLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! fromLabelData.grabExcessHorizontalSpace = true; ! toLabelData.grabExcessHorizontalSpace = true; ! toLabelData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; } /** *************** *** 289,300 **** */ private void createSpeedLimitComposite() { GridData gridData18 = new GridData(); GridLayout gridLayout16 = new GridLayout(); GridData gridData15 = new GridData(); ! speedLimitComposite = new Composite(progressComposite, SWT.NONE); label4 = new Label(speedLimitComposite, SWT.NONE); scale = new Scale(speedLimitComposite, SWT.NONE); ! spacer1 = new Label(speedLimitComposite, SWT.NONE); ! spacer2 = new Label(speedLimitComposite, SWT.NONE); radioButton = new Button(speedLimitComposite, SWT.RADIO); radioButton1 = new Button(speedLimitComposite, SWT.RADIO); --- 333,352 ---- */ private void createSpeedLimitComposite() { + detailsLeftComposite = new Composite(detailsComposite, SWT.NONE); + GridLayout detailsLeftCompositeLayout = new GridLayout(); + detailsLeftComposite.setLayout(detailsLeftCompositeLayout); + detailsLeftComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true)); GridData gridData18 = new GridData(); GridLayout gridLayout16 = new GridLayout(); GridData gridData15 = new GridData(); ! GridData scaleData = new GridData(); ! scaleData.horizontalSpan=3; ! scaleData.horizontalAlignment=SWT.FILL; ! scaleData.grabExcessHorizontalSpace = true; ! speedLimitComposite = new Composite(detailsLeftComposite, SWT.NONE); label4 = new Label(speedLimitComposite, SWT.NONE); scale = new Scale(speedLimitComposite, SWT.NONE); ! //spacer1 = new Label(speedLimitComposite, SWT.NONE); ! //spacer2 = new Label(speedLimitComposite, SWT.NONE); radioButton = new Button(speedLimitComposite, SWT.RADIO); radioButton1 = new Button(speedLimitComposite, SWT.RADIO); *************** *** 317,321 **** scale.setPageIncrement(1); scale.setEnabled(false); ! gridData18.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData15.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData15.grabExcessHorizontalSpace = true; --- 369,374 ---- scale.setPageIncrement(1); scale.setEnabled(false); ! scale.setLayoutData(scaleData); ! gridData18.horizontalAlignment = SWT.END; gridData15.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData15.grabExcessHorizontalSpace = true; *************** *** 323,328 **** gridLayout16.horizontalSpacing = 1; gridLayout16.verticalSpacing = 1; ! spacer1.setText(""); ! spacer2.setText(""); } public Button getOkButton() { --- 376,381 ---- gridLayout16.horizontalSpacing = 1; gridLayout16.verticalSpacing = 1; ! //spacer1.setText(""); ! //spacer2.setText(""); } public Button getOkButton() { *************** *** 347,351 **** return toLabel; } ! public Label getTotalSizeLabel() { return totalSizeLabel; } --- 400,404 ---- return toLabel; } ! /*public Label getTotalSizeLabel() { return totalSizeLabel; } *************** *** 364,368 **** public Label getAvgSpeedLabel() { return avgSpeedLabel; ! } /** --- 417,421 ---- public Label getAvgSpeedLabel() { return avgSpeedLabel; ! }*/ /** *************** *** 372,376 **** private void createComposite1() { GridData gridData12 = new GridData(); ! keepOpenComposite = new Composite(composite, SWT.NONE); keepOpenCheckBox = new Button(keepOpenComposite, SWT.CHECK); keepOpenComposite.setLayout(new GridLayout()); --- 425,429 ---- private void createComposite1() { GridData gridData12 = new GridData(); ! keepOpenComposite = new Composite(detailsLeftComposite, SWT.NONE); keepOpenCheckBox = new Button(keepOpenComposite, SWT.CHECK); keepOpenComposite.setLayout(new GridLayout()); *************** *** 396,405 **** }); } ! public Button getKeepOpenCheckBox() { ! return keepOpenCheckBox; ! } ! public Label getElapsedTimeLabel() { ! return elapsedTimeLabel; ! } /** * This method initializes group1 --- 449,458 ---- }); } ! //public Button getKeepOpenCheckBox() { ! // return keepOpenCheckBox; ! //} ! //public Label getElapsedTimeLabel() { ! // return elapsedTimeLabel; ! //} /** * This method initializes group1 *************** *** 407,422 **** */ private void createGroup1() { ! GridLayout gridLayout2 = new GridLayout(); ! gridLayout2.numColumns = 4; ! GridData gridData14 = new GridData(); ! gridData14.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! gridData14.grabExcessHorizontalSpace = true; ! gridData14.horizontalSpan = 2; ! autoConfirmationsGroup = new Group(composite, SWT.NONE); ! autoConfirmationsGroup.setLayoutData(gridData14); ! autoConfirmationsGroup.setLayout(gridLayout2); autoConfirmationsGroup.setText("Auto confirmations"); ! label3 = new Label(autoConfirmationsGroup, SWT.NONE); ! label3.setText("Overwrite"); overwriteAskRadio = new Button(autoConfirmationsGroup, SWT.RADIO); overwriteAskRadio.setText("&Ask"); --- 460,475 ---- */ private void createGroup1() { ! GridLayout autoConfirmationsGroupLayout = new GridLayout(); ! autoConfirmationsGroupLayout.numColumns = 4; ! GridData autoConfirmationsGroupData = new GridData(); ! autoConfirmationsGroupData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; ! autoConfirmationsGroupData.grabExcessHorizontalSpace = true; ! autoConfirmationsGroupData.horizontalSpan = 1; ! autoConfirmationsGroup = new Group(detailsLeftComposite, SWT.NONE); ! autoConfirmationsGroup.setLayoutData(autoConfirmationsGroupData); ! autoConfirmationsGroup.setLayout(autoConfirmationsGroupLayout); autoConfirmationsGroup.setText("Auto confirmations"); ! overwriteLabel = new Label(autoConfirmationsGroup, SWT.NONE); ! overwriteLabel.setText("Overwrite"); overwriteAskRadio = new Button(autoConfirmationsGroup, SWT.RADIO); overwriteAskRadio.setText("&Ask"); *************** *** 424,432 **** overwriteProceedRadio = new Button(autoConfirmationsGroup, SWT.RADIO); overwriteProceedRadio.setText("&Proceed"); ! overwirteSkipRadio = new Button(autoConfirmationsGroup, SWT.RADIO); ! overwirteSkipRadio.setText("&Skip"); } ! public Button getOverwirteSkipRadio() { ! return overwirteSkipRadio; } public Button getOverwriteAskRadio() { --- 477,506 ---- overwriteProceedRadio = new Button(autoConfirmationsGroup, SWT.RADIO); overwriteProceedRadio.setText("&Proceed"); ! overwriteSkipRadio = new Button(autoConfirmationsGroup, SWT.RADIO); ! overwriteSkipRadio.setText("&Skip"); } ! ! protected void updateDetails(){ ! if (detailsHideableComposite.isVisible()) { ! avgSpeedLabel.setText(avgSpeed); ! elapsedTimeLabel.setText(elapsedTime); ! IPreferenceStore store = FilePanelPlugin.getDefault().getPreferenceStore(); ! boolean keepOpen = store.getBoolean(FilePanelPlugin.KEEP_OPEN_AFTER_FINISH_KEY); ! keepOpenCheckBox.setSelection(keepOpen); ! overwriteAskRadio.setSelection(overwriteAsk); ! overwriteProceedRadio.setSelection(overwriteProceed); ! overwriteSkipRadio.setSelection(overwriteSkip); ! percentDoneLabel.setText(percentDone); ! percentDoneLabel.setBackground(percentDoneColor); ! remainingTimeLabel.setText(remainingTime); ! sizeDoneLabel.setText(sizeDone); ! totalDirsLabel.setText(totalDirs); ! totalFilesLabel.setText(totalFiles); ! totalSizeLabel.setText(totalSize); ! } ! } ! ! /* public Button getOverwriteSkipRadio() { ! return overwriteSkipRadio; } public Button getOverwriteAskRadio() { *************** *** 438,445 **** public Label getRemainingTimeLabel() { return remainingTimeLabel; ! } public Button getRunInBackgroundButton() { return runInBackgroundButton; } } // @jve:decl-index=0:visual-constraint="10,10" --- 512,613 ---- public Label getRemainingTimeLabel() { return remainingTimeLabel; ! }*/ public Button getRunInBackgroundButton() { return runInBackgroundButton; } + public String getAvgSpeed() { + return avgSpeed; + } + public void setAvgSpeed(String avgSpeed) { + this.avgSpeed = avgSpeed; + updateDetails(); + } + public String getElapsedTime() { + return elapsedTime; + } + public void setElapsedTime(String elapsedTime) { + this.elapsedTime = elapsedTime; + updateDetails(); + } + public boolean isKeepOpen() { + IPreferenceStore store = FilePanelPlugin.getDefault().getPreferenceStore(); + boolean keepOpen = store.getBoolean(FilePanelPlugin.KEEP_OPEN_AFTER_FINISH_KEY); + return keepOpen; + } + public void setKeepOpen(boolean keepOpen) { + IPreferenceStore store = FilePanelPlugin.getDefault().getPreferenceStore(); + store.setValue(FilePanelPlugin.KEEP_OPEN_AFTER_FINISH_KEY,keepOpen); + updateDetails(); + } + public boolean isOverwriteAsk() { + return overwriteAsk; + } + public void setOverwriteAsk(boolean overwriteAsk) { + this.overwriteAsk = overwriteAsk; + updateDetails(); + } + public boolean isOverwriteProceed() { + return overwriteProceed; + } + public void setOverwriteProceed(boolean overwriteProceed) { + this.overwriteProceed = overwriteProceed; + updateDetails(); + } + public boolean isOverwriteSkip() { + return overwriteSkip; + } + public void setOverwriteSkip(boolean overwriteSkip) { + this.overwriteSkip = overwriteSkip; + updateDetails(); + } + public String getPercentDone() { + return percentDone; + } + public void setPercentDone(String percentDone) { + this.percentDone = percentDone; + updateDetails(); + } + public String getRemainingTime() { + return remainingTime; + } + public void setRemainingTime(String remainingTime) { + this.remainingTime = remainingTime; + updateDetails(); + } + public String getSizeDone() { + return sizeDone; + } + public void setSizeDone(String sizeDone) { + this.sizeDone = sizeDone; + updateDetails(); + } + public String getTotalDirs() { + return totalDirs; + } + public void setTotalDirs(String totalDirs) { + this.totalDirs = totalDirs; + updateDetails(); + } + public String getTotalFiles() { + return totalFiles; + } + public void setTotalFiles(String totalFiles) { + this.totalFiles = totalFiles; + updateDetails(); + } + public String getTotalSize() { + return totalSize; + } + public void setTotalSize(String totalSize) { + this.totalSize = totalSize; + updateDetails(); + } + public Color getPercentDoneColor() { + return percentDoneColor; + } + public void setPercentDoneColor(Color percentDoneColor) { + this.percentDoneColor = percentDoneColor; + updateDetails(); + } } // @jve:decl-index=0:visual-constraint="10,10" |