added from java-adornments.txt:
174436
public Parameters addParameter(String name, boolean b) {
    addParameter().setName(name).setValue(new BooleanType(b));
    return this;
  }
1163651
public static void main(String[] args) throws IOException {
    if (args.length == 0){
      usage();
    }
    int ai=0;
    try {
      String encoding = null;
      String dict = null;
      while (args[ai].startsWith("-")) {
        if (args[ai].equals("-encoding")) {
          ai++;
          if (ai < args.length) {
            encoding = args[ai++];
          }
          else {
            usage();
          }
        }
        else if (args[ai].equals("-dict")) {
          ai++;
          if (ai < args.length) {
            dict = args[ai++];
          }
          else {
            usage();
          }
        }
        else {
          System.err.println("Unknown option "+args[ai]);
          usage();
        }
      }
      File inFile = new File(args[ai++]);
      File outFile = new File(args[ai++]);
      int cutoff = 5;
      int iterations = 100;
      if (args.length > ai) {
        cutoff = Integer.parseInt(args[ai++]);
        iterations = Integer.parseInt(args[ai++]);
      }
      GISModel mod;
      if (dict != null) {
        System.err.println("Building dictionary");
        MutableDictionary mdict = new MutableDictionary(cutoff);
        DataStream data = new ch.epfl.bbp.shaded.opennlp.maxent.PlainTextByLineDataStream(new java.io.FileReader(inFile));
        while(data.hasNext()) {
          String tagStr = (String) data.nextToken();
          String[] tt = tagStr.split(" ");
          String[] words = new String[tt.length];
          for (int wi=0;wi<words.length;wi++) {
            words[wi] = tt[wi].substring(0,tt[wi].lastIndexOf('_'));
          }
          mdict.add(words,1,true);
        }
        System.out.println("Saving the dictionary");
        mdict.persist(new File(dict));
      }
      EventStream es;
      if (encoding == null) {
        if (dict == null) {
          es = new POSEventStream(new PlainTextByLineDataStream(new InputStreamReader(new FileInputStream(inFile))));
        }
        else {
          es = new POSEventStream(new PlainTextByLineDataStream(new InputStreamReader(new FileInputStream(inFile))), new Dictionary(dict));
        }
      }
      else {
        if (dict == null) {
          es = new POSEventStream(new PlainTextByLineDataStream(new InputStreamReader(new FileInputStream(inFile),encoding)));
        }
        else {
          es = new POSEventStream(new PlainTextByLineDataStream(new InputStreamReader(new FileInputStream(inFile),encoding)), new Dictionary(dict));
        }
      }
      mod = train(es, iterations, cutoff);
      System.out.println("Saving the model as: " + outFile);
      new SuffixSensitiveGISModelWriter(mod, outFile).persist();

    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }
1152290
private void installClientDecorations(JRootPane root) {
        installBorder(root);
        if (root.getParent() instanceof JFrame || root.getParent() instanceof JDialog) {
            if (PlatformUtils.isMac()) {
                makeFrameBackgroundTransparent(root);
            } else {
                shapeWindow(root);
            }
        }

        JComponent titlePane = createTitlePane(root);

        setTitlePane(root, titlePane);
        installWindowListeners(root, root.getParent());
        installLayout(root);
        if (window != null) {
            root.revalidate();
            root.repaint();
        }
    }
194799
private Set<String> readFeatureNameList(String line) {
        String[] parts = FeatureDefinitionUtils.installedFeatureSplitPattern.split(line);
        return parts.length > 0 ? Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(parts))) : Collections.<String> emptySet();
    }
441866
protected void doFooter() throws DocumentException {
    	if (footer == null) return;
		// Begin added by Edgar Leonardo Prieto Perilla
    	// Avoid footer indentation
    	float tmpIndentLeft = indentation.indentLeft;
    	float tmpIndentRight = indentation.indentRight;
    	// Begin added: Bonf (Marc Schneider) 2003-07-29
        float tmpListIndentLeft = indentation.listIndentLeft;
        float tmpImageIndentLeft = indentation.imageIndentLeft;
        float tmpImageIndentRight = indentation.imageIndentRight;
        // End added: Bonf (Marc Schneider) 2003-07-29

        indentation.indentLeft = indentation.indentRight = 0;
        // Begin added: Bonf (Marc Schneider) 2003-07-29
        indentation.listIndentLeft = 0;
        indentation.imageIndentLeft = 0;
        indentation.imageIndentRight = 0;
        // End added: Bonf (Marc Schneider) 2003-07-29
        // End Added by Edgar Leonardo Prieto Perilla
        footer.setPageNumber(pageN);
        leading = footer.paragraph().getTotalLeading();
        add(footer.paragraph());
        // adding the footer limits the height
        indentation.indentBottom = currentHeight;
        text.moveText(left(), indentBottom());
        flushLines();
        text.moveText(-left(), -bottom());
        footer.setTop(bottom(currentHeight));
        footer.setBottom(bottom() - (0.75f * leading));
        footer.setLeft(left());
        footer.setRight(right());
        graphics.rectangle(footer);
        indentation.indentBottom = currentHeight + leading * 2;
        currentHeight = 0;
        // Begin added by Edgar Leonardo Prieto Perilla
        indentation.indentLeft = tmpIndentLeft;
        indentation.indentRight = tmpIndentRight;
        // Begin added: Bonf (Marc Schneider) 2003-07-29
        indentation.listIndentLeft = tmpListIndentLeft;
        indentation.imageIndentLeft = tmpImageIndentLeft;
        indentation.imageIndentRight = tmpImageIndentRight;
        // End added: Bonf (Marc Schneider) 2003-07-29
        // End added by Edgar Leonardo Prieto Perilla
    }
