Package de.mindcrimeilab.xsanalyzer.model

Examples of de.mindcrimeilab.xsanalyzer.model.XsAnalyzerApplicationModel


    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof XsAnalyzerApplicationEvent) {
            switch (((XsAnalyzerApplicationEvent) event).getEventType()) {
                case SAME_NAMES:
                    XsAnalyzerApplicationModel appmodel = (XsAnalyzerApplicationModel) getApplicationContext().getBean("applicationModel");
                    setModel(appmodel);
                    break;
                case OPEN:
                    invalidate();
                    break;
View Full Code Here


    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof XsAnalyzerApplicationEvent) {
            switch (((XsAnalyzerApplicationEvent) event).getEventType()) {
                case SIMILAR_TYPES:
                    XsAnalyzerApplicationModel appmodel = (XsAnalyzerApplicationModel) getApplicationContext().getBean("applicationModel");
                    setModel(appmodel);
                    break;
                case OPEN:
                    invalidate();
                    break;
View Full Code Here

     * @see org.springframework.richclient.command.ActionCommand#doExecuteCommand()
     */
    @Override
    protected void doExecuteCommand() {
        logger.debug("Reload command called!");
        XsAnalyzerApplicationModel appmodel = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
        final File schemaFile = appmodel.getSchemaFile();
        if (null != schemaFile) {
            logger.debug("Reloading [" + schemaFile + "]");
            appmodel.setSchemaModel(XsModelFactory.createXsModel(schemaFile));
            Application.instance().getApplicationContext().publishEvent(new XsAnalyzerApplicationEvent(EventType.OPEN, this));
        }
        else logger.info("Reloading impossible - no file loaded...");
    }
View Full Code Here

     *
     * @see org.springframework.richclient.command.ActionCommand#doExecuteCommand()
     */
    @Override
    protected void doExecuteCommand() {
        final XsAnalyzerApplicationModel model = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
        final JFrame parent = Application.instance().getActiveWindow().getControl();

        final VisualProgressWorker<Analyzer, Void> worker = new VisualProgressWorker<Analyzer, Void>(parent) {

            @Override
View Full Code Here

     * @see org.springframework.richclient.command.ActionCommand#doExecuteCommand()
     */
    @Override
    protected void doExecuteCommand() {
        logger.debug("Execute RunMultipleCommand");
        XsAnalyzerApplicationModel model = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
        final ApplicationDialog dlg;
        if (null == model.getSchemaModel()) {
            dlg = new MessageDialog("Warning", "Please load a XML Schema file first.");
        }
        else {
            dlg = new RunMultipleDialog();
        }
View Full Code Here

     *
     * @see org.springframework.richclient.command.ActionCommand#doExecuteCommand()
     */
    @Override
    protected void doExecuteCommand() {
        final XsAnalyzerApplicationModel model = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
        final JFrame parent = Application.instance().getActiveWindow().getControl();

        final VisualProgressWorker<Analyzer, Void> worker = new VisualProgressWorker<Analyzer, Void>(parent) {

            @Override
View Full Code Here

     *
     * @see org.springframework.richclient.command.ActionCommand#doExecuteCommand()
     */
    @Override
    protected void doExecuteCommand() {
        final XsAnalyzerApplicationModel model = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");
        final JFrame parent = Application.instance().getActiveWindow().getControl();

        final VisualProgressWorker<Analyzer, Void> worker = new VisualProgressWorker<Analyzer, Void>(parent) {

            @Override
View Full Code Here

    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof XsAnalyzerApplicationEvent) {
            switch (((XsAnalyzerApplicationEvent) event).getEventType()) {
                case TYPE_USAGE:
                    XsAnalyzerApplicationModel appmodel = (XsAnalyzerApplicationModel) getApplicationContext().getBean("applicationModel");
                    setModel(appmodel);
                    break;
                case OPEN:
                    invalidate();
                    break;
View Full Code Here

    @Override
    protected boolean onFinish() {
        logger.debug("Selected analyzer classes [" + this.getSelectedAnalyzers() + "]");
        if (this.getSelectedAnalyzers().isEmpty()) return true;

        final XsAnalyzerApplicationModel model = (XsAnalyzerApplicationModel) Application.instance().getApplicationContext().getBean("applicationModel");

        VisualProgressWorker<Collection<Analyzer>, Void> worker = new VisualProgressWorker<Collection<Analyzer>, Void>(this.getParentWindow()) {

            @Override
            protected Collection<Analyzer> doInBackground() throws Exception {
                XSModel xsmodel = model.getSchemaModel();

                final XsModelWalker walker = new XsModelWalker();

                final PropertyChangeListener changeListener = new PropertyChangeListener() {
View Full Code Here

        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 de.mindcrimeilab.xsanalyzer.model.XsAnalyzerApplicationModel

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.