public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
@Override public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
/** * @see edu.uci.ics.jung.algorithms.util.IterativeContext#done() */ public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
/** * @see edu.uci.ics.jung.algorithms.layout.Layout#done() */ public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
/** * Check all sublayouts.keySet() and the delegate layout, returning * done == true iff all are done. */ public boolean done() { boolean done = true; for(Layout<V,E> layout : layouts.keySet()) { if(layout instanceof IterativeContext) { done &= ((IterativeContext)layout).done(); } } if(delegate instanceof IterativeContext) { done &= ((IterativeContext)delegate).done(); } return done; }
/** * @return {@code true} iff the delegate layout and all sublayouts are done */ public boolean done() { for (Layout<V,E> layout : layouts.keySet()) { if (layout instanceof IterativeContext) { if (! ((IterativeContext) layout).done() ) { return false; } } } if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
public void prerelax() { manualSuspend = true; long timeNow = System.currentTimeMillis(); while (System.currentTimeMillis() - timeNow < 500 && !process.done()) { process.step(); } manualSuspend = false; }
public void run() { while (!process.done() && !stop) { process.step(); if (stop) return; try { Thread.sleep(sleepTime); } catch (InterruptedException ie) { } } } }
public void prerelax() { manualSuspend = true; long timeNow = System.currentTimeMillis(); while (System.currentTimeMillis() - timeNow < 500 && !process.done()) { process.step(); } manualSuspend = false; }
public void run() { while (!process.done() && !stop) { process.step(); if (stop) { return; } try { Thread.sleep(sleepTime); } catch (InterruptedException ie) { } } } }
@Override public void run() { while (!iterativeContext.done() && !stop) { try { iterativeContext.step(); try { Thread.sleep(sleepTime); } catch (InterruptedException ex) { } } catch (Exception ex) { ex.printStackTrace(); } } if (iterativeContext.done()) { log.trace("done here because {} is done", hashCode()); } if (stop) { log.trace("done here because {} stop = {}", hashCode(), stop); } } }
/** * Call step on any sublayout that is also an IterativeContext and is not done */ public void step() { for(Layout<V,E> layout : layouts.keySet()) { if(layout instanceof IterativeContext) { IterativeContext context = (IterativeContext)layout; if(context.done() == false) { context.step(); } } } if(delegate instanceof IterativeContext) { IterativeContext context = (IterativeContext)delegate; if(context.done() == false) { context.step(); } } }
/** * call step on any sublayout that is also an IterativeContext * and is not done */ public void step() { for(Layout<V,E> layout : layouts.keySet()) { if(layout instanceof IterativeContext) { IterativeContext context = (IterativeContext)layout; if(context.done() == false) { context.step(); } } } if(delegate instanceof IterativeContext) { IterativeContext context = (IterativeContext)delegate; if(context.done() == false) { context.step(); } } }
public void run() { running = true; try { while (!process.done() && !stop) { synchronized (pauseObject) { while (manualSuspend && !stop) { try { pauseObject.wait(); } catch (InterruptedException e) { // ignore } } } process.step(); if (stop) return; try { Thread.sleep(sleepTime); } catch (InterruptedException ie) { // ignore } } } finally { running = false; } } }
public void run() { running = true; try { while (!process.done() && !stop) { synchronized (pauseObject) { while (manualSuspend && !stop) { try { pauseObject.wait(); } catch (InterruptedException e) { // ignore } } } process.step(); if (stop) return; try { Thread.sleep(sleepTime); } catch (InterruptedException ie) { // ignore } } } finally { running = false; } } }