Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.RootPanel$DefaultRootPanel


  public void onModuleLoad() {
    CheckUser();
  }

  private void setPageHeader() {
    RootPanel rpanel = RootPanel.get("RegHeader");
    //
    HTML html = new HTML("<h2><font color=\"#308A4D\">Sign up for bestfit!</font></h2>Please complete the following form and click 'Submit' at the bottom of this page.</br>");
   
    rpanel.add(html);
   
  }
View Full Code Here


  int Fat=0;
  private ArrayList<Weight> weights = new ArrayList<Weight>();
  private ArrayList<Workout> workouts = new ArrayList<Workout>();
 
  private void setPageHeader() {
    RootPanel rpanel = RootPanel.get("reportheader");
   
    HTML html = new HTML("<h3><b><font color=\"#308A4D\">Your Personal statistics!</font></b></h3>");
   
    rpanel.add(html);
   
  }
View Full Code Here

        return theFrameMock;
    }

    private static RootPanel mockInitRootPanel() {
        RootPanel theRootPanelMock = mock(RootPanel.class);

        PowerMockito.mockStatic(RootPanel.class);
        when(RootPanel.get()).thenReturn(theRootPanelMock);

        return theRootPanelMock;
View Full Code Here

        mockInitJS();

        myGWTStreamingClientConnector.init(new EventServiceAsyncSuccessDummy());

        Frame theFrameMock = mockInitFrame();
        RootPanel theRootPanelMock = mockInitRootPanel(theFrameMock);

        //RootPanel reset caused by the deactivation
        when(theRootPanelMock.remove(theFrameMock)).thenReturn(Boolean.TRUE);

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        //initializes the streaming frame
        myGWTStreamingClientConnector.listen(theEventNotification, null);
View Full Code Here

        mockInitJS();

        myGWTStreamingClientConnector.init(new EventServiceAsyncSuccessDummy());

        Frame theFrameMock = mockInitFrame();
        RootPanel theRootPanelMock = mockInitRootPanel(theFrameMock);

        //RootPanel reset caused by the deactivation
        when(theRootPanelMock.remove(theFrameMock)).thenReturn(Boolean.TRUE);

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        //initializes the streaming frame
        myGWTStreamingClientConnector.listen(theEventNotification, null);
View Full Code Here

        mockInitJS();

        myGWTStreamingClientConnector.init(new EventServiceAsyncSuccessDummy());

        Frame theFrameMock = mockInitFrame();
        RootPanel theRootPanelMock = mockInitRootPanel(theFrameMock);

        //RootPanel reset caused by the deactivation
        when(theRootPanelMock.remove(theFrameMock)).thenReturn(Boolean.TRUE);

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        //initializes the streaming frame
        myGWTStreamingClientConnector.listen(theEventNotification, null);
View Full Code Here

        mockInitJS();

        myGWTStreamingClientConnector.init(new EventServiceAsyncSuccessDummy());

        Frame theFrameMock = mockInitFrame();
        RootPanel theRootPanelMock = mockInitRootPanel(theFrameMock);

        //RootPanel reset caused by the deactivation
        when(theRootPanelMock.remove(theFrameMock)).thenReturn(Boolean.TRUE);

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        //initializes the streaming frame
        myGWTStreamingClientConnector.listen(theEventNotification, null);
        assertFalse(theEventNotification.isNotified());
        assertFalse(theEventNotification.isAborted);

        //deactivate / remove the streaming frame
        myGWTStreamingClientConnector.deactivate();

        assertFalse(theEventNotification.isNotified());
        assertFalse(theEventNotification.isAborted);

        theFrameMock = mockInitFrame();
        theRootPanelMock = mockInitRootPanel(theFrameMock);

        //RootPanel reset caused by the deactivation
        when(theRootPanelMock.remove(theFrameMock)).thenReturn(Boolean.TRUE);

        //re-initializes the streaming frame
        myGWTStreamingClientConnector.listen(theEventNotification, null);
        assertFalse(theEventNotification.isNotified());
        assertFalse(theEventNotification.isAborted);
View Full Code Here

        return theFrameMock;
    }

    private static RootPanel mockInitRootPanel(Frame aFrame) {
        RootPanel theRootPanelMock = mock(RootPanel.class);
        theRootPanelMock.add(aFrame);

        PowerMockito.mockStatic(RootPanel.class);
        when(RootPanel.get()).thenReturn(theRootPanelMock);

        return theRootPanelMock;
View Full Code Here

               
                String title = jo.get("title").toString();
                HTML html = new HTML(title);
                html.addStyleName("nukePollTitle");
               
                RootPanel panel = RootPanel.get("poll");
                panel.add(html);
               
                jv = jo.get("item");
                JSONArray ja = jv.isArray();
               
                for(int i = 0; i < ja.size(); i++) {
                    jv = ja.get(i);
                    jo = jv.isObject();
                   
                    String descr = jo.get("description").toString();
                    String count = jo.get("count").toString();
                   
                    if(mSelectedPollId == null) {
                        final Integer index = new Integer(i);
                        RadioButton radio = new RadioButton("pollSelection", descr);
                        radio.addStyleName("pollItem");
                        radio.addClickListener(new ClickListener() {
                            public void onClick(Widget pSender) {
                                mSelectedPollId = index;
                                //RootPanel.get("poll").clear();
                                run();
                            }
                        });
                        panel.add(radio);
                    } else {
                        html = new HTML("<div class='pollItem'>" + descr + ": " + count + "</div>");
                        panel.add(html);
                    }
                }
               
            } catch (JSONException e) {
                Window.alert(e.getMessage());
View Full Code Here

                JSONValue jv = jo.get("news:news");
                jo = jv.isObject();
               
                jv = jo.get("entry");
               
                RootPanel panel = RootPanel.get("news");
                panel.clear();
               
                // last index reached
                String title = "";
                String date = "";
                String summary = "";
                String text = "";
                if(jv == null) {
                    title = "No additional news found!";
                } else {
                    jo = jv.isObject();
                    title = jo.get("title").toString();
                    date = jo.get("date").toString();
                    summary = jo.get("summary").toString();
                    text = jo.get("text").toString();
                }
               
                HTML html = new HTML("<div class='nukeNewsEntry'>"
                        + "<span class='nukeNewsDate'>" + date + "</span>"
                        + "<span class='nukeNewsTitle'>" + title + "</span>"
                        + "<div class='nukeNewsSummary'>" + summary + "</div>"
                        + "<div class='nukeNewsText'>" + text + "</div>"
                        + "</div>");
                panel.add(html);
               
                Hyperlink href = new Hyperlink("Previous Entry", "news"+(mNewsIndex.intValue()-1));
                if(mNewsIndex.intValue() > 1) href.setVisible(true);
                else href.setVisible(false);
                href.addStyleName("nukeNewsPrevHref");
                panel.add(href);
               
                href.addClickListener(new ClickListener() {
                    public void onClick(Widget pSender) {
                        mNewsIndex = new Integer(mNewsIndex.intValue()-1);
                        run();
                    }
                });
               
                href = new Hyperlink("Next Entry", "news"+(mNewsIndex.intValue()+1));
                if(jv == null) href.setVisible(false);
                else href.setVisible(true);
                href.addStyleName("nukeNewsNextHref");
                panel.add(href);
               
                href.addClickListener(new ClickListener() {
                    public void onClick(Widget pSender) {
                        mNewsIndex = new Integer(mNewsIndex.intValue()+1);
                        run();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.RootPanel$DefaultRootPanel

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.