Search in sources :

Example 6 with ExampleFileFilter

use of org.freeplane.core.ui.ExampleFileFilter in project freeplane by freeplane.

the class Activator method registerMindMapModeExtension.

private void registerMindMapModeExtension(final BundleContext context) {
    final Hashtable<String, String[]> props = new Hashtable<String, String[]>();
    props.put("mode", new String[] { MModeController.MODENAME });
    context.registerService(IModeControllerExtensionProvider.class.getName(), new IModeControllerExtensionProvider() {

        public void installExtension(ModeController modeController) {
            final ExportController exportController = ExportController.getController(modeController);
            exportController.addExportEngine(new ExampleFileFilter("pdf", TextUtils.getText("export_pdf_text")), new ExportPdf());
            exportController.addExportEngine(new ExampleFileFilter("svg", TextUtils.getText("export_svg_text")), new ExportSvg());
            final ViewerController extension = (ViewerController) modeController.getExtension(ViewerController.class);
            extension.addFactory(new SvgViewerFactory());
        }
    }, props);
}
Also used : Hashtable(java.util.Hashtable) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) ModeController(org.freeplane.features.mode.ModeController) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) IModeControllerExtensionProvider(org.freeplane.main.osgi.IModeControllerExtensionProvider) ExampleFileFilter(org.freeplane.core.ui.ExampleFileFilter) ExportController(org.freeplane.features.export.mindmapmode.ExportController)

Aggregations

ExampleFileFilter (org.freeplane.core.ui.ExampleFileFilter)6 File (java.io.File)4 JFileChooser (javax.swing.JFileChooser)3 Component (java.awt.Component)2 ModeController (org.freeplane.features.mode.ModeController)2 MModeController (org.freeplane.features.mode.mindmapmode.MModeController)2 PropertyChangeEvent (java.beans.PropertyChangeEvent)1 PropertyChangeListener (java.beans.PropertyChangeListener)1 URI (java.net.URI)1 Hashtable (java.util.Hashtable)1 FileFilter (javax.swing.filechooser.FileFilter)1 ResourceController (org.freeplane.core.resources.ResourceController)1 BitmapImagePreview (org.freeplane.core.ui.components.BitmapImagePreview)1 ExportController (org.freeplane.features.export.mindmapmode.ExportController)1 FormatController (org.freeplane.features.format.FormatController)1 ScannerController (org.freeplane.features.format.ScannerController)1 IconController (org.freeplane.features.icon.IconController)1 MIconController (org.freeplane.features.icon.mindmapmode.MIconController)1 LinkController (org.freeplane.features.link.LinkController)1 MLinkController (org.freeplane.features.link.mindmapmode.MLinkController)1