From d14399a8343b60b5747bfdb0b96df1d26cc958ad Mon Sep 17 00:00:00 2001 From: Robert Greene Date: Sun, 2 Mar 2003 23:11:23 +0000 Subject: [PATCH] Now enables/disables the address component as appropriate. --- .../ui/swt/ImportSelectFilesWizardPane.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/com/webcodepro/applecommander/ui/swt/ImportSelectFilesWizardPane.java b/src/com/webcodepro/applecommander/ui/swt/ImportSelectFilesWizardPane.java index 318b321..7a89ed8 100644 --- a/src/com/webcodepro/applecommander/ui/swt/ImportSelectFilesWizardPane.java +++ b/src/com/webcodepro/applecommander/ui/swt/ImportSelectFilesWizardPane.java @@ -242,6 +242,20 @@ public class ImportSelectFilesWizardPane extends WizardPane { layoutData = new GridData(); layoutData.widthHint = 75; addressText.setLayoutData(layoutData); + if (spec.hasFiletype()) { + addressText.setEnabled( + wizard.getDisk().needsAddress(spec.getFiletype())); + } + + // Enable/disable the address component: + filetypes.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + String filetype = filetypes.getItem( + filetypes.getSelectionIndex()); + addressText.setEnabled( + wizard.getDisk().needsAddress(filetype)); + } + }); // Bottom row of buttons layoutData = new GridData();