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

Examples of com.google.gwt.user.client.ui.DecoratorPanel


            double CalsPerDay = Landing.bmr + 3500
                * (TargetWeight - CurrentWeight) / diff;

            RootPanel root = RootPanel.get("CalPerDay");

            DecoratorPanel perDayDecoratorPanel = new DecoratorPanel();
            perDayDecoratorPanel.setWidth("180px");
            root.add(perDayDecoratorPanel);

            FlexTable cPerDayFlexTable = new FlexTable();

            String message = "";

            double gainedToday = Landing.mealCal
                - Landing.workoutCal;

            int a = (int) CalsPerDay;

            message = "<b>Daily net calorie: </b></br><pre>        "
                + (int)CalsPerDay + " cal/day</pre>";

            message += "<b>From today's meal/workout: </b></br><pre>        "
                + (int) gainedToday + " cal</pre>";

            double resultCals = (int) (CalsPerDay - gainedToday);

            resultCals = 0 - resultCals;

            if (resultCals > a) {
              int res = (int) (CalsPerDay - gainedToday);

              if (res > 0) {
                message += "<b>Exceeded your goal by : </b></br><pre>        "
                    + res + " cal</pre>";
              } else {
                res = 0 - res;
                message += "<b>Exceeded your goal by : </b></br><pre>        "
                    + res + " cal</pre>";
              }

            } else {

              if (resultCals > 0) {
                message += "<b>You can eat up to: </b></br><pre>        "
                    + resultCals + " cal</pre>";
              } else {
                resultCals = 0 - resultCals;
                message += "<b>You can eat up to: </b></br><pre>        "
                    + resultCals + " cal</pre>";
              }
            }

            HTML html = new HTML(message);
            cPerDayFlexTable.setWidget(0, 0, html);
            cPerDayFlexTable.getCellFormatter().addStyleName(0, 0,
                "calorieSummary");
            perDayDecoratorPanel.add(cPerDayFlexTable);

          }

          @Override
          public void onFailure(Throwable caught) {
View Full Code Here


      @Override
      public void onSuccess(String result) {

        RootPanel rootPanel = RootPanel.get("WeightCon");

        DecoratorPanel weightDecoratorPanel = new DecoratorPanel();
        weightDecoratorPanel.setWidth("180px");
        rootPanel.add(weightDecoratorPanel);

        FlexTable weightFlexTable = new FlexTable();
        weightDecoratorPanel.setWidget(weightFlexTable);

        Label lblNewLabel = new Label("Your current weight");
        weightFlexTable.setWidget(0, 0, lblNewLabel);

        textBox = new TextBox();
View Full Code Here

      @Override
      public void onSuccess(Bridge result) {
        if (result.goals.size() > 0) {
          RootPanel rootPanel = RootPanel.get("goalHistory");

          DecoratorPanel goalDecoratorPanel = new DecoratorPanel();
          rootPanel.add(goalDecoratorPanel);

          FlexTable weightFlexTable = new FlexTable();
          weightFlexTable.setSize("380px", "80px");
          goalDecoratorPanel.setWidget(weightFlexTable);

          String displayGoal = "";

          Date today = new Date();
View Full Code Here

    ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
    dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
    dynamicTreeWrapper.setSize("300px", "300px");

    // Wrap the dynamic tree in a DecoratorPanel
    DecoratorPanel dynamicDecorator = new DecoratorPanel();
    dynamicDecorator.setWidget(dynamicTreeWrapper);
    dialogContents.add(dynamicDecorator);

    // Add a close button at the bottom of the dialog
    Button nextButton = new Button("Next", new ClickHandler() {
      public void onClick(ClickEvent event) {
View Full Code Here

        final VerticalPanel panel = new VerticalPanel();
        panel.add( cGrid );
        characteristicsAttrPanelMap.put( cGrid, panel );
        //panel.add( addAttributeCellTable( cGrid, characteristic ) );
        panel.setWidth( "100%" );
        DecoratorPanel decoratorPanel = new DecoratorPanel();
        decoratorPanel.add( panel );

        characteristicsPanel.add( decoratorPanel );
        characteristicsPanel.add( gapPanel );
        characteristicsTables.add( cGrid );
View Full Code Here

        final VerticalPanel panel = new VerticalPanel();
        panel.add( cGrid );
        panel.add( addAttributeCellTable( cGrid,
                                          characteristic ) );
        panel.setWidth( "100%" );
        DecoratorPanel decoratorPanel = new DecoratorPanel();
        decoratorPanel.add( panel );

        characteristicsPanel.add( decoratorPanel );
        characteristicsPanel.add( gapPanel );
        characteristicsTables.add( cGrid );
View Full Code Here

    layout.setWidget(1, 1, new TextBox());
    layout.setHTML(2, 0, constants.cwDecoratorPanelFormDescription());
    layout.setWidget(2, 1, new TextBox());

    // Wrap the content in a DecoratorPanel
    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(layout);
    return decPanel;
  }
View Full Code Here

    advancedDisclosure.setContent(advancedOptions);
    layout.setWidget(3, 0, advancedDisclosure);
    cellFormatter.setColSpan(3, 0, 2);

    // Wrap the contents in a DecoratorPanel
    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(layout);
    return decPanel;
  }
View Full Code Here

        } );

        layoutA.setWidget( 3,
                           1,
                           continueButton );
        DecoratorPanel decPanel = new DecoratorPanel();
        decPanel.setWidget( layoutA );
        return decPanel;
    }
View Full Code Here

            }
        } );
        layoutB.setWidget( 5,
                           1,
                           generateButton );
        DecoratorPanel decPanel = new DecoratorPanel();
        decPanel.setWidget( layoutB );
        return decPanel;
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.DecoratorPanel

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.