884989
@Override
    public void highlight(StringBuilder out, List<String> lines, String meta) {
        out.append("<pre");
        if (StringUtils.isNotBlank(meta)) {
            out.append(" class='brush:" + meta + "'");
        }
        out.append(">");
        for (String line : lines) {
            for (int i = 0; i < line.length(); i++) {
                final char c;
                switch (c = line.charAt(i)) {
                    case '&':
                        out.append("&amp;");
                        break;
                    case '<':
                        out.append("&lt;");
                        break;
                    case '>':
                        out.append("&gt;");
                        break;
                    default:
                        out.append(c);
                        break;
                }
            }
            out.append('\n');
        }
        out.append("</pre>");
    }
541395
private void loadStandardHtmlColors() {

		if (standardHtmlColorNames==null) {
			standardHtmlColorNames = new Hashtable<String,Color>();
			addStandardHtmlColor( "AliceBlue" 	, new Color(0xF0F8FF));
			addStandardHtmlColor( "AntiqueWhite" 	, new Color(0xFAEBD7));
			addStandardHtmlColor( "Aqua" 	, new Color(0x00FFFF));
			addStandardHtmlColor( "Aquamarine" 	, new Color(0x7FFFD4));
			addStandardHtmlColor( "Azure" 	, new Color(0xF0FFFF));
			addStandardHtmlColor( "Beige" 	, new Color(0xF5F5DC));
			addStandardHtmlColor( "Bisque" 	, new Color(0xFFE4C4));
			addStandardHtmlColor( "Black" 	, new Color(0x000000));
			addStandardHtmlColor( "BlanchedAlmond" 	, new Color(0xFFEBCD));
			addStandardHtmlColor( "Blue" 	, new Color(0x0000FF));
			addStandardHtmlColor( "BlueViolet" 	, new Color(0x8A2BE2));
			addStandardHtmlColor( "Brown" 	, new Color(0xA52A2A));
			addStandardHtmlColor( "BurlyWood" 	, new Color(0xDEB887));
			addStandardHtmlColor( "CadetBlue" 	, new Color(0x5F9EA0));
			addStandardHtmlColor( "Chartreuse" 	, new Color(0x7FFF00));
			addStandardHtmlColor( "Chocolate" 	, new Color(0xD2691E));
			addStandardHtmlColor( "Coral" 	, new Color(0xFF7F50));
			addStandardHtmlColor( "CornflowerBlue" 	, new Color(0x6495ED));
			addStandardHtmlColor( "Cornsilk" 	, new Color(0xFFF8DC));
			addStandardHtmlColor( "Crimson" 	, new Color(0xDC143C));
			addStandardHtmlColor( "Cyan" 	, new Color(0x00FFFF));
			addStandardHtmlColor( "DarkBlue" 	, new Color(0x00008B));
			addStandardHtmlColor( "DarkCyan" 	, new Color(0x008B8B));
			addStandardHtmlColor( "DarkGoldenRod" 	, new Color(0xB8860B));
			addStandardHtmlColor( "DarkGray" 	, new Color(0xA9A9A9));
			addStandardHtmlColor( "DarkGreen" 	, new Color(0x006400));
			addStandardHtmlColor( "DarkKhaki" 	, new Color(0xBDB76B));
			addStandardHtmlColor( "DarkMagenta" 	, new Color(0x8B008B));
			addStandardHtmlColor( "DarkOliveGreen" 	, new Color(0x556B2F));
			addStandardHtmlColor( "DarkOrange" 	, new Color(0xFF8C00));
			addStandardHtmlColor( "DarkOrchid" 	, new Color(0x9932CC));
			addStandardHtmlColor( "DarkRed" 	, new Color(0x8B0000));
			addStandardHtmlColor( "DarkSalmon" 	, new Color(0xE9967A));
			addStandardHtmlColor( "DarkSeaGreen" 	, new Color(0x8FBC8F));
			addStandardHtmlColor( "DarkSlateBlue" 	, new Color(0x483D8B));
			addStandardHtmlColor( "DarkSlateGray" 	, new Color(0x2F4F4F));
			addStandardHtmlColor( "DarkTurquoise" 	, new Color(0x00CED1));
			addStandardHtmlColor( "DarkViolet" 	, new Color(0x9400D3));
			addStandardHtmlColor( "DeepPink" 	, new Color(0xFF1493));
			addStandardHtmlColor( "DeepSkyBlue" 	, new Color(0x00BFFF));
			addStandardHtmlColor( "DimGray" 	, new Color(0x696969));
			addStandardHtmlColor( "DodgerBlue" 	, new Color(0x1E90FF));
			addStandardHtmlColor( "FireBrick" 	, new Color(0xB22222));
			addStandardHtmlColor( "FloralWhite" 	, new Color(0xFFFAF0));
			addStandardHtmlColor( "ForestGreen" 	, new Color(0x228B22));
			addStandardHtmlColor( "Fuchsia" 	, new Color(0xFF00FF));
			addStandardHtmlColor( "Gainsboro" 	, new Color(0xDCDCDC));
			addStandardHtmlColor( "GhostWhite" 	, new Color(0xF8F8FF));
			addStandardHtmlColor( "Gold" 	, new Color(0xFFD700));
			addStandardHtmlColor( "GoldenRod" 	, new Color(0xDAA520));
			addStandardHtmlColor( "Gray" 	, new Color(0x808080));
			addStandardHtmlColor( "Green" 	, new Color(0x008000));
			addStandardHtmlColor( "GreenYellow" 	, new Color(0xADFF2F));
			addStandardHtmlColor( "HoneyDew" 	, new Color(0xF0FFF0));
			addStandardHtmlColor( "HotPink" 	, new Color(0xFF69B4));
			addStandardHtmlColor( "IndianRed " 	, new Color(0xCD5C5C));
			addStandardHtmlColor( "Indigo " 	, new Color(0x4B0082));
			addStandardHtmlColor( "Ivory" 	, new Color(0xFFFFF0));
			addStandardHtmlColor( "Khaki" 	, new Color(0xF0E68C));
			addStandardHtmlColor( "Lavender" 	, new Color(0xE6E6FA));
			addStandardHtmlColor( "LavenderBlush" 	, new Color(0xFFF0F5));
			addStandardHtmlColor( "LawnGreen" 	, new Color(0x7CFC00));
			addStandardHtmlColor( "LemonChiffon" 	, new Color(0xFFFACD));
			addStandardHtmlColor( "LightBlue" 	, new Color(0xADD8E6));
			addStandardHtmlColor( "LightCoral" 	, new Color(0xF08080));
			addStandardHtmlColor( "LightCyan" 	, new Color(0xE0FFFF));
			addStandardHtmlColor( "LightGoldenRodYellow" 	, new Color(0xFAFAD2));
			addStandardHtmlColor( "LightGray" 	, new Color(0xD3D3D3));
			addStandardHtmlColor( "LightGreen" 	, new Color(0x90EE90));
			addStandardHtmlColor( "LightPink" 	, new Color(0xFFB6C1));
			addStandardHtmlColor( "LightSalmon" 	, new Color(0xFFA07A));
			addStandardHtmlColor( "LightSeaGreen" 	, new Color(0x20B2AA));
			addStandardHtmlColor( "LightSkyBlue" 	, new Color(0x87CEFA));
			addStandardHtmlColor( "LightSlateGray" 	, new Color(0x778899));
			addStandardHtmlColor( "LightSteelBlue" 	, new Color(0xB0C4DE));
			addStandardHtmlColor( "LightYellow" 	, new Color(0xFFFFE0));
			addStandardHtmlColor( "Lime" 	, new Color(0x00FF00));
			addStandardHtmlColor( "LimeGreen" 	, new Color(0x32CD32));
			addStandardHtmlColor( "Linen" 	, new Color(0xFAF0E6));
			addStandardHtmlColor( "Magenta" 	, new Color(0xFF00FF));
			addStandardHtmlColor( "Maroon" 	, new Color(0x800000));
			addStandardHtmlColor( "MediumAquaMarine" 	, new Color(0x66CDAA));
			addStandardHtmlColor( "MediumBlue" 	, new Color(0x0000CD));
			addStandardHtmlColor( "MediumOrchid" 	, new Color(0xBA55D3));
			addStandardHtmlColor( "MediumPurple" 	, new Color(0x9370DB));
			addStandardHtmlColor( "MediumSeaGreen" 	, new Color(0x3CB371));
			addStandardHtmlColor( "MediumSlateBlue" 	, new Color(0x7B68EE));
			addStandardHtmlColor( "MediumSpringGreen" 	, new Color(0x00FA9A));
			addStandardHtmlColor( "MediumTurquoise" 	, new Color(0x48D1CC));
			addStandardHtmlColor( "MediumVioletRed" 	, new Color(0xC71585));
			addStandardHtmlColor( "MidnightBlue" 	, new Color(0x191970));
			addStandardHtmlColor( "MintCream" 	, new Color(0xF5FFFA));
			addStandardHtmlColor( "MistyRose" 	, new Color(0xFFE4E1));
			addStandardHtmlColor( "Moccasin" 	, new Color(0xFFE4B5));
			addStandardHtmlColor( "NavajoWhite" 	, new Color(0xFFDEAD));
			addStandardHtmlColor( "Navy" 	, new Color(0x000080));
			addStandardHtmlColor( "OldLace" 	, new Color(0xFDF5E6));
			addStandardHtmlColor( "Olive" 	, new Color(0x808000));
			addStandardHtmlColor( "OliveDrab" 	, new Color(0x6B8E23));
			addStandardHtmlColor( "Orange" 	, new Color(0xFFA500));
			addStandardHtmlColor( "OrangeRed" 	, new Color(0xFF4500));
			addStandardHtmlColor( "Orchid" 	, new Color(0xDA70D6));
			addStandardHtmlColor( "PaleGoldenRod" 	, new Color(0xEEE8AA));
			addStandardHtmlColor( "PaleGreen" 	, new Color(0x98FB98));
			addStandardHtmlColor( "PaleTurquoise" 	, new Color(0xAFEEEE));
			addStandardHtmlColor( "PaleVioletRed" 	, new Color(0xDB7093));
			addStandardHtmlColor( "PapayaWhip" 	, new Color(0xFFEFD5));
			addStandardHtmlColor( "PeachPuff" 	, new Color(0xFFDAB9));
			addStandardHtmlColor( "Peru" 	, new Color(0xCD853F));
			addStandardHtmlColor( "Pink" 	, new Color(0xFFC0CB));
			addStandardHtmlColor( "Plum" 	, new Color(0xDDA0DD));
			addStandardHtmlColor( "PowderBlue" 	, new Color(0xB0E0E6));
			addStandardHtmlColor( "Purple" 	, new Color(0x800080));
			addStandardHtmlColor( "RebeccaPurple" 	, new Color(0x663399));
			addStandardHtmlColor( "Red" 	, new Color(0xFF0000));
			addStandardHtmlColor( "RosyBrown" 	, new Color(0xBC8F8F));
			addStandardHtmlColor( "RoyalBlue" 	, new Color(0x4169E1));
			addStandardHtmlColor( "SaddleBrown" 	, new Color(0x8B4513));
			addStandardHtmlColor( "Salmon" 	, new Color(0xFA8072));
			addStandardHtmlColor( "SandyBrown" 	, new Color(0xF4A460));
			addStandardHtmlColor( "SeaGreen" 	, new Color(0x2E8B57));
			addStandardHtmlColor( "SeaShell" 	, new Color(0xFFF5EE));
			addStandardHtmlColor( "Sienna" 	, new Color(0xA0522D));
			addStandardHtmlColor( "Silver" 	, new Color(0xC0C0C0));
			addStandardHtmlColor( "SkyBlue" 	, new Color(0x87CEEB));
			addStandardHtmlColor( "SlateBlue" 	, new Color(0x6A5ACD));
			addStandardHtmlColor( "SlateGray" 	, new Color(0x708090));
			addStandardHtmlColor( "Snow" 	, new Color(0xFFFAFA));
			addStandardHtmlColor( "SpringGreen" 	, new Color(0x00FF7F));
			addStandardHtmlColor( "SteelBlue" 	, new Color(0x4682B4));
			addStandardHtmlColor( "Tan" 	, new Color(0xD2B48C));
			addStandardHtmlColor( "Teal" 	, new Color(0x008080));
			addStandardHtmlColor( "Thistle" 	, new Color(0xD8BFD8));
			addStandardHtmlColor( "Tomato" 	, new Color(0xFF6347));
			addStandardHtmlColor( "Turquoise" 	, new Color(0x40E0D0));
			addStandardHtmlColor( "Violet" 	, new Color(0xEE82EE));
			addStandardHtmlColor( "Wheat" 	, new Color(0xF5DEB3));
			addStandardHtmlColor( "White" 	, new Color(0xFFFFFF));
			addStandardHtmlColor( "WhiteSmoke" 	, new Color(0xF5F5F5));
			addStandardHtmlColor( "Yellow" 	, new Color(0xFFFF00));
			addStandardHtmlColor( "YellowGreen" 	, new Color(0x9ACD32));
			log.debug("Standard HTML color names loaded.");
		}
	}
