/** * Constructs a {@code FieldReader}. * * @param field the field element to read * @param config the configuration */ public ButtonFieldReader(IXMLElement field, Config config, InstallData installData) { super(field, config); this.installData = installData; this.messages = installData.getMessages(); }
public NextMediaDialog(Frame owner, InstallData idata, String nextmedia) { this(owner, idata.getMessages(), null, nextmedia); }
private void loadLangpack(InstallData installData) { messages = installData.getMessages(); }
/** * Construct new compilation job. * * @param listener The listener to report progress to. * @param idata The installation data. * @param name The name of the job. * @param files The files to compile. * @param classpath The class path to use. */ public CompilationJob(CompileHandler listener, InstallData idata, String name, ArrayList<File> files, List<String> classpath) { this.listener = listener; this.idata = idata; this.messages = idata.getMessages(); this.name = name; this.files = files; this.classpath = classpath; }
public PacksConsolePanel(PanelView<ConsolePanel> panel, InstallData installData, Prompt prompt) { super(panel); this.prompt = prompt; this.installData = installData; //load the packs lang messages if exists try { messages = installData.getMessages().newMessages(Resources.PACK_TRANSLATIONS_RESOURCE_NAME); } catch (ResourceNotFoundException exception) { // no packs messages resource, so fall back to the default messages = installData.getMessages(); } }
public String getCreateForCurrentUserPrompt() { return installData.getMessages().get("ShortcutPanel.regular.currentUser"); }
/** * Helper to return a prompt to create desktop shortcuts. * * @return the desktop shortcut prompt */ public String getCreateDesktopShortcutsPrompt() { return installData.getMessages().get("ShortcutPanel.regular.desktop"); }
/** * Helper to return a localised message, given its identifier. * * @param id the message identifier * @return the corresponding message, or {@code id} if it doesn't exist */ protected String getMessage(String id) { return installData.getMessages().get(id); }
private String getIncompatibleInstallationMsg(InstallData installData) { return installData.getMessages().get("TargetPanel.incompatibleInstallation"); }
public String getCreateForUserPrompt() { return installData.getMessages().get("ShortcutPanel.regular.userIntro"); }
public String getCreateStartupShortcutsPrompt() { return installData.getMessages().get("ShortcutPanel.regular.startup"); }
public String getCreateForAllUsersPrompt() { return installData.getMessages().get("ShortcutPanel.regular.allUsers"); }
/** * Returns a localised message for the supplied message identifier. * * @param id the message identifier * @return the corresponding message, or {@code id} if the message does not exist */ protected String getMessage(String id) { Messages messages = field.getInstallData().getMessages(); return messages.get(id); }
/** * Validate that groupName is a valid directory path * * @param groupName * @return */ public String verifyProgramGroup(String groupName) { if(!platform.isValidDirectorySyntax(groupName)) { return installData.getMessages().get("ShortcutPanel.group.error"); } return ""; }
/** * Show localized warning message dialog basing on given parameters. * * @param message the message to print out in dialog box. * @param prompt the prompt to use */ protected void warning(String message, Prompt prompt) { Messages messages = getInstallData().getMessages(); prompt.warn(messages.get("UserInputPanel.error.caption"), message); }
/** * Returns a localised message for the supplied message identifier. * * @param id the message identifier * @return the corresponding message, or {@code id} if the message does not exist */ protected String getMessage(String id) { InstallData installData = getField().getInstallData(); Messages messages = installData.getMessages(); return messages.get(id); }
/** * Choose under which program group to place the shortcuts. */ private void chooseProgramGroup(Console console) { String programGroup = shortcutPanelLogic.getSuggestedProgramGroup(); if (programGroup != null && "".equals(programGroup)) { programGroup = console.prompt(installData.getMessages().get("ShortcutPanel.regular.list"), ""); } shortcutPanelLogic.setGroupName(programGroup); }
/** * Runs the panel using the specified console. * <p/> * If there is no text to display, the panel will return {@code false}. * * @param installData the installation data * @param console the console * @return {@code true} if the panel ran successfully, otherwise {@code false} */ @Override public boolean run(InstallData installData, Console console) { super.run(installData, console); console.println(installData.getMessages().get("InfoPanel.info")); return true; }
/** * Helper to format a message to create shortcuts for the current platform. * * @return a formatted message */ public String getCreateShortcutsPrompt() { Messages messages = installData.getMessages(); String menuKind = messages.get("ShortcutPanel.regular.StartMenu:Start-Menu"); if (installData.getPlatform().isA(UNIX) && UnixHelper.kdeIsInstalled()) { menuKind = messages.get("ShortcutPanel.regular.StartMenu:K-Menu"); } return StringTool.replace(messages.get("ShortcutPanel.regular.create"), "StartMenu", menuKind); }
private void handleInstallPath(InstallData installData, String path) { // Allow for variable substitution of the installpath value path = installData.getVariables().replace(path); if (TargetPanelHelper.isIncompatibleInstallation(path, installData.getInfo().isReadInstallationInformation())) { throw new InstallerException(installData.getMessages().get("TargetPanel.incompatibleInstallation")); } installData.setInstallPath(path); } }