/** * Returns the text to display. * * @return the text */ @Override protected String getText() { String defaultValue = "Error : could not load the info text !"; return resources.getString("InfoPanel.info", defaultValue); } }
/** * Returns the text to display. * * @return the text. A {@code null} indicates failure */ @Override protected String getText() { String result = null; if (panelId != null) { result = resources.getString(resourcePrefix + "." + panelId, null); } if (result == null) { result = resources.getString(resourcePrefix + ".info", null); } if (result != null) { result = removeHTML(result); } return result; }
/** * Loads the info text. */ private void loadInfo() { String defaultValue = "Error : could not load the info text !"; info = getResources().getString("InfoPanel.info", defaultValue); }
/** * Loads the info text. */ private void loadInfo() { info = getResources().getString("XInfoPanel.info", null, "Error : could not load the info text !"); }
/** * Creates Extended Locale Enabled XdgDesktopIcon Command script. * Fills the File myXdgDesktopIconScript with the content of * com/izforge/izpack/util/os/unix/xdgscript.sh and uses this to * creates User Desktop icons * * @param shortCutLocation in which folder should this stored. * @throws ResourceNotFoundException resource not found error */ private void createExtXdgDesktopIconCmd(File shortCutLocation) throws ResourceNotFoundException { ShellScript myXdgDesktopIconScript = new ShellScript(null); String lines = resources.getString("/com/izforge/izpack/util/unix/xdgdesktopiconscript.sh", null); myXdgDesktopIconScript.append(lines); myXdgDesktopIconCmd = shortCutLocation + FS + "IzPackLocaleEnabledXdgDesktopIconScript.sh"; myXdgDesktopIconScript.write(myXdgDesktopIconCmd); FileExecutor.getExecOutput(new String[]{UnixHelper.getCustomCommand("chmod"), "+x", myXdgDesktopIconCmd}, true); }
private URL loadHTMLInfoContent() { Resources resources = getResources(); if (getMetadata() != null && getMetadata().getPanelId() != null) { try { String panelSpecificResName = panelResourcePrefixStr + '.' + this.getMetadata().getPanelId(); String panelspecificResContent = resources.getString(panelSpecificResName, null); if (panelspecificResContent != null) { panelResourceNameStr = panelSpecificResName; } } catch (Exception e) { // Those ones can be skipped } } try { return resources.getURL(panelResourceNameStr); } catch (Exception ex) { ex.printStackTrace(); } return null; }