Examples of JRenderer


Examples of org.jdesktop.core.animation.rendering.JRenderer

   * @param target
   *          the rendering implementation to callback to.
   * @return a renderer for <tt>on</tt>.
   */
  public static JRenderer getDefaultRenderer(Canvas on, JRendererTarget<Display, GC> target) {
    final JRenderer result;
    final TimingSource timingSource = new SWTTimingSource(on.getDisplay());
    result = new JPassiveRenderer(on, target, timingSource);
    timingSource.init();
    Animator.setDefaultTimingSource(result.getTimingSource());
    return result;
  }
View Full Code Here

Examples of org.jdesktop.core.animation.rendering.JRenderer

    f_panel = new Canvas(shell, SWT.DOUBLE_BUFFERED);
    gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
    f_panel.setLayoutData(gridData);
    f_panel.setBackground(display.getSystemColor(SWT.COLOR_WHITE));

    JRenderer renderer = JRendererFactory.getDefaultRenderer(f_panel, this);

    infoTimer.addTickListener(new TickListener() {
      @Override
      public void timingSourceTick(TimingSource source, long nanoTime) {
        updateBallCount();
      }
    });

    animationTimer.init();
    infoTimer.init();

    shell.setSize(800, 600);
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
    renderer.getTimingSource().dispose();
    renderer.shutdown();
    animationTimer.dispose();
    infoTimer.dispose();
    display.dispose();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.