Examples of Canvas


Examples of com.vaadin.addon.timeline.gwt.canvas.client.Canvas

        setElement(browserRoot);

        setHeight("64px");
        setStyleName("v-timeline-widget-browser");

        canvas = new Canvas(300, 44);
        canvas.setStyleName(CLASSNAME_CANVAS);
        browserRoot.appendChild(canvas.getElement());

        plotter = new VCanvasPlotter(canvas);
View Full Code Here

Examples of gwt.canvas.client.Canvas

  private ArrowRenderer _arrowRenderer;

  public CanvasRenderWidget(MindMapWidget mindMapWidget) {

    _mindMapWidget = mindMapWidget;
    _canvas = new Canvas();
    _canvas.setBackgroundColor(Canvas.TRANSPARENT);
    _canvas.setWidth(1000);
    _canvas.setHeight(1000);
    _canvas.addClickListener(new ClickListener() {
View Full Code Here

Examples of java.awt.Canvas

   * applet is destroyed.
   */
  public void init() {
    setLayout(new BorderLayout());
    try {
      display_parent = new Canvas() {
        public void addNotify() {
          super.addNotify();
          startLWJGL();
        }
        public void removeNotify() {
View Full Code Here

Examples of java.awt.Canvas

  boolean killswitch;
  public DisplayParentTest() throws LWJGLException {
    setTitle("LWJGL Display Parent Test");
    setSize(640, 320);
    setLayout(new GridLayout(1, 2));
    final Canvas display_parent = new Canvas();
    display_parent.setFocusable(true);
    display_parent.setIgnoreRepaint(true);
    add(display_parent);
    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        killswitch = true;
      }
    });
    setResizable(true);
    setVisible(true);
    Display.setParent(display_parent);
    Display.setVSyncEnabled(true);
    Display.create();
    float angle = 0f;

    while (isVisible() && !killswitch) {
      angle += 1.0f;
      int width;
      int height;
      if (!Display.isFullscreen()) {
        width = display_parent.getWidth();
        height = display_parent.getHeight();
      } else {
        width = Display.getDisplayMode().getWidth();
        height = Display.getDisplayMode().getHeight();
      }
View Full Code Here

Examples of java.awt.Canvas

    System.out.println("*** init ***");

    setLayout(new BorderLayout());
    try {
      test = (Test) Class.forName(getParameter("test")).newInstance();
      Canvas canvas = (Canvas) test;
      canvas.setSize(getWidth(), getHeight());
      add(canvas);
    } catch (Exception e) {
      e.printStackTrace();
    }
    test.start();
View Full Code Here

Examples of java.awt.Canvas

   * applet is destroyed.
   */
  public void init() {
    setLayout(new BorderLayout());
    try {
      display_parent = new Canvas() {
        public void addNotify() {
          super.addNotify();
          startLWJGL();
        }
        public void removeNotify() {
View Full Code Here

Examples of java.awt.Canvas

            w.getContentPane().setBackground(new Color(0,0,0,255));

            //JAWTUtils my = new JAWTUtils();
            //w.getContentPane().add(my);
            Canvas c = new Canvas();
            w.getContentPane().add(c);

            w.setBounds(0,0,600,500);

            //System.out.println("getWindowHandle: " + JAWTUtils.getWindowHandle(c));
View Full Code Here

Examples of java.awt.Canvas

        final String overlayFactory = Platform.isWindows() ? "directdrawsink" : "xvimagesink";
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
               
                JFrame frame = new JFrame("Overlay Test");
                final Canvas canvas = new Canvas();
                canvas.setPreferredSize(new Dimension(640, 480));
                frame.add(canvas, BorderLayout.CENTER);               
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.pack();
                frame.setVisible(true);
                               
View Full Code Here

Examples of java.awt.Canvas

    Graphics2D g2 = (Graphics2D) result.getGraphics();
   
    g2.setColor(Color.WHITE);
    g2.fillRect(0, 0, width, height);
   
    Canvas canvas = new Canvas();
    Image tImage = image.getScaledInstance(width, height, quality);

    g2.drawImage(tImage, 0, 0, canvas);

    return result;
View Full Code Here

Examples of java.awt.Canvas

            // must be called after the fullscreen stuff, but before
            // getting our BufferStrategy
            setVisible(true);

            canvas = new Canvas() {
                @Override public void paint(Graphics g) {
                    // Try to redraw the front buffer when the OS says it has stomped
                    // on it, using the back buffer. Calling bufferStrategy.show() here
                    // sometimes throws NullPointerException or IllegalStateException,
                    // but otherwise seems to work fine.
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.