843540
public static void main(String[] args) throws TwitterException {
        if (args.length < 1) {
            System.out.println("Usage: java twitter4j.examples.PrintFilterStream [follow(comma separated numerical user ids)] [track(comma separated filter terms)]");
            System.exit(-1);
        }

        TwitterStream twitterStream = new TwitterStreamFactory().getInstance().addListener(new StatusListener() {
            @Override
            public void onStatus(Status status) {
                System.out.println("@" + status.getUser().getScreenName() + " - " + status.getText());
            }

            @Override
            public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {
                System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId());
            }

            @Override
            public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
                System.out.println("Got track limitation notice:" + numberOfLimitedStatuses);
            }

            @Override
            public void onScrubGeo(long userId, long upToStatusId) {
                System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);
            }

            @Override
            public void onStallWarning(StallWarning warning) {
                System.out.println("Got stall warning:" + warning);
            }

            @Override
            public void onException(Exception ex) {
                ex.printStackTrace();
            }
        });

        ArrayList<Long> follow = new ArrayList<Long>();
        ArrayList<String> track = new ArrayList<String>();
        for (String arg : args) {
            if (isNumericalArgument(arg)) {
                for (String id : arg.split(",")) {
                    follow.add(Long.parseLong(id));
                }
            } else {
                track.addAll(Arrays.asList(arg.split(",")));
            }
        }
        long[] followArray = new long[follow.size()];
        for (int i = 0; i < follow.size(); i++) {
            followArray[i] = follow.get(i);
        }
        String[] trackArray = track.toArray(new String[track.size()]);

        // filter() method internally creates a thread which manipulates TwitterStream and calls these adequate listener methods continuously.
        twitterStream.filter(new FilterQuery(0, followArray, trackArray));
    }
