Package net.sourceforge.processdash.i18n

Examples of net.sourceforge.processdash.i18n.Resources


        if (unrepairedCount == 0)
            return true;

        // If there are unrepaired files, display an error dialog
        ProcessDashboard.dropSplashScreen();
        Resources r = Resources.getDashBundle("ProcessDashboard.Errors");
        String message = getCorruptFileStr() + "\n" + r.getString("Lost_Data_Message");
        String title = r.getString("Lost_Data_Title");
        int response = JOptionPane.showConfirmDialog(dialogParent, message,
            title, JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE);

        return response == JOptionPane.YES_OPTION;
    }
View Full Code Here


        if (missingDataFiles.isEmpty())
            return;

        // prepare to display an error dialog.
        ProcessDashboard.dropSplashScreen();
        Resources resources = Resources.getDashBundle("ProcessDashboard.Errors");

        // find the errors which can be attributed to missing MCFs.
        Map<String, String> warnings = new HashMap(missingDataFiles);
        Map<String, List<String>> mcfProjects = findMissingMcfProjects(warnings);

        // If they are missing one of the standard MCFs, print a message
        // telling them to download and run the dashboard installer.
        showMcfWarning(resources, "Missing_MCF.TSP_Footer", "TSP",
            mcfProjects.remove("TSP"), DOWNLOAD_URL);
        showMcfWarning(resources, "Missing_MCF.TSP_Footer", "PDSSD",
            mcfProjects.remove("PDSSD"), DOWNLOAD_URL);

        // If they are missing a custom MCF, print a message telling them
        // to obtain it from their team leader and install it.
        String resKey = CompressedInstanceLauncher.isRunningFromCompressedData()
                ? "Missing_MCF.Custom_Footer_Zip_FMT"
                : "Missing_MCF.Custom_Footer_FMT";
        for (Map.Entry<String, List<String>> e : mcfProjects.entrySet())
            showMcfWarning(resources, resKey, e.getKey(), e.getValue(),
                SHARE_MCF_URL);

        // if any other files are missing, display a more generic error.
        ErrorReporter errorReporter = new ErrorReporter(
                resources.getString("Broken_Data_Title"),
                resources.getStrings("Broken_Data_Header"),
                resources.getStrings("Broken_Data_Footer"));
        for (String dataPrefix : warnings.keySet())
            errorReporter.logError(dataPrefix);
        errorReporter.done();
    }
View Full Code Here

            JOptionPane.ERROR_MESSAGE);
    }


    private void displayStartupPermissionError(String resourceKey) {
        Resources res = Resources.getDashBundle("Authentication.Errors");
        String title = res.getString(resourceKey + ".Title");
        Object message = res.getStrings(resourceKey + ".Message");
        JOptionPane.showMessageDialog(hideSS(), message, title,
            JOptionPane.ERROR_MESSAGE);
    }
View Full Code Here

            // We fetch the display string for the category. We start by looking
            //  in the "Tools.Prefs.Category.<categoryID>.Label" bundle. If no such
            //  key exist, we iterate through the panes (which are ordered according
            //  to their priority) and use the first display name we find. If none
            //  is found, we use the categoryID.
            Resources resources = Resources.getDashBundle(DEFAULT_DISPLAY_STRING_LOCATION);
            try {
                displayName = resources.getString(categoryID + ".Label");
            } catch (MissingResourceException e) {}
           
            if (displayName == null && panes.size() > 0) {
                Iterator<PreferencesPane> it = panes.iterator();
               
View Full Code Here

            if (this.ordinal == -1)
                this.ordinal = 999;

            String resBase = xml.getAttribute("resources");
            if (XMLUtils.hasValue(resBase)) {
                Resources res = Resources.getDashBundle(resBase);
                setText(res.getString("Display"));
            } else {
                setText(resources.getString(id + ".Display"));
            }

            guiPrefs.load(id, this);
View Full Code Here

        if (line == -1)
            // no line number information.  Just return the message.
            return message;
        else {
            // format a message containing line#/col# information.
            Resources r = Resources.getDashBundle("Templates");
            String fmtKey = "XML_Exception_Line_FMT";
            if (col != -1)
                fmtKey = "XML_Exception_Line_Column_FMT";
            return r.format
                (fmtKey, message, new Integer(line), new Integer(col));
        }
    }
View Full Code Here

        loggingModel.addPropertyChangeListener(this);
       
        PCSH.enableHelp(this, "PlayPause");
        PCSH.enableHelpKey(getMenu(), "PlayPause");
       
        Resources res = Resources.getDashBundle("ProcessDashboard.Pause");
        timingTip = res.getString("Pause_Tip");
        timingTipBrief = res.getString("Pause_Tip_Brief");
        pausedTip = res.getString("Continue_Tip");
        pausedTipBrief = res.getString("Continue_Tip_Brief");
        disabledTip = res.getString("Disabled_Tip");

        setRunFirstMenuOption(false);
       
        loadUserSettings();
View Full Code Here

        if (e == null) return defValue;

        Document doc = e.getOwnerDocument();
        if (doc == null) return defValue;

        Resources bundle = (Resources) resourceMap.get(doc);
        if (bundle == null) return defValue;

        resName = resName.replace(' ', '_');
        try {
            return resolveMetaReferences(bundle.getString(resName));
        } catch (MissingResourceException mre) {}
        return defValue;
    }
View Full Code Here

                            (resourceName, ".", "%2e");
                }
                resourceName = resourceName.replace('/', '.');
                if (resourceName.startsWith("."))
                    resourceName = resourceName.substring(1);
                Resources bundle = Resources.getTemplateBundle(resourceName);
                resourceMap.put(result, bundle);
            } catch (Exception e) {}
        }
        return result;
    }
View Full Code Here

                    bundleName = bundleName.substring(pos+1);
                pos = bundleName.lastIndexOf('.');
                if (pos != -1 && bundleName.indexOf('/', pos) == -1)
                    bundleName = bundleName.substring(0, pos);

                Resources bundle = Resources.getTemplateBundle(bundleName);
                parameters.putAll(bundle.asMap());
            } catch (Exception e) {
                // it is not an error if no companion bundle was found.
            }

        } catch (IOException ioe) {
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.i18n.Resources

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.