Examples of GwtState


Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

      assertEquals("lime", getComputedStyleAttribute(panel, "color"));
    }
  }

  private static String getComputedStyleAttribute(WidgetInfo widget, String style) throws Exception {
    GwtState state = widget.getState();
    Object widgetElement = widget.getDOMElement();
    return state.getComputedStyle(widgetElement, style);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

  private void createGWTState(CompositeClassLoader parentClassLoader) throws Exception {
    if (m_sharedUse && m_shared_GWTState != null) {
      m_state = m_shared_GWTState;
    } else {
      // initialize GWTState
      m_state = new GwtState(parentClassLoader, m_module);
      m_state.initialize();
      // remember shared state
      if (m_sharedUse) {
        m_state.setShared(true);
        m_shared_GWTState = m_state;
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

        }
      }
      // fail
      fail(msg);
    } else if (instances.size() == 1) {
      GwtState state = instances.get(0);
      if (!state.isShared()) {
        String msg = "\t" + state.m_testQualifiedName;
        fail("Only GWTState instance should be shared.\n" + msg);
      }
    }
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_noModuleFile() throws Exception {
    ModuleDescription moduleDescription = null;
    try {
      new GwtState(null, moduleDescription);
      fail();
    } catch (DesignerException e) {
      assertEquals(IExceptionConstants.NO_MODULE_FILE, e.getCode());
    }
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

            "<!-- filler filler filler filler filler -->",
            "<!-- filler filler filler filler filler -->",
            "<module>",
            "  <inherits name='no.such.Module'/>",
            "</module>"));
    GwtState state = new GwtState(null, moduleDescription);
    // initialize() will fail, but dispose() should not
    try {
      state.initialize();
    } catch (Throwable e) {
      state.dispose();
    }
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
            "}");
    GwtState state = frame.getState();
    //
    Rectangle bounds = state.getAbsoluteBounds(null);
    assertEquals(new Rectangle(), bounds);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.support.GwtState

            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
            "}");
    GwtState state = frame.getState();
    //
    Rectangle bounds = state.getModelBounds(null);
    assertEquals(new Rectangle(), bounds);
  }
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.