953692
@Override
    protected void configureFindbugsEngine() {
        addBoolOption("-formatDates", formatDates);
        addBoolOption("-noTabs", noTabs);
        addBoolOption("-summary", summary);
        addArg(inputFile.getName());
        if (outputFile != null) {
            // Don't use .getName() because it discards path
            addArg(outputFile.getAbsolutePath());
        }
    }
184972
function(f) {
				f.mime && f.mime !== 'directory' && !addedBadges[f.mime] && addBadgeStyle(f.mime, f.name);
				return templates[list ? 'row' : 'icon']
						.replace(/\{([a-z0-9_]+)\}/g, function(s, e) { 
							return replacement[e] ? replacement[e](f, fm) : (f[e] ? f[e] : ''); 
						});
			}
434133
private void addApiDocRoots(String packageListUrl) {
	BufferedReader br = null;
	packageListUrl = fixApiDocRoot(packageListUrl);
	try {
	    URL url = new URL(packageListUrl + "/package-list");
	    br = new BufferedReader(new InputStreamReader(url.openStream()));
	    String line;
	    while((line = br.readLine()) != null) {
		line = line + ".";
		Pattern pattern = Pattern.compile(line.replace(".", "\\.") + "[^\\.]*");
		apiDocMap.put(pattern, packageListUrl);
	    }
	} catch(IOException e) {
	    System.err.println("Errors happened while accessing the package-list file at "
		    + packageListUrl);
	} finally {
	    if(br != null)
		try {
		    br.close();
		} catch (IOException e) {}
	}
	
    }
