class UIExporterPNG implements ExporterUI {

    private final ExporterPNGSettings settings = new ExporterPNGSettings();
    private UIExporterPNGPanel panel;
    private PNGExporter exporter;
    private ValidationPanel validationPanel;

    @Override
    public JPanel getPanel() {
        panel = new UIExporterPNGPanel();
        validationPanel = UIExporterPNGPanel.createValidationPanel(panel);
        return validationPanel;
    }

    @Override
    public void setup(Exporter exporter) {<FILL_FUNCTION_BODY>}

    @Override
    public void unsetup(boolean update) {
        if (update) {
            panel.unsetup(exporter);
            settings.save(exporter);
        }

        panel = null;
        exporter = null;
    }

    @Override
    public boolean isUIForExporter(Exporter exporter) {
        return exporter instanceof PNGExporter;
    }

    @Override
    public String getDisplayName() {
        return NbBundle.getMessage(UIExporterPDF.class, "UIExporterPNG.name");
    }

    private static class ExporterPNGSettings extends AbstractExporterSettings {

        // Preference names
        private final static String WIDTH = "PNG_width";
        private final static String HEIGHT = "PNG_height";
        private final static String MARGIN = "PNG_margin";
        private final static String TRANSPARENT_BACKGROUND = "PNG_transparentBackground";
        // Default
        private final static PNGExporter DEFAULT = new PNGExporter();

        void load(PNGExporter exporter) {
            exporter.setHeight(get(HEIGHT, DEFAULT.getHeight()));
            exporter.setWidth(get(WIDTH, DEFAULT.getWidth()));
            exporter.setMargin(get(MARGIN, DEFAULT.getMargin()));
            exporter.setTransparentBackground(get(TRANSPARENT_BACKGROUND, DEFAULT.isTransparentBackground()));
        }

        void save(PNGExporter exporter) {
            put(HEIGHT, exporter.getHeight());
            put(WIDTH, exporter.getWidth());
            put(MARGIN, exporter.getMargin());
            put(TRANSPARENT_BACKGROUND, exporter.isTransparentBackground());
        }
    }
}

        this.exporter = (PNGExporter) exporter;
        settings.load(this.exporter);
        if (panel != null) {
            panel.setup(this.exporter);
        }
    
<no_super_class>