Package org.springframework.richclient.application

Examples of org.springframework.richclient.application.ApplicationWindow


        int ret = JOptionPane.showConfirmDialog(null, tr.get(ID + ".question",
                settings.getNumberOfDays(), settings.getTimeslotsPerDay()));
        if (ret != JOptionPane.OK_OPTION)
            return;

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
View Full Code Here


        this.algorithm = algorithm;
    }

    @Override
    protected void doOnce() {
        ApplicationWindow aw = getApplicationWindow();
        aw.getStatusBar().clear();

        // TODO make variable
        int sec = 5 * 60;
        algorithm.setCondition(new AlgorithmConditionTime(sec));
        String msg = tr.get(ID + ".startTask", sec / 60.0f);

        aw.getStatusBar().getProgressMonitor().taskStarted(msg, -1);
        MySwingWorker sw = new MySwingWorker(ID) {

            @Override
            protected void myconstruct() throws Exception {
                algorithm.setDataPool(dataPool);
View Full Code Here

    @Override
    protected void doOnce() {
        checkIfDataIsAlreadyAvailable();
        closeAllViews();

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

        this.settings = settings;
    }

    @Override
    protected void doOnce() {
        ApplicationWindow aw = getApplicationWindow();
        aw.getStatusBar().clear();

        // inject via spring and using the same optimizer command class?
        final Algorithm algorithm = new UniTimeOptimization();
        ((UniTimeOptimization) algorithm).setInitialAssignment(true);

        // TODO make seconds editable via GUI
        int sec = 5 * 60;
        algorithm.setCondition(new AlgorithmConditionTime(sec));
        String msg = tr.get(ID + ".startTask", sec / 60.0f);

        aw.getStatusBar().getProgressMonitor().taskStarted(msg, -1);
        MySwingWorker sw = new MySwingWorker(ID) {

            @Override
            protected void myconstruct() throws Exception {
                algorithm.setDataPoolSettings(settings);
View Full Code Here

                settings.getNumberOfDays(), settings.getTimeslotsPerDay()));
        if (ret != JOptionPane.OK_OPTION)
            return;

        track2allData.changeSettings();
        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();

        try {
            if (download) {
                // see MySwingWorker.construct -> it could be that site is not accessible
                // -> then the ui should not freeze
            } else {
                JFileChooser fc = new JFileChooser();
                fc.setDialogTitle(tr.get(ID + ".fileDialog"));
                int resultFC = fc.showOpenDialog(aw.getControl());
                if (resultFC != JFileChooser.APPROVE_OPTION) {
                    bar.setMessage(tr.get(ID + ".noFileSelected"));
                    return;
                }
                file = fc.getSelectedFile();
View Full Code Here

    @Override
    protected void doOnce() {
        checkIfDataIsAlreadyAvailable();
        closeAllViews();

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

     *
     * @see Application#close()
     */
    @Override
    protected void doOnce() {
        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        int res = fc.showSaveDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        final File f = fc.getSelectedFile();
View Full Code Here

    @Override
    protected void doOnce() {
        checkIfDataIsAlreadyAvailable();
        closeAllViews();

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

    }
  }

  protected CommandManager getCommandManager() {
    CommandManager commandManager;
    ApplicationWindow appWindow = Application.instance().getActiveWindow();
    if (appWindow == null || appWindow.getCommandManager() == null) {
      if (localCommandManager == null) {
        localCommandManager = new DefaultCommandManager();
      }
      commandManager = localCommandManager;
    }
    else {
      commandManager = appWindow.getCommandManager();
    }
    for (int i = 0; i < COMMANDS.length; i++) {
      if (!commandManager.containsActionCommand(COMMANDS[i])) {
        commandManager.registerCommand(new TargetableActionCommand(COMMANDS[i], null));
      }
View Full Code Here

        if (parent == null)
        {
            if (org.springframework.richclient.application.Application.isLoaded())
            {
                ApplicationWindow activeWindow = org.springframework.richclient.application.Application
                        .instance().getActiveWindow();
                if (activeWindow != null)
                    parent = activeWindow.getControl();
            }
        }

        JXErrorPane pane = new JXErrorPane();
        pane.setErrorInfo(errorInfo);
View Full Code Here

TOP

Related Classes of org.springframework.richclient.application.ApplicationWindow

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.