342806
public static void main(String args[]) throws Exception {
		String imageFolder = "C:/images/";
		String imagFilename = "test.jpg";
		String[] codebookFiles = { "C:/codebook1.csv", "C:/codebook2.csv", "C:/codebook3.csv",
				"C:/codebook4.csv" };
		int[] numCentroids = { 64, 64, 64, 64 };

		String pcaFilename = "C:/pca.txt";
		int initialLength = numCentroids.length * numCentroids[0] * AbstractFeatureExtractor.SURFLength;
		int targetLength = 128;

		ImageVectorization imvec = new ImageVectorization(imageFolder, imagFilename, targetLength, 512 * 384);
		ImageVectorization.setFeatureExtractor(new SURFExtractor());
		double[][][] codebooks = AbstractFeatureAggregator.readQuantizers(codebookFiles, numCentroids,
				AbstractFeatureExtractor.SURFLength);
		ImageVectorization.setVladAggregator(new VladAggregatorMultipleVocabularies(codebooks));
		if (targetLength < initialLength) {
			PCA pca = new PCA(targetLength, 1, initialLength, true);
			pca.loadPCAFromFile(pcaFilename);
			ImageVectorization.setPcaProjector(pca);
		}
		imvec.setDebug(true);

		ImageVectorizationResult imvr = imvec.call();
		System.out.println(imvr.getImageName() + ": " + Arrays.toString(imvr.getImageVector()));
	}
