bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); parent.unlockNextButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(""); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; }
|
public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(""); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; }
| 3,240,067 |
private void writePacks() throws IOException { sendMsg("Writing Packs ..."); // Map to remember pack number and bytes offsets of back references Map storedFiles = new HashMap(); // First write the serialized files and file metadata data for each pack // while counting bytes. int packNumber = 0; Iterator packIter = packsList.iterator(); while (packIter.hasNext()) { PackInfo packInfo = (PackInfo) packIter.next(); Pack pack = packInfo.getPack(); pack.nbytes = 0; // create a pack specific jar if required JarOutputStream packStream = primaryJarStream; if (packJarsSeparate) { // See installer.Unpacker#getPackAsStream for the counterpart String name = baseFile.getName() + ".pack" + packNumber + ".jar"; packStream = getJarOutputStream(name); } sendMsg("Writing Pack #" + packNumber + " : " + pack.name); // Retrieve the correct output stream ZipEntry entry = new ZipEntry("packs/pack" + packNumber); packStream.putNextEntry(entry); packStream.flush(); // flush before we start counting ByteCountingOutputStream dos = new ByteCountingOutputStream(packStream); ObjectOutputStream objOut = new ObjectOutputStream(dos); // We write the actual pack files long packageBytes = 0; objOut.writeInt(packInfo.getPackFiles().size()); Iterator iter = packInfo.getPackFiles().iterator(); while (iter.hasNext()) { boolean addFile = true; PackFile pf = (PackFile) iter.next(); File file = packInfo.getFile(pf); // use a back reference if file was in previous pack, and in same jar long[] info = (long[]) storedFiles.get(file); if (info != null && ! packJarsSeparate) { pf.setPreviousPackFileRef((int) info[0], info[1]); addFile = false; } objOut.writeObject(pf); // base info objOut.flush(); //make sure it is written if (addFile && ! pf.isDirectory()) { long pos = dos.getByteCount(); //get the position FileInputStream inStream = new FileInputStream(file); long bytesWritten = copyStream(inStream, objOut); if (bytesWritten != pf.length()) throw new IOException("File size mismatch when reading " + file); inStream.close(); storedFiles.put(file, new long[] { packNumber, pos }); } // even if not written, it counts towards pack size pack.nbytes += pf.length(); } // Write out information about parsable files objOut.writeInt(packInfo.getParsables().size()); iter = packInfo.getParsables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about executable files objOut.writeInt(packInfo.getExecutables().size()); iter = packInfo.getExecutables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about updatecheck files objOut.writeInt(packInfo.getUpdateChecks().size()); iter = packInfo.getUpdateChecks().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Cleanup objOut.flush(); packStream.closeEntry(); // close pack specific jar if required if (packJarsSeparate) packStream.close(); packNumber++; } // Now that we know sizes, write pack metadata to primary jar. primaryJarStream.putNextEntry(new ZipEntry("packs.info")); ObjectOutputStream out = new ObjectOutputStream(primaryJarStream); out.writeInt(packsList.size()); Iterator i = packsList.iterator(); while (i.hasNext()) { PackInfo pack = (PackInfo) i.next(); out.writeObject(pack.getPack()); } out.flush(); primaryJarStream.closeEntry(); }
|
private void writePacks() throws IOException { sendMsg("Writing Packs ..."); // Map to remember pack number and bytes offsets of back references Map storedFiles = new HashMap(); // First write the serialized files and file metadata data for each pack // while counting bytes. int packNumber = 0; Iterator packIter = packsList.iterator(); while (packIter.hasNext()) { PackInfo packInfo = (PackInfo) packIter.next(); Pack pack = packInfo.getPack(); pack.nbytes = 0; // create a pack specific jar if required JarOutputStream packStream = primaryJarStream; if (packJarsSeparate) { // See installer.Unpacker#getPackAsStream for the counterpart String name = baseFile.getName() + ".pack" + packNumber + ".jar"; packStream = getJarOutputStream(name); } sendMsg("Writing Pack #" + packNumber + " : " + pack.name); // Retrieve the correct output stream ZipEntry entry = new ZipEntry("packs/pack" + packNumber); packStream.putNextEntry(entry); packStream.flush(); // flush before we start counting ByteCountingOutputStream dos = new ByteCountingOutputStream(packStream); ObjectOutputStream objOut = new ObjectOutputStream(dos); // We write the actual pack files long packageBytes = 0; objOut.writeInt(packInfo.getPackFiles().size()); Iterator iter = packInfo.getPackFiles().iterator(); while (iter.hasNext()) { boolean addFile = !pack.loose; PackFile pf = (PackFile) iter.next(); File file = packInfo.getFile(pf); // use a back reference if file was in previous pack, and in same jar long[] info = (long[]) storedFiles.get(file); if (info != null && ! packJarsSeparate) { pf.setPreviousPackFileRef((int) info[0], info[1]); addFile = false; } objOut.writeObject(pf); // base info objOut.flush(); //make sure it is written if (addFile && ! pf.isDirectory()) { long pos = dos.getByteCount(); //get the position FileInputStream inStream = new FileInputStream(file); long bytesWritten = copyStream(inStream, objOut); if (bytesWritten != pf.length()) throw new IOException("File size mismatch when reading " + file); inStream.close(); storedFiles.put(file, new long[] { packNumber, pos }); } // even if not written, it counts towards pack size pack.nbytes += pf.length(); } // Write out information about parsable files objOut.writeInt(packInfo.getParsables().size()); iter = packInfo.getParsables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about executable files objOut.writeInt(packInfo.getExecutables().size()); iter = packInfo.getExecutables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about updatecheck files objOut.writeInt(packInfo.getUpdateChecks().size()); iter = packInfo.getUpdateChecks().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Cleanup objOut.flush(); packStream.closeEntry(); // close pack specific jar if required if (packJarsSeparate) packStream.close(); packNumber++; } // Now that we know sizes, write pack metadata to primary jar. primaryJarStream.putNextEntry(new ZipEntry("packs.info")); ObjectOutputStream out = new ObjectOutputStream(primaryJarStream); out.writeInt(packsList.size()); Iterator i = packsList.iterator(); while (i.hasNext()) { PackInfo pack = (PackInfo) i.next(); out.writeObject(pack.getPack()); } out.flush(); primaryJarStream.closeEntry(); }
| 3,240,069 |
public boolean matchCurrentSystem() { boolean match = true; String osName = System.getProperty("os.name").toLowerCase(); if ((arch != null) && (arch.length() != 0)) { match = System.getProperty("os.arch").toLowerCase().equals(arch); } if (match && (version != null) && (version.length() != 0)) { match = System.getProperty("os.version").toLowerCase().equals(version); } if (match && (name != null) && (name.length() != 0)) { match = osName.equals(name); } if (match && (family != null)) { if (family.equals("windows")) { match = (osName.indexOf("windows") > -1); } else if (family.equals("mac")) { match = ((osName.indexOf("mac") > -1) && !(osName.endsWith("x"))); } else if (family.equals("unix")) { String pathSep = System.getProperty("path.separator"); match = ( osName.lastIndexOf("unix") > -1 || osName.lastIndexOf("linux") > -1 || osName.lastIndexOf("solaris") > -1 || osName.lastIndexOf("sunos") > -1 || osName.lastIndexOf("aix") > -1 || osName.lastIndexOf("hpux") > -1 || osName.lastIndexOf("hp-ux") > -1 || osName.lastIndexOf("irix") > -1 || osName.lastIndexOf("bsd") > -1 || ((pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x")))) ); } } return match && ((family != null) || (name != null) || (version != null) || (arch != null)); }
|
public boolean matchCurrentSystem() { boolean match = true; String osName = System.getProperty("os.name").toLowerCase(); if ((arch != null) && (arch.length() != 0)) { match = System.getProperty("os.arch").toLowerCase().equals(arch); } if (match && (version != null) && (version.length() != 0)) { match = System.getProperty("os.version").toLowerCase().equals(version); } if (match && (name != null) && (name.length() != 0)) { match = osName.equals(name); } if (match && (family != null)) { if (family.equals("windows")) { match = (osName.indexOf("windows") > -1); } else if (family.equals("mac")) { match = ((osName.indexOf("mac") > -1)); } else if (family.equals("unix")) { String pathSep = System.getProperty("path.separator"); match = ( osName.lastIndexOf("unix") > -1 || osName.lastIndexOf("linux") > -1 || osName.lastIndexOf("solaris") > -1 || osName.lastIndexOf("sunos") > -1 || osName.lastIndexOf("aix") > -1 || osName.lastIndexOf("hpux") > -1 || osName.lastIndexOf("hp-ux") > -1 || osName.lastIndexOf("irix") > -1 || osName.lastIndexOf("bsd") > -1 || ((pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x")))) ); } } return match && ((family != null) || (name != null) || (version != null) || (arch != null)); }
| 3,240,070 |
private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^" + File.separator + "]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^" + File.separator + "]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; }
|
private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^").append(File.separator).append("]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^").append(File.separator).append("]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; }
| 3,240,075 |
private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^" + File.separator + "]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^" + File.separator + "]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; }
|
private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^").append(File.separator).append("]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^").append(File.separator).append("]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; }
| 3,240,076 |
public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || pack.id.equals(""))) { final String name = langpack.getString(pack.id); if (name != null && !name.equals("")) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } }
|
public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || "".equals(pack.id))) { final String name = langpack.getString(pack.id); if (name != null && !name.equals("")) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } }
| 3,240,077 |
public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || pack.id.equals(""))) { final String name = langpack.getString(pack.id); if (name != null && !name.equals("")) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } }
|
public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || pack.id.equals(""))) { final String name = langpack.getString(pack.id); if (name != null && !"".equals(name)) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } }
| 3,240,078 |
private URL loadLicence() { URL retVal = null; String resNamePrifix = "HTMLLicencePanel.licence"; String resName = resNamePrifix + "_" + idata.localeISO3; retVal = getClass().getResource(resName); if (null == retVal ) { retVal = getClass().getResource(resNamePrifix); } return retVal; }
|
private URL loadLicence() { URL retVal = null; String resNamePrifix = "/res/HTMLLicencePanel.licence"; String resName = resNamePrifix + "_" + idata.localeISO3; retVal = getClass().getResource(resName); if (null == retVal ) { retVal = getClass().getResource(resNamePrifix); } return retVal; }
| 3,240,079 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } _pool.add(new SoftReference(obj)); }
|
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } _pool.add(new SoftReference(obj)); }
| 3,240,080 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } _pool.add(new SoftReference(obj)); }
|
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } boolean shouldDestroy = !success; synchronized(this) { _numActive--; if(success) { _pool.add(new SoftReference(obj)); } notifyAll(); } if(shouldDestroy) { try { _factory.destroyObject(obj); } catch(Exception e) { } } }
| 3,240,081 |
public ServiceFactory( OmeroContext context ){ this.ctx = context; }
|
public ServiceFactory( OmeroContext context ){ this.ctx = context; }
| 3,240,083 |
public void doCall() { servant.addCodomainMap(mapCtx); }
|
public void doCall() { servant.addCodomainMap(mapCtx); }
| 3,240,084 |
public int getDefaultT() { return rndDefCopy.getDefaultT(); }
|
public int getDefaultT() { return rndDefCopy.getDefaultT(); }
| 3,240,085 |
public int getDefaultZ() { return rndDefCopy.getDefaultZ(); }
|
public int getDefaultZ() { return rndDefCopy.getDefaultZ(); }
| 3,240,086 |
public int getModel() { return rndDefCopy.getModel(); }
|
public int getModel() { return rndDefCopy.getModel(); }
| 3,240,087 |
public void doCall() { servant.removeCodomainMap(mapCtx); }
|
public void doCall() { servant.removeCodomainMap(mapCtx); }
| 3,240,088 |
public void resetDefaults() { setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = rndDefCopy.getChannelBindings(); PixelsStats stats = servant.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); rndDefCopy.remove(); setModel(RenderingDef.GS); MethodCall mCall = new MethodCall() { public void doCall() { servant.resetDefaults(); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
|
public void resetDefaults() { setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = rndDefCopy.getChannelBindings(); PixelsStats stats = servant.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); rndDefCopy.remove(); setModel(RenderingDef.GS); MethodCall mCall = new MethodCall() { public void doCall() { servant.resetDefaults(); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
| 3,240,089 |
public void doCall() { servant.resetDefaults(); }
|
public void doCall() { servant.resetDefaults(); }
| 3,240,090 |
public void doCall() { servant.saveCurrentSettings(); }
|
public void doCall() { servant.saveCurrentSettings(); }
| 3,240,091 |
public void doCall() { servant.setActive(w, active); }
|
public void doCall() { servant.setActive(w, active); }
| 3,240,092 |
public void doCall() { servant.setChannelWindow(w, start, end); }
|
public void doCall() { servant.setChannelWindow(w, start, end); }
| 3,240,093 |
public void setCodomainInterval(final int start, final int end) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
|
public void setCodomainInterval(final int start, final int end) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
| 3,240,094 |
public void doCall() { servant.setCodomainInterval(start, end); }
|
public void doCall() { servant.setCodomainInterval(start, end); }
| 3,240,095 |
public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
|
public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
| 3,240,096 |
public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
|
public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); }
| 3,240,097 |
public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); }
|
public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); }
| 3,240,098 |
public void doCall() { servant.setRGBA(w, red, green, blue, alpha); }
|
public void doCall() { servant.setRGBA(w, red, green, blue, alpha); }
| 3,240,099 |
public void doCall() { servant.updateCodomainMap(mapCtx); }
|
public void doCall() { servant.updateCodomainMap(mapCtx); }
| 3,240,100 |
public int[] getRGBA() { int[] colors = new int[rgba.length]; for (int i = 0; i < rgba.length; i++) colors[i] = rgba[i]; return colors; }
|
public int[] getRGBA() { int[] colors = new int[rgba.length]; for (int i = 0; i < rgba.length; i++) colors[i] = rgba[i]; return colors; }
| 3,240,101 |
public void resetDefaults() { //linear gamma = 1.0 and bitResolution <=> 255 setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = renderer.getRenderingDef().getChannelBindings(); PixelsStats stats = renderer.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); //Remove all the codomainMapCtx except the identity. renderer.getCodomainChain().remove(); //reset the strategy. setModel(RenderingDef.GS); }
|
public void resetDefaults() { //linear gamma = 1.0 and bitResolution <=> 255 setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = renderer.getRenderingDef().getChannelBindings(); PixelsStats stats = renderer.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); //Remove all the codomainMapCtx except the identity. renderer.getCodomainChain().remove(); //reset the strategy. setModel(RenderingDef.GS); }
| 3,240,102 |
public void saveCurrentSettings() { int imageID = renderer.getImageID(); int pixelsID = renderer.getPixelsID(); Registry context = RenderingEngine.getRegistry(); try { context.getDataManagementService().saveRenderingSettings(pixelsID, imageID, renderer.getRenderingDef()); } catch (Exception e) { MetadataSourceException mse = new MetadataSourceException( "Can't save settings.", e); hanldeException(context, "can't save settings", mse); } }
|
public void saveCurrentSettings() { int imageID = renderer.getImageID(); int pixelsID = renderer.getPixelsID(); Registry context = RenderingEngine.getRegistry(); try { context.getDataManagementService().saveRenderingSettings(pixelsID, imageID, renderer.getRenderingDef()); } catch (Exception e) { MetadataSourceException mse = new MetadataSourceException( "Can't save settings.", e); hanldeException(context, "can't save settings", mse); } }
| 3,240,103 |
public void saveCurrentSettings() { int imageID = renderer.getImageID(); int pixelsID = renderer.getPixelsID(); Registry context = RenderingEngine.getRegistry(); try { context.getDataManagementService().saveRenderingSettings(pixelsID, imageID, renderer.getRenderingDef()); } catch (Exception e) { MetadataSourceException mse = new MetadataSourceException( "Can't save settings.", e); hanldeException(context, "can't save settings", mse); } }
|
public void saveCurrentSettings() { int imageID = renderer.getImageID(); int pixelsID = renderer.getPixelsID(); Registry context = RenderingEngine.getRegistry(); try { context.getDataManagementService().saveRenderingSettings(pixelsID, imageID, renderer.getRenderingDef()); } catch (Exception e) { MetadataSourceException mse = new MetadataSourceException( "Can't save settings.", e); hanldeException(context, "can't save settings", mse); } }
| 3,240,104 |
public void setInputWindow(double start, double end) { inputStart = start; inputEnd = end; }
|
public void setInputWindow(double start, double end) { inputStart = start; inputEnd = end; }
| 3,240,105 |
public QuantumDef(int family, int pixelType, double curveCoefficient, int cdStart, int cdEnd, int bitResolution) { this.family = family; this.pixelType = pixelType; this.curveCoefficient = curveCoefficient; this.cdStart = cdStart; this.cdEnd = cdEnd; this.bitResolution = bitResolution; }
|
public QuantumDef(int family, int pixelType, double curveCoefficient, int cdStart, int cdEnd, int bitResolution) { this.family = family; this.pixelType = pixelType; this.curveCoefficient = curveCoefficient; this.cdStart = cdStart; this.cdEnd = cdEnd; this.bitResolution = bitResolution; }
| 3,240,106 |
public QuantumDef(int family, int pixelType, double curveCoefficient, int cdStart, int cdEnd, int bitResolution) { this.family = family; this.pixelType = pixelType; this.curveCoefficient = curveCoefficient; this.cdStart = cdStart; this.cdEnd = cdEnd; this.bitResolution = bitResolution; }
|
public QuantumDef(int family, int pixelType, double curveCoefficient, int cdStart, int cdEnd, int bitResolution) { this.family = family; this.pixelType = pixelType; this.curveCoefficient = curveCoefficient; this.cdStart = cdStart; this.cdEnd = cdEnd; this.bitResolution = bitResolution; }
| 3,240,107 |
public void setCodomainInterval(int start, int end) { CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rd.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rd.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } }
|
public void setCodomainInterval(int start, int end) { CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rd.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rd.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } }
| 3,240,108 |
public void setQuantumStrategy(int family, double coefficient, int bitResolution);
|
public void setQuantumStrategy(int family, double coefficient, int bitResolution);
| 3,240,109 |
public void setQuantumStrategy(int family, double coefficient, int bitResolution) { RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rd.setQuantumDef(newQd); renderer.updateQuantumManager(); }
|
public void setQuantumStrategy(int family, double coefficient, int bitResolution) { RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rd.setQuantumDef(newQd); renderer.updateQuantumManager(); }
| 3,240,110 |
public void setRGBA(int red, int green, int blue, int alpha) { verifyColorComponent(red); verifyColorComponent(green); verifyColorComponent(blue); verifyColorComponent(alpha); rgba[0] = red; rgba[1] = green; rgba[2] = blue; rgba[3] = alpha; }
|
public void setRGBA(int red, int green, int blue, int alpha) { verifyColorComponent(red); verifyColorComponent(green); verifyColorComponent(blue); verifyColorComponent(alpha); rgba[0] = red; rgba[1] = green; rgba[2] = blue; rgba[3] = alpha; }
| 3,240,111 |
private void divideLabel () { int width; int startPos; int currentPos; int lastPos; int endPos; line.clear (); FontMetrics fm = this.getFontMetrics (this.getFont ()); startPos = 0; currentPos = startPos; lastPos = currentPos; endPos = (labelText.length () - 1); while (currentPos < endPos) { width = 0; // ---------------------------------------------------------------- // find the first substring that occupies more than the granted space. // Break at the end of the string or a line break // ---------------------------------------------------------------- while ( (width < maxAllowed) && (currentPos < endPos) && (labelText.charAt (currentPos) != NEW_LINE)) { lastPos = currentPos; currentPos = getPosition (labelText, currentPos, WHITE_SPACE, FOUND); width = fm.stringWidth (labelText.substring (startPos, currentPos)); } // ---------------------------------------------------------------- // if we have a line break we want to copy everything up to currentPos // ---------------------------------------------------------------- if (labelText.charAt (currentPos) == NEW_LINE) { lastPos = currentPos; } // ---------------------------------------------------------------- // if we are at the end of the string we want to copy everything up to // the last character. Since there seems to be a problem to get the last // character if the substring definition ends at the very last character // we have to call a different substring function than normal. // ---------------------------------------------------------------- if (currentPos == endPos) { lastPos = currentPos; String s = new String (labelText.substring (startPos)); line.addElement (s); } // ---------------------------------------------------------------- // in all other cases copy the substring that we have found to fit and // add it as a new line of text to the line vector. // ---------------------------------------------------------------- else { // ------------------------------------------------------------ // make sure it's not a single word. If so we must break it at the // proper location. // ------------------------------------------------------------ if (lastPos == startPos) { lastPos = startPos + breakWord (labelText.substring (startPos, currentPos), fm); } String s = new String (labelText.substring (startPos, lastPos)); line.addElement (s); } // ---------------------------------------------------------------- // seek for the end of the white space to cut out any unnecessary spaces // and tabs and set the new start condition. // ---------------------------------------------------------------- startPos = getPosition (labelText, lastPos, SPACES, NOT_FOUND); currentPos = startPos; } numLines = line.size (); lineWidth = new int [numLines]; }
|
private void divideLabel () { int width; int startPos; int currentPos; int lastPos; int endPos; line.clear (); FontMetrics fm = this.getFontMetrics (this.getFont ()); startPos = 0; currentPos = startPos; lastPos = currentPos; endPos = (labelText.length () - 1); while (currentPos < endPos) { width = 0; // ---------------------------------------------------------------- // find the first substring that occupies more than the granted space. // Break at the end of the string or a line break // ---------------------------------------------------------------- while ( (width < maxAllowed) && (currentPos < endPos) && (labelText.charAt (currentPos) != NEW_LINE)) { lastPos = currentPos; currentPos = getPosition (labelText, currentPos, WHITE_SPACE, FOUND); width = fm.stringWidth (labelText.substring (startPos, currentPos)); } // ---------------------------------------------------------------- // if we have a line break we want to copy everything up to currentPos // ---------------------------------------------------------------- if (labelText.charAt (currentPos) == NEW_LINE) { lastPos = currentPos; } // ---------------------------------------------------------------- // if we are at the end of the string we want to copy everything up to // the last character. Since there seems to be a problem to get the last // character if the substring definition ends at the very last character // we have to call a different substring function than normal. // ---------------------------------------------------------------- if (currentPos == endPos) { lastPos = currentPos; String s = labelText.substring (startPos); line.addElement (s); } // ---------------------------------------------------------------- // in all other cases copy the substring that we have found to fit and // add it as a new line of text to the line vector. // ---------------------------------------------------------------- else { // ------------------------------------------------------------ // make sure it's not a single word. If so we must break it at the // proper location. // ------------------------------------------------------------ if (lastPos == startPos) { lastPos = startPos + breakWord (labelText.substring (startPos, currentPos), fm); } String s = new String (labelText.substring (startPos, lastPos)); line.addElement (s); } // ---------------------------------------------------------------- // seek for the end of the white space to cut out any unnecessary spaces // and tabs and set the new start condition. // ---------------------------------------------------------------- startPos = getPosition (labelText, lastPos, SPACES, NOT_FOUND); currentPos = startPos; } numLines = line.size (); lineWidth = new int [numLines]; }
| 3,240,112 |
private void divideLabel () { int width; int startPos; int currentPos; int lastPos; int endPos; line.clear (); FontMetrics fm = this.getFontMetrics (this.getFont ()); startPos = 0; currentPos = startPos; lastPos = currentPos; endPos = (labelText.length () - 1); while (currentPos < endPos) { width = 0; // ---------------------------------------------------------------- // find the first substring that occupies more than the granted space. // Break at the end of the string or a line break // ---------------------------------------------------------------- while ( (width < maxAllowed) && (currentPos < endPos) && (labelText.charAt (currentPos) != NEW_LINE)) { lastPos = currentPos; currentPos = getPosition (labelText, currentPos, WHITE_SPACE, FOUND); width = fm.stringWidth (labelText.substring (startPos, currentPos)); } // ---------------------------------------------------------------- // if we have a line break we want to copy everything up to currentPos // ---------------------------------------------------------------- if (labelText.charAt (currentPos) == NEW_LINE) { lastPos = currentPos; } // ---------------------------------------------------------------- // if we are at the end of the string we want to copy everything up to // the last character. Since there seems to be a problem to get the last // character if the substring definition ends at the very last character // we have to call a different substring function than normal. // ---------------------------------------------------------------- if (currentPos == endPos) { lastPos = currentPos; String s = new String (labelText.substring (startPos)); line.addElement (s); } // ---------------------------------------------------------------- // in all other cases copy the substring that we have found to fit and // add it as a new line of text to the line vector. // ---------------------------------------------------------------- else { // ------------------------------------------------------------ // make sure it's not a single word. If so we must break it at the // proper location. // ------------------------------------------------------------ if (lastPos == startPos) { lastPos = startPos + breakWord (labelText.substring (startPos, currentPos), fm); } String s = new String (labelText.substring (startPos, lastPos)); line.addElement (s); } // ---------------------------------------------------------------- // seek for the end of the white space to cut out any unnecessary spaces // and tabs and set the new start condition. // ---------------------------------------------------------------- startPos = getPosition (labelText, lastPos, SPACES, NOT_FOUND); currentPos = startPos; } numLines = line.size (); lineWidth = new int [numLines]; }
|
private void divideLabel () { int width; int startPos; int currentPos; int lastPos; int endPos; line.clear (); FontMetrics fm = this.getFontMetrics (this.getFont ()); startPos = 0; currentPos = startPos; lastPos = currentPos; endPos = (labelText.length () - 1); while (currentPos < endPos) { width = 0; // ---------------------------------------------------------------- // find the first substring that occupies more than the granted space. // Break at the end of the string or a line break // ---------------------------------------------------------------- while ( (width < maxAllowed) && (currentPos < endPos) && (labelText.charAt (currentPos) != NEW_LINE)) { lastPos = currentPos; currentPos = getPosition (labelText, currentPos, WHITE_SPACE, FOUND); width = fm.stringWidth (labelText.substring (startPos, currentPos)); } // ---------------------------------------------------------------- // if we have a line break we want to copy everything up to currentPos // ---------------------------------------------------------------- if (labelText.charAt (currentPos) == NEW_LINE) { lastPos = currentPos; } // ---------------------------------------------------------------- // if we are at the end of the string we want to copy everything up to // the last character. Since there seems to be a problem to get the last // character if the substring definition ends at the very last character // we have to call a different substring function than normal. // ---------------------------------------------------------------- if (currentPos == endPos) { lastPos = currentPos; String s = new String (labelText.substring (startPos)); line.addElement (s); } // ---------------------------------------------------------------- // in all other cases copy the substring that we have found to fit and // add it as a new line of text to the line vector. // ---------------------------------------------------------------- else { // ------------------------------------------------------------ // make sure it's not a single word. If so we must break it at the // proper location. // ------------------------------------------------------------ if (lastPos == startPos) { lastPos = startPos + breakWord (labelText.substring (startPos, currentPos), fm); } String s = labelText.substring (startPos, lastPos); line.addElement (s); } // ---------------------------------------------------------------- // seek for the end of the white space to cut out any unnecessary spaces // and tabs and set the new start condition. // ---------------------------------------------------------------- startPos = getPosition (labelText, lastPos, SPACES, NOT_FOUND); currentPos = startPos; } numLines = line.size (); lineWidth = new int [numLines]; }
| 3,240,113 |
public FinishPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); vs = new VariableSubstitutor(idata.getVariableValueMap()); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels centerPanel.add(Box.createVerticalStrut(20)); infoLabel = new JLabel("", parent.icons.getImageIcon("information"), JLabel.TRAILING); }
|
public FinishPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); vs = new VariableSubstitutor(idata.getVariableValueMap()); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels centerPanel.add(Box.createVerticalStrut(20)); infoLabel = new JLabel("", parent.icons.getImageIcon("information"), JLabel.TRAILING); }
| 3,240,114 |
public void panelActivate() { parent.lockNextButton(); parent.lockPrevButton(); if (idata.installSuccess) { // We prepare a message for the uninstaller feature String home = ""; home = System.getProperty("user.home"); String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; // We set the information infoLabel.setText(parent.langpack.getString("FinishPanel.success")); centerPanel.add(Box.createVerticalStrut(20)); centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.uninst.info"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING)); // We add the autoButton centerPanel.add(Box.createVerticalStrut(20)); autoButton = new HighlightJButton(parent.langpack.getString("FinishPanel.auto"), parent.icons.getImageIcon("edit"), idata.buttonsHColor); autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip")); autoButton.addActionListener(this); centerPanel.add(autoButton); } else infoLabel.setText(parent.langpack.getString("FinishPanel.fail")); }
|
publicvoidpanelActivate(){parent.lockNextButton();parent.lockPrevButton();if(idata.installSuccess){//WeprepareamessagefortheuninstallerfeatureStringhome="";home=System.getProperty("user.home");Stringpath=translatePath("$INSTALL_PATH")+File.separator+"Uninstaller";//WesettheinformationinfoLabel.setText(parent.langpack.getString("FinishPanel.success"));centerPanel.add(Box.createVerticalStrut(20));centerPanel.add(newJLabel(parent.langpack.getString("FinishPanel.uninst.info"),parent.icons.getImageIcon("information"),JLabel.TRAILING));centerPanel.add(newJLabel(path,parent.icons.getImageIcon("empty"),JLabel.TRAILING));//WeaddtheautoButtoncenterPanel.add(Box.createVerticalStrut(20));autoButton=newHighlightJButton(parent.langpack.getString("FinishPanel.auto"),parent.icons.getImageIcon("edit"),idata.buttonsHColor);autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip"));autoButton.addActionListener(this);centerPanel.add(autoButton);}elseinfoLabel.setText(parent.langpack.getString("FinishPanel.fail"));}
| 3,240,115 |
public void panelActivate() { parent.lockNextButton(); parent.lockPrevButton(); if (idata.installSuccess) { // We prepare a message for the uninstaller feature String home = ""; home = System.getProperty("user.home"); String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; // We set the information infoLabel.setText(parent.langpack.getString("FinishPanel.success")); centerPanel.add(Box.createVerticalStrut(20)); centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.uninst.info"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING)); // We add the autoButton centerPanel.add(Box.createVerticalStrut(20)); autoButton = new HighlightJButton(parent.langpack.getString("FinishPanel.auto"), parent.icons.getImageIcon("edit"), idata.buttonsHColor); autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip")); autoButton.addActionListener(this); centerPanel.add(autoButton); } else infoLabel.setText(parent.langpack.getString("FinishPanel.fail")); }
|
public void panelActivate() { parent.lockNextButton(); parent.lockPrevButton(); if (idata.installSuccess) { // We prepare a message for the uninstaller feature String home = ""; home = System.getProperty("user.home"); String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; // We set the information centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.success"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(Box.createVerticalStrut(20)); centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.uninst.info"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING)); // We add the autoButton centerPanel.add(Box.createVerticalStrut(20)); autoButton = new HighlightJButton(parent.langpack.getString("FinishPanel.auto"), parent.icons.getImageIcon("edit"), idata.buttonsHColor); autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip")); autoButton.addActionListener(this); centerPanel.add(autoButton); } else infoLabel.setText(parent.langpack.getString("FinishPanel.fail")); }
| 3,240,116 |
public void panelActivate() { parent.lockNextButton(); parent.lockPrevButton(); if (idata.installSuccess) { // We prepare a message for the uninstaller feature String home = ""; home = System.getProperty("user.home"); String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; // We set the information infoLabel.setText(parent.langpack.getString("FinishPanel.success")); centerPanel.add(Box.createVerticalStrut(20)); centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.uninst.info"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING)); // We add the autoButton centerPanel.add(Box.createVerticalStrut(20)); autoButton = new HighlightJButton(parent.langpack.getString("FinishPanel.auto"), parent.icons.getImageIcon("edit"), idata.buttonsHColor); autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip")); autoButton.addActionListener(this); centerPanel.add(autoButton); } else infoLabel.setText(parent.langpack.getString("FinishPanel.fail")); }
|
public void panelActivate() { parent.lockNextButton(); parent.lockPrevButton(); if (idata.installSuccess) { // We prepare a message for the uninstaller feature String home = ""; home = System.getProperty("user.home"); String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; // We set the information infoLabel.setText(parent.langpack.getString("FinishPanel.success")); centerPanel.add(Box.createVerticalStrut(20)); centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.uninst.info"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING)); // We add the autoButton centerPanel.add(Box.createVerticalStrut(20)); autoButton = new HighlightJButton(parent.langpack.getString("FinishPanel.auto"), parent.icons.getImageIcon("edit"), idata.buttonsHColor); autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip")); autoButton.addActionListener(this); centerPanel.add(autoButton); } else centerPanel.add(new JLabel(parent.langpack.getString("FinishPanel.fail"), parent.icons.getImageIcon("information"), JLabel.TRAILING)); }
| 3,240,117 |
public synchronized static final RegistryHandler getInstance() { if (!initialized) { try { // Load the system dependant handler. registryHandler = (RegistryHandler) (TargetFactory.getInstance() .makeObject("com.izforge.izpack.util.os.RegistryHandler")); // Switch to the default handler to use one for complete logging. registryHandler = registryHandler.getDefaultHandler(); } catch (Throwable exception) { registryHandler = null; // } initialized = true; } if (registryHandler != null && (!registryHandler.good() || !registryHandler.doPerform())) registryHandler = null; return (registryHandler); }
|
public synchronized static RegistryHandler getInstance() { if (!initialized) { try { // Load the system dependant handler. registryHandler = (RegistryHandler) (TargetFactory.getInstance() .makeObject("com.izforge.izpack.util.os.RegistryHandler")); // Switch to the default handler to use one for complete logging. registryHandler = registryHandler.getDefaultHandler(); } catch (Throwable exception) { registryHandler = null; // } initialized = true; } if (registryHandler != null && (!registryHandler.good() || !registryHandler.doPerform())) registryHandler = null; return (registryHandler); }
| 3,240,118 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,119 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker(idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,120 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,121 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,122 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel(); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,123 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,124 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,125 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,126 |
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
|
public ProcessPanel(InstallerFrame parent, InstallData idata) throws IOException { super(parent, idata); this.worker = new ProcessPanelWorker (idata, this); JLabel heading = new JLabel(); Font font = heading.getFont (); font = font.deriveFont (Font.BOLD, font.getSize()*2.0f); heading.setFont(font); heading.setHorizontalAlignment(SwingConstants.CENTER); heading.setText(parent.langpack.getString ("ProcessPanel.heading")); heading.setVerticalAlignment(SwingConstants.TOP); setLayout (new BorderLayout ()); add (heading, BorderLayout.NORTH); // put everything but the heading into it's own panel // (to center it vertically) JPanel subpanel = new JPanel (); subpanel.setAlignmentX(0.5f); subpanel.setLayout(new BoxLayout (subpanel, BoxLayout.Y_AXIS)); this.processLabel = new JLabel (); this.processLabel.setAlignmentX(0.5f); this.processLabel.setText (" "); subpanel.add (this.processLabel); this.overallProgressBar = new JProgressBar (); this.overallProgressBar.setAlignmentX(0.5f); this.overallProgressBar.setStringPainted(true); subpanel.add (this.overallProgressBar); this.outputPane = new JTextArea (); this.outputPane.setEditable(false); this.outputScrollPane = new JScrollPane (this.outputPane); subpanel.add (this.outputScrollPane); add (subpanel, BorderLayout.CENTER); }
| 3,240,127 |
public void finishProcess () { }
|
public void finishProcess() { }
| 3,240,128 |
public void finishProcessing () { overallProgressBar.setValue (this.noOfJobs); String no_of_jobs = Integer.toString (this.noOfJobs); overallProgressBar.setString (no_of_jobs + " / " + no_of_jobs); overallProgressBar.setEnabled (false); processLabel.setText(" "); processLabel.setEnabled(false); validated = true; idata.installSuccess = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
|
public void finishProcessing() { overallProgressBar.setValue (this.noOfJobs); String no_of_jobs = Integer.toString (this.noOfJobs); overallProgressBar.setString (no_of_jobs + " / " + no_of_jobs); overallProgressBar.setEnabled (false); processLabel.setText(" "); processLabel.setEnabled(false); validated = true; idata.installSuccess = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
| 3,240,129 |
public void finishProcessing () { overallProgressBar.setValue (this.noOfJobs); String no_of_jobs = Integer.toString (this.noOfJobs); overallProgressBar.setString (no_of_jobs + " / " + no_of_jobs); overallProgressBar.setEnabled (false); processLabel.setText(" "); processLabel.setEnabled(false); validated = true; idata.installSuccess = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
|
public void finishProcessing () { overallProgressBar.setValue (this.noOfJobs); String no_of_jobs = Integer.toString (this.noOfJobs); overallProgressBar.setString (no_of_jobs + " / " + no_of_jobs); overallProgressBar.setEnabled (false); processLabel.setText(" "); processLabel.setEnabled(false); validated = true; idata.installSuccess = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
| 3,240,130 |
public void logOutput (String message, boolean stderr) { // TODO: make it colored this.outputPane.append(message+'\n'); }
|
public void logOutput(String message, boolean stderr) { // TODO: make it colored this.outputPane.append(message+'\n'); }
| 3,240,131 |
public void logOutput (String message, boolean stderr) { // TODO: make it colored this.outputPane.append(message+'\n'); }
|
public void logOutput (String message, boolean stderr) { // TODO: make it colored this.outputPane.append(message + '\n'); }
| 3,240,132 |
public void makeXMLData (XMLElement panelRoot) { // does nothing (no state to save) }
|
public void makeXMLData(XMLElement panelRoot) { // does nothing (no state to save) }
| 3,240,133 |
public void panelActivate() { // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); this.worker.startThread(); }
|
public void panelActivate() { // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); this.worker.startThread(); }
| 3,240,134 |
public void panelActivate() { // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); this.worker.startThread(); }
|
public void panelActivate() { // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); this.worker.startThread(); }
| 3,240,135 |
public void startProcess (String jobName) { processLabel.setText (jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString (Integer.toString (this.currentJob) + " / " + Integer.toString (this.noOfJobs)); }
|
public void startProcess(String jobName) { processLabel.setText (jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString (Integer.toString (this.currentJob) + " / " + Integer.toString (this.noOfJobs)); }
| 3,240,136 |
public void startProcess (String jobName) { processLabel.setText (jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString (Integer.toString (this.currentJob) + " / " + Integer.toString (this.noOfJobs)); }
|
public void startProcess (String jobName) { processLabel.setText(jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString (Integer.toString (this.currentJob) + " / " + Integer.toString (this.noOfJobs)); }
| 3,240,137 |
public void startProcess (String jobName) { processLabel.setText (jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString (Integer.toString (this.currentJob) + " / " + Integer.toString (this.noOfJobs)); }
|
public void startProcess (String jobName) { processLabel.setText (jobName); this.currentJob++; overallProgressBar.setValue(this.currentJob); overallProgressBar.setString( Integer.toString(this.currentJob) + " / " + Integer.toString(this.noOfJobs)); }
| 3,240,138 |
public void startProcessing (int no_of_jobs) { this.noOfJobs = no_of_jobs; overallProgressBar.setMaximum (noOfJobs); parent.lockPrevButton(); }
|
public void startProcessing(int no_of_jobs) { this.noOfJobs = no_of_jobs; overallProgressBar.setMaximum (noOfJobs); parent.lockPrevButton(); }
| 3,240,139 |
public void startProcessing (int no_of_jobs) { this.noOfJobs = no_of_jobs; overallProgressBar.setMaximum (noOfJobs); parent.lockPrevButton(); }
|
public void startProcessing (int no_of_jobs) { this.noOfJobs = no_of_jobs; overallProgressBar.setMaximum(noOfJobs); parent.lockPrevButton(); }
| 3,240,140 |
public synchronized void changedUpdate(DocumentEvent e) { }
|
public void changedUpdate(DocumentEvent e) { }
| 3,240,141 |
public synchronized void keyReleased(KeyEvent e) { }
|
public void keyReleased(KeyEvent e) { }
| 3,240,142 |
public synchronized void postUpdateUI() { // this attempts to cleanup the damage done by updateComponentTreeUI requestFocus(); setCaret(getCaret()); select(outputMark, outputMark); }
|
public void postUpdateUI() { // this attempts to cleanup the damage done by updateComponentTreeUI requestFocus(); setCaret(getCaret()); select(outputMark, outputMark); }
| 3,240,143 |
public synchronized void postUpdateUI() { // this attempts to cleanup the damage done by updateComponentTreeUI requestFocus(); setCaret(getCaret()); select(outputMark, outputMark); }
|
public synchronized void postUpdateUI() { // this attempts to cleanup the damage done by updateComponentTreeUI requestFocus(); setCaret(getCaret()); synchronized(this) { select(outputMark, outputMark); } }
| 3,240,144 |
synchronized void returnPressed() { Document doc = getDocument(); int len = doc.getLength(); Segment segment = new Segment(); try { doc.getText(outputMark, len - outputMark, segment); } catch(javax.swing.text.BadLocationException ignored) { ignored.printStackTrace(); } if(segment.count > 0) { history.addElement(segment.toString()); } historyIndex = history.size(); inPipe.write(segment.array, segment.offset, segment.count); append("\n"); outputMark = doc.getLength(); inPipe.write("\n"); inPipe.flush(); console1.flush(); }
|
void returnPressed() { Document doc = getDocument(); int len = doc.getLength(); Segment segment = new Segment(); try { doc.getText(outputMark, len - outputMark, segment); } catch(javax.swing.text.BadLocationException ignored) { ignored.printStackTrace(); } if(segment.count > 0) { history.addElement(segment.toString()); } historyIndex = history.size(); inPipe.write(segment.array, segment.offset, segment.count); append("\n"); outputMark = doc.getLength(); inPipe.write("\n"); inPipe.flush(); console1.flush(); }
| 3,240,145 |
synchronized void returnPressed() { Document doc = getDocument(); int len = doc.getLength(); Segment segment = new Segment(); try { doc.getText(outputMark, len - outputMark, segment); } catch(javax.swing.text.BadLocationException ignored) { ignored.printStackTrace(); } if(segment.count > 0) { history.addElement(segment.toString()); } historyIndex = history.size(); inPipe.write(segment.array, segment.offset, segment.count); append("\n"); outputMark = doc.getLength(); inPipe.write("\n"); inPipe.flush(); console1.flush(); }
|
synchronized void returnPressed() { Document doc = getDocument(); int len = doc.getLength(); Segment segment = new Segment(); try { doc.getText(outputMark, len - outputMark, segment); } catch(javax.swing.text.BadLocationException ignored) { ignored.printStackTrace(); } if(segment.count > 0) { history.addElement(segment.toString()); } historyIndex = history.size(); inPipe.write(segment.array, segment.offset, segment.count); append("\n"); synchronized(doc) { outputMark = doc.getLength(); } inPipe.write("\n"); inPipe.flush(); console1.flush(); }
| 3,240,146 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = ").append(path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,147 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = ").append(mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,148 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = ").append(type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,149 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = ").append(executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,150 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = ").append(onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,151 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: ").append(argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,152 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: ").append(argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,153 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = ").append(osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,154 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: ").append(osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,155 |
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = " + keepFile); retval.append("\n"); return retval.toString(); }
|
public String toString() { StringBuffer retval = new StringBuffer(); retval.append("path = " + path); retval.append("\n"); retval.append("mainClass = " + mainClass); retval.append("\n"); retval.append("type = " + type); retval.append("\n"); retval.append("executionStage = " + executionStage); retval.append("\n"); retval.append("onFailure = " + onFailure); retval.append("\n"); retval.append("argList: " + argList); retval.append("\n"); if (argList != null) { for (int i = 0; i < argList.size(); i++) { retval.append("\targ: " + argList.get(i)); retval.append("\n"); } } retval.append("\n"); retval.append("osList = " + osList); retval.append("\n"); if (osList != null) { for (int i = 0; i < osList.size(); i++) { retval.append("\tos: " + osList.get(i)); retval.append("\n"); } } retval.append("keepFile = ").append(keepFile); retval.append("\n"); return retval.toString(); }
| 3,240,156 |
public abstract Object makeObject(Object key);
|
public abstract Object makeObject(Object key);
| 3,240,157 |
public void actionPerformed (ActionEvent event) { Object eventSource = event.getSource (); // ---------------------------------------------------- // create shortcut for the current user was selected // refresh the list of program groups accordingly and // reset the program group to the default setting. // ---------------------------------------------------- if (eventSource.equals (currentUser)) { groupList.setListData (shortcut.getProgramGroups (Shortcut.CURRENT_USER)); programGroup.setText (suggestedProgramGroup); shortcut.setUserType (Shortcut.CURRENT_USER); } // ---------------------------------------------------- // create shortcut for all users was selected // refresh the list of program groups accordingly and // reset the program group to the default setting. // ---------------------------------------------------- else if (eventSource.equals (allUsers)) { groupList.setListData (shortcut.getProgramGroups (Shortcut.ALL_USERS)); programGroup.setText (suggestedProgramGroup); shortcut.setUserType (Shortcut.ALL_USERS); } // ---------------------------------------------------- // The create button was pressed. // go ahead and create the shortcut(s) // ---------------------------------------------------- else if (eventSource.equals (createButton)) { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); // when finished unlock the next button and lock // the previous button parent.unlockNextButton (); parent.lockPrevButton (); } // ---------------------------------------------------- // The reset button was pressed. // - clear the selection in the list box, because the // selection is no longer valid // - refill the program group edit control with the // suggested program group name // ---------------------------------------------------- else if (eventSource.equals (defaultButton)) { groupList.getSelectionModel ().clearSelection (); programGroup.setText (suggestedProgramGroup); } // ---------------------------------------------------- // the save button was pressed. This is a request to // save shortcut information to a text file. // ---------------------------------------------------- else if (eventSource.equals (saveButton)) { saveToFile (); // add the file to the uninstaller addToUninstaller (); } }
|
public void actionPerformed (ActionEvent event) { Object eventSource = event.getSource (); // ---------------------------------------------------- // create shortcut for the current user was selected // refresh the list of program groups accordingly and // reset the program group to the default setting. // ---------------------------------------------------- if (eventSource.equals (currentUser)) { groupList.setListData (shortcut.getProgramGroups (Shortcut.CURRENT_USER)); programGroup.setText (suggestedProgramGroup); shortcut.setUserType (Shortcut.CURRENT_USER); } // ---------------------------------------------------- // create shortcut for all users was selected // refresh the list of program groups accordingly and // reset the program group to the default setting. // ---------------------------------------------------- else if (eventSource.equals (allUsers)) { groupList.setListData (shortcut.getProgramGroups (Shortcut.ALL_USERS)); programGroup.setText (suggestedProgramGroup); shortcut.setUserType (Shortcut.ALL_USERS); } // ---------------------------------------------------- // The create button was pressed. // go ahead and create the shortcut(s) // ---------------------------------------------------- else if (eventSource.equals (createButton)) { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); // when finished unlock the next button and lock // the previous button parent.lockPrevButton (); } // ---------------------------------------------------- // The reset button was pressed. // - clear the selection in the list box, because the // selection is no longer valid // - refill the program group edit control with the // suggested program group name // ---------------------------------------------------- else if (eventSource.equals (defaultButton)) { groupList.getSelectionModel ().clearSelection (); programGroup.setText (suggestedProgramGroup); } // ---------------------------------------------------- // the save button was pressed. This is a request to // save shortcut information to a text file. // ---------------------------------------------------- else if (eventSource.equals (saveButton)) { saveToFile (); // add the file to the uninstaller addToUninstaller (); } }
| 3,240,158 |
public void panelActivate () { analyzeShortcutSpec (); if (shortcutsToCreate) { if (shortcut.supported () && !simulteNotSupported) { parent.lockNextButton (); buildUI (shortcut.getProgramGroups (ShellLink.CURRENT_USER), true); // always start out with the current user } else { buildAlternateUI (); parent.unlockNextButton (); parent.lockPrevButton (); } } else { parent.skipPanel (); } }
|
public void panelActivate () { analyzeShortcutSpec (); if (shortcutsToCreate) { if (shortcut.supported () && !simulteNotSupported) { buildUI (shortcut.getProgramGroups (ShellLink.CURRENT_USER), true); // always start out with the current user } else { buildAlternateUI (); parent.unlockNextButton (); parent.lockPrevButton (); } } else { parent.skipPanel (); } }
| 3,240,159 |
public RuleTextField(int digits, int editLength, int type, boolean unlimitedEdit, Toolkit toolkit) { super(digits + 1); columns = digits; this.toolkit = toolkit; this.editLength = editLength; this.unlimitedEdit = unlimitedEdit; rule = new Rule(); rule.setRuleType(type, editLength, unlimitedEdit); setDocument(rule); }
|
public RuleTextField(int digits, int editLength, int type, boolean unlimitedEdit, Toolkit toolkit) { super(digits + 1); columns = digits; this.toolkit = toolkit; this.editLength = editLength; this.unlimitedEdit = unlimitedEdit; rule = new Rule(); rule.setRuleType(type, editLength, unlimitedEdit); setDocument(rule); }
| 3,240,161 |
public RuleTextField(int digits, int editLength, int type, boolean unlimitedEdit, Toolkit toolkit) { super(digits + 1); columns = digits; this.toolkit = toolkit; this.editLength = editLength; this.unlimitedEdit = unlimitedEdit; rule = new Rule(); rule.setRuleType(type, editLength, unlimitedEdit); setDocument(rule); }
|
public RuleTextField(int digits, int editLength, int type, boolean unlimitedEdit, Toolkit toolkit) { super(digits + 1); columns = digits; this.toolkit = toolkit; this.editLength = editLength; this.unlimitedEdit = unlimitedEdit; Rule rule = new Rule(); rule.setRuleType(type, editLength, unlimitedEdit); setDocument(rule); }
| 3,240,162 |
protected Document createDefaultModel() { rule = new Rule(); return (rule); }
|
protected Document createDefaultModel() { Rule rule = new Rule(); return (rule); }
| 3,240,163 |
public TargetPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // load the default directory info (if present) loadDefaultDir(); if (defaultDir != null) // override the system default that uses app name (which is set in the Installer class) idata.setInstallPath(defaultDir); // We create and put the components infoLabel = new JLabel(parent.langpack.getString("TargetPanel.info"), parent.icons.getImageIcon("home"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 3.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textField = new JTextField(idata.getInstallPath(), 40); textField.addActionListener(this); parent.buildConstraints(gbConstraints, 0, 1, 1, 1, 3.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(textField, gbConstraints); add(textField); browseButton = ButtonFactory.createButton(parent.langpack.getString("TargetPanel.browse"), parent.icons.getImageIcon("open"), idata.buttonsHColor); browseButton.addActionListener(this); parent.buildConstraints(gbConstraints, 1, 1, 1, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(browseButton, gbConstraints); add(browseButton); }
|
public TargetPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // load the default directory info (if present) loadDefaultDir(); if (defaultDir != null) // override the system default that uses app name (which is set in the Installer class) idata.setInstallPath(defaultDir); // We create and put the components infoLabel = new JLabel(parent.langpack.getString("TargetPanel.info"), parent.icons.getImageIcon("home"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 3.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textField = new JTextField(idata.getInstallPath(), 40); textField.addActionListener(this); parent.buildConstraints(gbConstraints, 0, 1, 1, 1, 3.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(textField, gbConstraints); add(textField); browseButton = ButtonFactory.createButton(parent.langpack.getString("TargetPanel.browse"), parent.icons.getImageIcon("open"), idata.buttonsHColor); browseButton.addActionListener(this); parent.buildConstraints(gbConstraints, 1, 1, 1, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(browseButton, gbConstraints); add(browseButton); }
| 3,240,164 |
public TargetPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // load the default directory info (if present) loadDefaultDir(); if (defaultDir != null) // override the system default that uses app name (which is set in the Installer class) idata.setInstallPath(defaultDir); // We create and put the components infoLabel = new JLabel(parent.langpack.getString("TargetPanel.info"), parent.icons.getImageIcon("home"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 3.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textField = new JTextField(idata.getInstallPath(), 40); textField.addActionListener(this); parent.buildConstraints(gbConstraints, 0, 1, 1, 1, 3.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(textField, gbConstraints); add(textField); browseButton = ButtonFactory.createButton(parent.langpack.getString("TargetPanel.browse"), parent.icons.getImageIcon("open"), idata.buttonsHColor); browseButton.addActionListener(this); parent.buildConstraints(gbConstraints, 1, 1, 1, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(browseButton, gbConstraints); add(browseButton); }
|
public TargetPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // load the default directory info (if present) loadDefaultDir(); if (defaultDir != null) // override the system default that uses app name (which is set in the Installer class) idata.setInstallPath(defaultDir); // We create and put the components infoLabel = new JLabel(parent.langpack.getString("TargetPanel.info"), parent.icons.getImageIcon("home"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 3.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textField = new JTextField(idata.getInstallPath(), 40); textField.addActionListener(this); parent.buildConstraints(gbConstraints, 0, 1, 1, 1, 3.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(textField, gbConstraints); add(textField); browseButton = ButtonFactory.createButton(parent.langpack.getString("TargetPanel.browse"), parent.icons.getImageIcon("open"), idata.buttonsHColor); browseButton.addActionListener(this); parent.buildConstraints(gbConstraints, 1, 1, 1, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(browseButton, gbConstraints); add(browseButton); }
| 3,240,165 |
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
|
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
| 3,240,166 |
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
|
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
| 3,240,167 |
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
|
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
| 3,240,168 |
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
|
public boolean isValidated() { String installPath = textField.getText(); boolean ok = true; // We put a warning if the specified target is nameless if (installPath.length() == 0) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.empty_target"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } if (!ok) return ok; // Normalize the path File path = new File(installPath); installPath = path.toString(); // We put a warning if the directory exists else we warn that it will be created if (path.exists()) { int res = JOptionPane.showConfirmDialog(this, parent.langpack.getString("TargetPanel.warn"), parent.langpack.getString("installer.warning"), JOptionPane.YES_NO_OPTION); ok = (res == JOptionPane.YES_OPTION); } else JOptionPane.showMessageDialog(this, parent.langpack.getString("TargetPanel.createdir") + "\n" + installPath); idata.setInstallPath(installPath); return ok; }
| 3,240,169 |
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
|
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
| 3,240,170 |
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
|
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
| 3,240,171 |
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
|
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
| 3,240,172 |
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
|
public void loadDefaultDir() { BufferedReader br = null; try { String os = System.getProperty("os.name"); InputStream in = null; if (os.regionMatches(true, 0, "windows", 0, 7)) in = parent.getResource("TargetPanel.dir.windows"); else if (os.regionMatches(true, 0, "mac os x", 0, 8)) in = parent.getResource("TargetPanel.dir.macosx"); else if (os.regionMatches(true, 0, "mac", 0, 3)) in = parent.getResource("TargetPanel.dir.mac"); else { // first try to look up by specific os name os.replace(' ', '_');// avoid spaces in file names os = os.toLowerCase();// for consistency among TargetPanel res files in = parent.getResource("TargetPanel.dir.".concat(os)); // if not specific os, try getting generic 'unix' resource file if (in == null) in = parent.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) in = parent.getResource("TargetPanel.dir"); } // if all above tests failed, there is no resource file, // so use system default if (in == null) return; // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!line.equals("")) break; } defaultDir = line; } catch (Exception e) { defaultDir = null;// leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
| 3,240,173 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.