public AbstractViewerAction(MainFrame mainFrame, Map<String,Object> properties) {
super(mainFrame, properties);
// Enable this action only if the currently selected file is not a directory and can be read.
setSelectedFileFilter(new AndFileFilter(
new FileOperationFilter(FileOperation.READ_FILE),
new AttributeFileFilter(FileAttribute.DIRECTORY, true)
));
}