576337
public void decorate(Object element, IDecoration decoration)
	{
		int adornmentFlags = computeAdornmentFlags(element);
		if (adornmentFlags == ERRORTICK_ERROR)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_ERROR);
		} else if (adornmentFlags == ERRORTICK_WARNING)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_WARNING);
		}
	}
1050259
@Override protected void initGraphics() {
        super.initGraphics();

        oldValue = tile.getValue();
        double deviation = calculateDeviation();
        updateState(deviation);

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getUnit());
        text.setFill(tile.getUnitColor());
        Helper.enableNode(text, tile.isTextVisible());

        valueText = new Text(String.format(locale, formatString, tile.getValue()));
        valueText.setFill(tile.getValueColor());
        Helper.enableNode(valueText, tile.isValueVisible());

        unitText = new Text(tile.getUnit());
        unitText.setFill(tile.getUnitColor());
        Helper.enableNode(unitText, !tile.getUnit().isEmpty());

        valueUnitFlow = new TextFlow(valueText, unitText);
        valueUnitFlow.setTextAlignment(TextAlignment.RIGHT);

        description = new Label(tile.getDescription());
        description.setAlignment(tile.getDescriptionAlignment());
        description.setWrapText(true);
        description.setTextFill(tile.getTextColor());
        Helper.enableNode(description, !tile.getDescription().isEmpty());
        
        triangle = new Path();
        triangle.setStroke(null);
        triangle.setFill(state.color);
        indicatorPane = new StackPane(triangle);

        deviationText = new Text(String.format(locale, "%." + tile.getTickLabelDecimals() + "f", deviation));
        deviationText.setFill(state.color);

        deviationUnitText = new Text("%");
        deviationUnitText.setFill(Tile.FOREGROUND);

        referenceUnitFlow = new TextFlow(indicatorPane, deviationText, deviationUnitText);
        referenceUnitFlow.setTextAlignment(TextAlignment.LEFT);

        getPane().getChildren().addAll(titleText, text, valueUnitFlow, description, referenceUnitFlow);

        //handleCurrentValue(tile.getValue());
    }
