Package org.jdesktop.application

Examples of org.jdesktop.application.ResourceMap


        application.getContext().getActionManager().getActionMap(Mediator.class, this).get(actionName).actionPerformed(
                new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null));
    }

    private String requestDefaultFolder() {
        ResourceMap resourceMap = application.getContext().getResourceMap(OptionsDialog.class);
        return  PathRequestDialog.requestFolderFor(p.get(PREF_DEFAULT_FILE_FOLDER, ""),
                resourceMap.getString("save.request.title"), resourceMap.getString("save.request.desc"));
    }
View Full Code Here


        super.shutdown();

    }

    private String askForSdkPath(String sdkPath) {
        ResourceMap resourceMap = getContext().getResourceMap(OptionsDialog.class);
        return PathRequestDialog.requestFolderFor(sdkPath,
                resourceMap.getString("sdk.request.title"),
                resourceMap.getString("sdk.request.desc"));
    }
View Full Code Here

                resourceMap.getString("sdk.request.title"),
                resourceMap.getString("sdk.request.desc"));
    }

    void showErrorMessage(String messageKey, Object... args) {
        ResourceMap resourceMap = getContext().getResourceMap();
        String message = resourceMap.getString(messageKey, args);
        String errorTitle = resourceMap.getString("error.title");

        JOptionPane.showMessageDialog(getMainFrame(), message, errorTitle, JOptionPane.ERROR_MESSAGE);
    }
View Full Code Here

        JOptionPane.showMessageDialog(getMainFrame(), message, errorTitle, JOptionPane.ERROR_MESSAGE);
    }

    void showMessage(String messageKey, Object... args) {
        ResourceMap resourceMap = getContext().getResourceMap();
        String message = resourceMap.getString(messageKey, args);
        String errorTitle = resourceMap.getString("info.title");

        JOptionPane.showMessageDialog(getMainFrame(), message, errorTitle, JOptionPane.INFORMATION_MESSAGE);
    }
View Full Code Here

    private PathRequestDialog(final String oldPath, final String title, final String description, boolean selectFolder) {
        super(Application.getInstance(AShot.class).getMainFrame(), title, true);
        final AShot app = Application.getInstance(AShot.class);

        final ResourceMap resourceMap = app.getContext().getResourceMap(PathRequestDialog.class);
        resourceMap.injectFields(this);
        setResizable(false);
        this.title = title;

        setModal(true);
View Full Code Here

            p.put(PREF_DEFAULT_FILE_FOLDER, f);
        }

        demon.resetLastImage();
        JToggleButton bt = (JToggleButton) toolBarMap.get(ACTION_RECORDING);
        ResourceMap resourceMap = application.getContext().getResourceMap(Mediator.class);
        if (isRecording()) {
            bt.setText(resourceMap.getString("recording.Action.selectedText"));
        } else {
            bt.setText(resourceMap.getString("recording.Action.text"));
        }
    }
View Full Code Here

    }

    public static final String ACTION_INSTALL = "install";
    @Action(name = ACTION_INSTALL, block=Task.BlockingScope.WINDOW, enabledProperty=PROP_CONNECTED)
    public Task install() {
        ResourceMap resourceMap = application.getContext().getResourceMap(Mediator.class);
        String path = PathRequestDialog.requestFileFor("", resourceMap.getString("dialog.installfile.title"),
                resourceMap.getString("dialog.installfile.desc"));
       
        if (StringUtils.isNotBlank(path)) {
            return new AppInstaller(this, new File(path));
        } else {
            return null;
View Full Code Here

    }

    public static final String ACTION_CHANGE_DEFAULT_FOLDER = "changeDefaultFolder";
    @Action(name = ACTION_CHANGE_DEFAULT_FOLDER)
    public void changeDefaultFolder() {
        ResourceMap resourceMap = application.getContext().getResourceMap(Mediator.class);
        String folder = PathRequestDialog.requestFolderFor(p.get(PREF_DEFAULT_FILE_FOLDER, null),
                resourceMap.getString("save.request.title"), resourceMap.getString("save.request.desc"));
        if (StringUtils.isNotBlank(folder)) {
            p.put(PREF_DEFAULT_FILE_FOLDER, folder);
        }
    }
View Full Code Here

    }

    public static final String ACTION_CHANGE_SDK_FOLDER = "changeSdkFolder";
    @Action(name = ACTION_CHANGE_SDK_FOLDER)
    public void changeSdkFolder() {
        ResourceMap resourceMap = application.getContext().getResourceMap(OptionsDialog.class);
        String folder = PathRequestDialog.requestFolderFor(p.get(PREF_ANDROID_SDK_PATH, null),
                resourceMap.getString("sdk.request.title"), resourceMap.getString("sdk.request.desc"));
        if (StringUtils.isNotBlank(folder)) {
            if (AndroidSdkHelper.validatePath(folder)) {
                p.put(PREF_ANDROID_SDK_PATH, folder);
            } else {
                application.showErrorMessage("error.sdk");
View Full Code Here

        application.getContext().getActionManager().getActionMap(Mediator.class, this).get(actionName).actionPerformed(
                new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null));
    }

    private String requestDefaultFolder() {
        ResourceMap resourceMap = application.getContext().getResourceMap(OptionsDialog.class);
        return  PathRequestDialog.requestFolderFor(p.get(PREF_DEFAULT_FILE_FOLDER, ""),
                resourceMap.getString("save.request.title"), resourceMap.getString("save.request.desc"));
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.application.ResourceMap

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.