Package java.awt

Examples of java.awt.Window$WindowFlipBufferStrategy


   * @throws ActionFailedException if the given {@code Component} does not have a {@code Window} ancestor.
   */
  @Override
  @RunsInCurrentThread
  public boolean isReadyForInput(@Nonnull Component c) {
    Window w = windowAncestorOf(c);
    if (w == null) {
      throw actionFailure(concat("Component ", format(c), " does not have a Window ancestor"));
    }
    return c.isShowing() && windowMonitor.isWindowReady(w);
  }
View Full Code Here


*/
public class JToolBarDriver_floatTo_Test extends JToolBarDriver_TestCase {
  @Test
  public void should_float_JToolBar() {
    showWindow();
    Window oldAncestor = toolBarAncestor();
    Point where = whereToFloatTo();
    driver.floatTo(toolBar, where.x, where.y);
    assertThatToolBarIsFloating(oldAncestor);
  }
View Full Code Here

    driver.floatTo(toolBar, where.x, where.y);
    assertThatToolBarIsFloating(oldAncestor);
  }

  private void assertThatToolBarIsFloating(Window oldAncestor) {
    Window newAncestor = toolBarAncestor();
    assertThat(newAncestor).isNotSameAs(oldAncestor);
    Point newAncestorLocation = locationOf(newAncestor);
    Point oldAncestorLocation = locationOf(oldAncestor);
    assertThat(newAncestorLocation.x).isGreaterThan(oldAncestorLocation.x);
    assertThat(newAncestorLocation.y).isGreaterThan(oldAncestorLocation.y);
View Full Code Here

    if (method != null) method.invoke(value, null);
  } catch (Throwable e) {}
  final AWTEventListener awtListener = new AWTEventListener() {
    public void eventDispatched(AWTEvent event) {
      if (event.getID() == WindowEvent.WINDOW_OPENED) {
        final Window window = (Window) event.getSource();
        if (window.getParent() == frame) {
          parent.getDisplay().asyncExec(new Runnable() {
            public void run() {
              if (parent.isDisposed()) return;
              Shell shell = parent.getShell();
              loadLibrary();
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected void startApp(SwingWebSession swSession, HttpServletRequest req, HttpServletResponse resp) throws Exception
    {
        Window w = getManager().startApp(ReflectUtils.getClass(getAppClass()), null);
        if (w instanceof SessionLifecycleListener)
        {
            swSession.addListener((SessionLifecycleListener) w);
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected void startApp(SwingWebSession swSession, HttpServletRequest req, HttpServletResponse resp) throws Exception
    {
        Window w = getManager().startApp(ReflectUtils.getClass(getAppClass()), null);
        if (w instanceof SessionLifecycleListener)
        {
            swSession.addListener((SessionLifecycleListener) w);
        }
    }
View Full Code Here

        }
    }

    public void processWindowEvent(BridgeComponentPeer peer, BridgeInputContext context, Map inputForm)
    {
        Window w = (Window) peer.getComponent();
        String value = (String) inputForm.get(peer.getId());
        if ("close".equals(value))
        {
            w.dispose();
        } else
        {
            _logger.warning("Unknown action " + value + " to " + w);
        }
        return;
View Full Code Here

     * @throws IllegalAccessException if there's problem invoking the main method
     * @throws NoSuchMethodException if the application class does not have a main method
     */
    public Window startApp(Class appClass, String[] args) throws Exception
    {
        Window w = SwingWebUtils.startApp(appClass, args);
        getContext().getInputContext().dispatchEvents();
        return w;
    }
View Full Code Here

    public void renderOutput(Object output) throws RenderingException
    {
        List consoleWindows = getContext().getComponentManager().getConsoleWindows();
        for (int i = 0; i < consoleWindows.size(); i++)
        {
            Window w = (Window) consoleWindows.get(i);
            renderOutput(w, output);
        }
        List windows = getContext().getComponentManager().getWindows();
        for (int i = 0; i < windows.size(); i++)
        {
            Window w = (Window) windows.get(i);
            renderOutput(w, output);
        }
    }
View Full Code Here

    int y = e.getY();
   
    if (drag_button == MouseEvent.BUTTON3 || (Math.abs(drag_orig_x - x) < 3 && Math.abs(drag_orig_y - y) < 3))
      return;
   
    Window w = Harlequin.getInstance();
    Point p = w.getLocation();
    w.setLocation((x - drag_orig_x) + p.x, (y - drag_orig_y) + p.y);
  }
View Full Code Here

TOP

Related Classes of java.awt.Window$WindowFlipBufferStrategy

Copyright © 2018 www.massapicom. 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.