231994
function createAPIJS(symbols, filename) {

	var output = [];

	var rkeywords = /^(?:abstract|as|boolean|break|byte|case|catch|char|class|continue|const|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface|is|long|namespace|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|use|var|void|volatile|while|with)$/;

	function isNoKeyword($) { return !rkeywords.test($.name); }

	function isAPI($) { return $.access === 'public' || $.access === 'protected' || !$.access; }

	function writeln(args) {
		if ( arguments.length ) {
			for (var i = 0; i < arguments.length; i++) {
				output.push(arguments[i]);
			}
		}
		output.push("\n");
	}

	function unwrap(docletSrc) {
		if (!docletSrc) { return ''; }

		// note: keep trailing whitespace for @examples
		// extra opening/closing stars are ignored
		// left margin is considered a star and a space
		// use the /m flag on regex to avoid having to guess what this platform's newline is
		docletSrc =
			docletSrc.replace(/^\/\*\*+/, '') // remove opening slash+stars
			.replace(/\**\*\/$/, "\\Z")       // replace closing star slash with end-marker
			.replace(/^\s*(\* ?|\\Z)/gm, '')  // remove left margin like: spaces+star or spaces+end-marker
			.replace(/\s*\\Z$/g, '');         // remove end-marker

		return docletSrc;
	}

	function comment($, sMetaType) {

		var s = unwrap($.comment.toString());

		// remove the @desc tag
		s = s.replace(/(\r\n|\r|\n)/gm, "\n");
		s = s.replace(/^\s*@desc\s*/gm, "");
		s = s.replace(/^\s*@alias[^\r\n]*(\r\n|\r|\n)?/gm, "");
		s = s.replace(/^\s*@name[^\r\n]*(\r\n|\r|\n)?/gm, "");
		s = s.replace(/^\s*@function[^\r\n]*(\r\n|\r|\n)?/gm, "");
		s = s.replace(/^\s*@author[^\r\n]*(\r\n|\r|\n)?/gm, "");
		s = s.replace(/^\s*@synthetic[^\r\n]*(\r\n|\r|\n)?/gm, "");
		s = s.replace(/^\s*<\/p><p>\s*(\r\n|\r|\n)?/gm, "\n");
		// skip empty documentation
		if ( !s ) {
			return;
		}

		// for namespaces, enforce the @.memberof tag
		if ( sMetaType === "namespace" && $.memberof && s.indexOf("@memberof") < 0 ) {
			s = s + "\n@memberof " + $.memberof;
		}

		writeln("/**\n * " + s.replace(/\n/g, "\n * ") + "\n */");

		/*
		writeln("/**");
		writeln(s.split(/\r\n|\r|\n/g).map(function($) { return " * " + $;}).join("\r\n"));
		writeln(" * /");
		*/

	}

	function signature($) {
		var p = $.params,
			r = [],
			i;
		if ( p ) {
			for (i = 0; i < p.length; i++) {
				// ignore @param tags for 'virtual' params that are used to document members of config-like params
				// (e.g. like "@param param1.key ...")
				if (p[i].name && p[i].name.indexOf('.') < 0) {
					r.push(p[i].name);
				}
			}
		}
		return r.join(',');
	}

	function qname(member,parent) {
		var r = member.memberof;
		if ( member.scope !== 'static' ) {
			r += ".prototype";
		}
		return (r ? r + "." : "") + member.name;
	}

	var mValues = {
		"boolean"  : "false",
		"int"      : "0",
		"float"    : "0.0",
		"number"   : "0.0",
		"string"   : "\"\"",
		"object"   : "new Object()",
		"function" : "function() {}"
	};

	function valueForType(type) {
		if ( type && type.names && type.names[0] ) {
			type = type.names[0];
			if ( REGEXP_ARRAY_TYPE.test(type) || type.indexOf("[]") > 0 ) {
				return "new Array()";
			} else if ( mValues[type] ) {
				return mValues[type];
			} else if ( type.indexOf(".") > 0 ) {
				return "new " + type + "()";
			} else {
				// return "/* unsupported type: " +  member.type + " */ null";
				return "null";
			}
		}
	}

	function value(member) {
		return valueForType(member.type);
	}

	function retvalue(member) {
		//debug(member);
		var r = valueForType(member.type || (member.returns && member.returns.length && member.returns[0] && member.returns[0].type && member.returns[0].type));
		if ( r ) {
			return "return " + r + ";";
		}
		return "";
	}

	var sortedSymbols = symbols.slice(0).filter(function($) { return isaClass($) && isAPI($) && !$.synthetic; }).sort(sortByAlias); // sort only a copy(!) of the symbols, otherwise the SymbolSet lookup is broken
	sortedSymbols.forEach(function(symbol) {

		var sMetaType = (symbol.kind === 'member' && symbol.isEnum) ? 'enum' : symbol.kind;
		if ( sMetaType ) {

			writeln("");
			writeln("// ---- " + symbol.longname + " --------------------------------------------------------------------------");
			writeln("");

			var memberId, member;

			var ownProperties = childrenOfKind(symbol, 'property').own.filter(isNoKeyword).sort(sortByAlias);
				if ( sMetaType === "class" ) {
					comment(symbol, sMetaType);
					writeln(symbol.longname + " = function(" + signature(symbol) + ") {};");
				for ( memberId in ownProperties ) {
					member = ownProperties[memberId];
					comment(member, sMetaType);
					writeln(qname(member, symbol) + " = " + value(member));
					writeln("");
				}
				} else if ( sMetaType === 'namespace' || sMetaType === 'enum' ) {
				//debug("found namespace " + symbol.longname);
				//debug(ownProperties);
					if ( ownProperties.length ) {
						writeln("// dummy function to make Eclipse aware of namespace");
						writeln(symbol.longname + ".toString = function() { return \"\"; };");
					}
				}

			var ownEvents = childrenOfKind(symbol, 'event').own.filter(isNoKeyword).sort(sortByAlias);
			if ( ownEvents.length ) {
				for ( memberId in ownEvents ) {
					member = ownEvents[memberId];
					comment(member, sMetaType);
					writeln(qname(member, symbol) + " = function(" + signature(member) + ") { " + retvalue(member) + " };");
					writeln("");
				}
			}

			var ownMethods = childrenOfKind(symbol, 'method').own.filter(isNoKeyword).sort(sortByAlias);
			if ( ownMethods.length ) {
				for ( memberId in ownMethods ) {
					member = ownMethods[memberId];
					comment(member, sMetaType);
					writeln(qname(member, symbol) + " = function(" + signature(member) + ") { " + retvalue(member) + " };");
					writeln("");
				}
			}

		}
	});

	writeln("// ---- static fields of namespaces ---------------------------------------------------------------------");

	sortedSymbols.forEach(function(symbol) {

		var sMetaType = (symbol.kind === 'member' && symbol.isEnum) ? 'enum' : symbol.kind;

		if ( sMetaType === 'namespace' || sMetaType === 'enum' ) {

			var ownProperties = childrenOfKind(symbol, 'property').own.filter(isNoKeyword).sort(sortByAlias);
			if ( ownProperties.length ) {
				writeln("");
				writeln("// ---- " + symbol.longname + " --------------------------------------------------------------------------");
				writeln("");

				for (var memberId in ownProperties ) {
					var member = ownProperties[memberId];
					comment(member, sMetaType);
					writeln(qname(member, symbol) + " = " + value(member) + ";");
					writeln("");
				}
			}
		}

	});

	fs.mkPath(path.dirname(filename));
	fs.writeFileSync(filename, output.join(""), 'utf8');
	info("  saved as " + filename);
}
693777
def main():
    
    # Try parsing command line args and flags with docopt
    args = docopt(__doc__, version="cdk")
    # Am I going to need validation? No Schema for the moment...
    if args['FILE']:
        out = output_file(args['FILE'])
        # Great! Run asciidoc with appropriate flags
        theme = pick_theme(args['--theme'])
        if theme not in listdir(THEMES_DIR):
            exit('Selected theme "%s" not found. Check ~/.cdk/prefs' % theme)
        cmd = create_command(theme, args['--bare'], args['--toc'], args['--notransition'],
                             args['--logo'])
        run_command(cmd, args)
        if args['--toc']:
            add_css(out, '.deck-container .deck-toc li a span{color: #888;display:inline;}')
        if args['--custom-css']:
            add_css_file(out, args['--custom-css'])
        if args['--open']:
            webbrowser.open("file://" + abspath(out))

    # other commands
    elif args['--generate']:
        if isfile(args['--generate']):
            exit("%s already exists!" % args['--generate'])
        with open(args['--generate'], "w") as fp:
            sample = join(LOCATION,  "custom", "sample.asc")
            fp.write(open(sample).read())
            print("Created sample slide deck in %s..." % args['--generate'])
        exit()

    elif args['--install-theme']:
        path = args['--install-theme']
        if not isfile(path):
            exit("Theme file not found.")
        if not path.endswith(".zip"):
            exit("Theme installation currently only supports theme install from "
                 ".zip files.")
        install_theme(path)
    elif args['--default-theme']:
        set_default_theme(args['--default-theme'])
