/** adds a found scan to a seleceted lost package */ private void buttonSetFoundActionPerformed(ActionEvent event) { int index = jListPackages.getSelectedIndex(); if (index >= 0) { Package p = this.packages.get(index); if (p.lastScan().event == ScanEvents.lost) { p.scan(ScanEvents.found, this.user); this.packages.remove(p); this.jListPackages.setListData(new Vector(this.packages)); jListScans.setListData(new Vector()); } } }
public void init(GLAutoDrawable glAutoDrawable) { StringBuilder sb = new StringBuilder(); sb.append(gov.nasa.worldwind.Version.getVersion() + "\n"); sb.append("\nSystem Properties\n"); sb.append("Processors: " + Runtime.getRuntime().availableProcessors() + "\n"); sb.append("Free memory: " + Runtime.getRuntime().freeMemory() + " bytes\n"); sb.append("Max memory: " + Runtime.getRuntime().maxMemory() + " bytes\n"); sb.append("Total memory: " + Runtime.getRuntime().totalMemory() + " bytes\n"); for (Map.Entry prop : System.getProperties().entrySet()) { sb.append(prop.getKey() + " = " + prop.getValue() + "\n"); } GL gl = glAutoDrawable.getGL(); sb.append("\nOpenGL Values\n"); String oglVersion = gl.glGetString(GL.GL_VERSION); sb.append("OpenGL version: " + oglVersion + "\n"); String oglVendor = gl.glGetString(GL.GL_VENDOR); sb.append("OpenGL vendor: " + oglVendor + "\n"); String oglRenderer = gl.glGetString(GL.GL_RENDERER); sb.append("OpenGL renderer: " + oglRenderer + "\n"); int[] intVals = new int[2]; for (Attr attr : attrs) { sb.append(attr.name).append(": "); if (attr.attr instanceof Integer) { gl.glGetIntegerv((Integer) attr.attr, intVals, 0); sb.append(intVals[0]).append(intVals[1] > 0 ? ", " + intVals[1] : ""); } sb.append("\n"); } String extensionString = gl.glGetString(GL.GL_EXTENSIONS); String[] extensions = extensionString.split(" "); sb.append("Extensions\n"); for (String ext : extensions) { sb.append(" " + ext + "\n"); } sb.append("\nJOGL Values\n"); String pkgName = "javax.media.opengl"; try { getClass().getClassLoader().loadClass(pkgName + ".GL"); Package p = Package.getPackage(pkgName); if (p == null) { sb.append("WARNING: Package.getPackage(" + pkgName + ") is null\n"); } else { sb.append(p + "\n"); sb.append("Specification Title = " + p.getSpecificationTitle() + "\n"); sb.append("Specification Vendor = " + p.getSpecificationVendor() + "\n"); sb.append("Specification Version = " + p.getSpecificationVersion() + "\n"); sb.append("Implementation Vendor = " + p.getImplementationVendor() + "\n"); sb.append("Implementation Version = " + p.getImplementationVersion() + "\n"); } } catch (ClassNotFoundException e) { sb.append("Unable to load " + pkgName + "\n"); } this.outputArea.setText(sb.toString()); }