Code example for Random

Methods: setSeed

0
    /** 
     * Set the seed value for the random number generator. 
     * @param seed the random seed value 
     */ 
    public void setRandomSeed(long seed) {
        r.setSeed(seed);
    } 
     
    /** 
     * @see prefuse.action.Action#run(double) 
     */ 
    public void run(double frac) {
        Rectangle2D b = getLayoutBounds();
        double x, y;
        double w = b.getWidth();
        double h = b.getHeight();
        Iterator iter = getVisualization().visibleItems(m_group);
        while ( iter.hasNext() ) {
            VisualItem item = (VisualItem)iter.next();
            x = (int)(b.getX() + r.nextDouble()*w);
            y = (int)(b.getY() + r.nextDouble()*h);