260595
public void jmolColorByChain(){
		String script =
				"function color_by_chain(objtype, color_list) {"+ String.format("%n") +
				""+ String.format("%n") +
				"		 if (color_list) {"+ String.format("%n") +
				"		   if (color_list.type == \"string\") {"+ String.format("%n") +
				"		     color_list = color_list.split(\",\").trim();"+ String.format("%n") +
				"		   }"+ String.format("%n") +
				"		 } else {"+ String.format("%n") +
				"		   color_list = [\"104BA9\",\"AA00A2\",\"C9F600\",\"FFA200\",\"284A7E\",\"7F207B\",\"9FB82E\",\"BF8B30\",\"052D6E\",\"6E0069\",\"83A000\",\"A66A00\",\"447BD4\",\"D435CD\",\"D8FA3F\",\"FFBA40\",\"6A93D4\",\"D460CF\",\"E1FA71\",\"FFCC73\"];"+ String.format("%n") +
				"		 }"+ String.format("%n") +

				"		 var cmd2 = \"\";"+ String.format("%n") +

				"		 if (!objtype) {"+ String.format("%n") +
				"		   var type_list  = [ \"backbone\",\"cartoon\",\"dots\",\"halo\",\"label\",\"meshribbon\",\"polyhedra\",\"rocket\",\"star\",\"strand\",\"strut\",\"trace\"];"+ String.format("%n") +
				"		   cmd2 = \"color \" + type_list.join(\" none; color \") + \" none;\";"+ String.format("%n") +
				"		   objtype = \"atoms\";"+ String.format("%n") +

				"		 }"+ String.format("%n") +

				"		 var chain_list  = script(\"show chain\").trim().lines;"+ String.format("%n") +
				"		 var chain_count = chain_list.length;"+ String.format("%n") +

				"		 var color_count = color_list.length;"+ String.format("%n") +
				"		 var sel = {selected};"+ String.format("%n") +
				"		 var cmds = \"\";"+ String.format("%n") +


				"		 for (var chain_number=1; chain_number<=chain_count; chain_number++) {"+ String.format("%n") +
				"		   // remember, Jmol arrays start with 1, but % can return 0"+ String.format("%n") +
				"		   cmds += \"select sel and :\" + chain_list[chain_number] + \";color \" + objtype + \" [x\" + color_list[(chain_number-1) % color_count + 1] + \"];\" + cmd2;"+ String.format("%n") +
				"		 }"+ String.format("%n") +
				"		 script INLINE @{cmds + \"select sel\"}"+ String.format("%n") +
				"}";

		executeCmd(script);
	}