Add Business BASIC viewer support

This commit is contained in:
2008-12-16 05:27:17 +00:00
parent ec5c2b84b7
commit 98b198c1cc
4 changed files with 25 additions and 2 deletions

View File

@ -38,6 +38,7 @@ VeiwAsGraphicsMenuItem=Graphics
ExportAsRawDiskDataMenuItem=Raw disk data...
ExportAsApplesoftBasicMenuItem=Applesoft Basic...
ExportAsIntegerBasicMenuItem=Integer Basic...
ExportAsBusinessBASICMenuItem=Apple /// Business Basic...
ExportAsAsciiTextMenuItem=ASCII Text...
ExportAsFormattedAssemblyMenuItem=Formatted Assembly...
ExportAsPascalTextMenuItem=Pascal Text...
@ -148,6 +149,7 @@ ExportFileAsFormattedAssemblyTextFile=Formatted Assembly text file
ExportFileAsPascalTextFile=Pascal text file
ExportFileAsApplesoftBasicFile=Applesoft BASIC file
ExportFileAsIntegerBasicFile=Integer BASIC file
ExportFileAsBusinessBASICFile=Business BASIC file
ExportFileAsAppleworksWordProcessorFile=AppleWorks Word Processor file
ExportFileAsAppleworksDatabaseFile=AppleWorks Data Base file
ExportFileAsAppleworksSpreadsheetFile=AppleWorks Spread Sheet file
@ -282,6 +284,8 @@ SwingAppleCommander.MenuFileQuit=Exit
FileViewerWindow.Title=AppleCommander File View - {0}
FileViewerWindow.ApplesoftButton=Applesoft
FileViewerWindow.ApplesoftTooltip=Displays file as an Applesoft BASIC program (F2)
FileViewerWindow.BusinessBASICButton=Business BASIC
FileViewerWindow.BusinessBASICTooltip=Displays file as an Apple /// Business BASIC program (F2)
FileViewerWindow.DatabaseButton=Database
FileViewerWindow.DatabaseTooltip=Displays file as a database file (F2)
FileViewerWindow.SpreadsheetButton=Spreadsheet

View File

@ -82,6 +82,7 @@ import com.webcodepro.applecommander.storage.filters.AppleWorksWordProcessorFile
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
import com.webcodepro.applecommander.storage.filters.AssemblySourceFileFilter;
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
import com.webcodepro.applecommander.storage.filters.BusinessBASICFileFilter;
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
import com.webcodepro.applecommander.storage.filters.PascalTextFileFilter;
@ -497,6 +498,15 @@ public class DiskExplorerTab {
}
});
item = new MenuItem(menu, SWT.NONE);
item.setText(textBundle.get("ExportAsBusinessBASICMenuItem")); //$NON-NLS-1$
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
setFileFilter(new BusinessBASICFileFilter());
exportFile(null);
}
});
item = new MenuItem(menu, SWT.NONE);
item.setText(textBundle.get("ExportAsAsciiTextMenuItem")); //$NON-NLS-1$
item.addSelectionListener(new SelectionAdapter() {

View File

@ -172,8 +172,8 @@ public class FileViewerWindow {
imageManager.get(ImageManager.ICON_VIEW_AS_BASIC_PROGRAM)
));
nativeFilterAdapterMap.put(BusinessBASICFileFilter.class,
new BusinessBASICFilterAdapter(this, textBundle.get("FileViewerWindow.ApplesoftButton"), //$NON-NLS-1$
textBundle.get("FileViewerWindow.ApplesoftTooltip"), //$NON-NLS-1$
new BusinessBASICFilterAdapter(this, textBundle.get("FileViewerWindow.BusinessBASICButton"), //$NON-NLS-1$
textBundle.get("FileViewerWindow.BusinessBASICTooltip"), //$NON-NLS-1$
imageManager.get(ImageManager.ICON_VIEW_AS_BASIC_PROGRAM)
));
nativeFilterAdapterMap.put(AppleWorksDataBaseFileFilter.class,

View File

@ -33,6 +33,7 @@ import com.webcodepro.applecommander.storage.filters.AppleWorksWordProcessorFile
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
import com.webcodepro.applecommander.storage.filters.AssemblySourceFileFilter;
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
import com.webcodepro.applecommander.storage.filters.BusinessBASICFileFilter;
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
import com.webcodepro.applecommander.storage.filters.HexDumpFileFilter;
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
@ -151,6 +152,14 @@ public class ExportFileStartPane extends WizardPane {
}
});
button = new Button(buttonSubpanel, SWT.RADIO);
button.setText(textBundle.get("ExportFileAsBusinessBASICFile")); //$NON-NLS-1$
button.setSelection(wizard.getFileFilter() instanceof BusinessBASICFileFilter);
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
getWizard().setFileFilter(new BusinessBASICFileFilter());
}
});
button = new Button(buttonSubpanel, SWT.RADIO);
button.setText(textBundle.get("ExportFileAsAppleworksWordProcessorFile")); //$NON-NLS-1$
button.setSelection(wizard.getFileFilter() instanceof AppleWorksWordProcessorFileFilter);
button.addSelectionListener(new SelectionAdapter() {