Package org.springframework.richclient.settings.support

Examples of org.springframework.richclient.settings.support.Memento


    @Override
    protected void doExecuteCommand() {
        JFileChooser jfc = new JFileChooser();
        jfc.setFileFilter(new XSAnalyzerDefaultFileFilter());

        Memento memento = new JFileChooserMemento(jfc);
        memento.restoreState(settings);

        int result = jfc.showOpenDialog(getParentWindowControl());
        if (JFileChooser.APPROVE_OPTION == result) {
            memento.saveState(settings);
            XsAnalyzerApplicationModel appmodel = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
            appmodel.setSchemaFile(jfc.getSelectedFile());
            appmodel.setSchemaModel(XsModelFactory.createXsModel(appmodel.getSchemaFile()));
            Application.instance().getApplicationContext().publishEvent(new XsAnalyzerApplicationEvent(EventType.OPEN, this));
        }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.settings.support.Memento

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.