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

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


        for(Meal meal:result.meals){
          totalCalc+=meal.totalCalories();
          totalFatCalc+=meal.totalFatCalories();
         
       
        Panel piePanel = RootPanel.get("DailyCalorieComposition");
       

        // Create a pie chart visualization.
        PieChart pie = new PieChart(createTableDailyCaloriesComposition(), createDailyCaloriesCompositionPieOptions());

       
        piePanel.add(pie);
      }

      @Override
      public void onFailure(Throwable caught) {
        // TODO Auto-generated method stub
View Full Code Here


    rpc.getWeightHistory(new AsyncCallback<Bridge>() {

      @Override
      public void onSuccess(Bridge result) {
               
        Panel linePanel = RootPanel.get("WeightHistory");
       
        weights.addAll(result.weightHistory);
        LineChart linechart = new LineChart(createTableWeightHistory(), createLineOptions());
       
        linePanel.add(linechart);
      }

     

      @Override
View Full Code Here

                jo = jv.isObject();
               
                jv = jo.get("message");
                JSONArray ja = jv.isArray();
               
                Panel shoutPanel = (Panel)RootPanel.get("shoutbox");
                shoutPanel.clear();
               
                ScrollPanel chatPanel = new ScrollPanel();
                chatPanel.setSize("200px", "120px");
                shoutPanel.add(chatPanel);
               
                StringBuffer sb = new StringBuffer();
                for(int i = 0; ja != null && i < ja.size(); i++) {
                    String msg = ja.get(i).toString();
                    sb.append("<div class='nukeChatEntry'>"+msg+"</div>");
View Full Code Here

       
        ShoutboxChatRefreshRequest chatRefreshRequest = new ShoutboxChatRefreshRequest();
        chatRefreshRequest.run();
        chatRefreshRequest.scheduleRepeating(6000);
       
        Panel shoutInputPanel = RootPanel.get("shoutboxControl");
        TextBox shoutInput = new TextBox();
        shoutInputPanel.add(shoutInput);
       
        Button shoutSubmit = new Button();
        shoutSubmit.setText("Submit");
        shoutSubmit.addClickListener(new SubmitListener(shoutInput));
        shoutInputPanel.add(shoutSubmit);
       
    }
View Full Code Here

      public void onSave() {
        whitelistModel.saveEntries(whitelistTable.getEntries());
      }
    });
    this.whitelistModel = whitelistModel;
    Panel buttonPanel = new VerticalPanel();
    Button addButton = new Button("Add Entry");
    addButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        addPopup.setGlassEnabled(true);
        addPopup.setPopupPosition(100, 100);
        addPopup.setVisible(true);
        addPopup.show();
      }
    });
    buttonPanel.add(addButton);
    panel.add(buttonPanel);
    initWidget(panel);
    addPopup = new AddWhitelistEntryPopup(resources);
    addPopup.setSize("500px", "150px");
  }
View Full Code Here

      cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          addPopup.hide();
        }
      });
      Panel buttonPanel = new HorizontalPanel();
      buttonPanel.add(cancelButton);
      buttonPanel.add(addButton);
      popupPanel.add(buttonPanel);
      addButton.setFocus(true);
    }
View Full Code Here

        return box;
    }

    private Widget listEditor(final ValueChanged changed) {
        Panel panel = new VerticalPanel();
        int i = 0;
        for ( final FieldData f : this.field.collectionFieldList ) {

            DirtyableHorizontalPane hpanel = new DirtyableHorizontalPane();

            FieldDataConstraintEditor fieldElement = new FieldDataConstraintEditor( f.collectionType,
                                                                                    new ValueChanged() {
                                                                                        public void valueChanged(String newValue) {
                                                                                            f.setValue( newValue );
                                                                                            calculateValueFromList();
                                                                                            makeDirty();
                                                                                        }
                                                                                    },
                                                                                    f,
                                                                                    givenFact,
                                                                                    sce,
                                                                                    scenario,
                                                                                    executionTrace );
            hpanel.add( fieldElement );
            final int index = i;
            Image del = new ImageButton( images.deleteItemSmall(),
                                         constants.AElementToDelInCollectionList(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 field.collectionFieldList.remove( index );
                                                 calculateValueFromList();
                                                 refreshEditor();
                                             }
                                         } );

            hpanel.add( del );

            Image addPattern = new ImageButton( images.newItemBelow() );
            addPattern.setTitle( constants.AddElementBelow() );

            addPattern.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    FieldData newFieldData = new FieldData();
                    newFieldData.setName( field.getName() );
                    newFieldData.collectionType = field.collectionType;
                    field.collectionFieldList.add( index + 1,
                                                   newFieldData );
                    calculateValueFromList();
                    refreshEditor();
                }
            } );
            hpanel.add( addPattern );
            Image moveDown = new ImageButton( images.shuffleDown() );
            moveDown.setTitle( constants.MoveDownListMove() );
            moveDown.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    if ( index < field.collectionFieldList.size() - 1 ) {
                        FieldData onMyLine = field.collectionFieldList.get( index );
                        FieldData onDown = field.collectionFieldList.get( index + 1 );
                        field.collectionFieldList.set( index + 1,
                                                       onMyLine );
                        field.collectionFieldList.set( index,
                                                       onDown );
                        calculateValueFromList();
                        refreshEditor();
                    }
                }
            } );
            hpanel.add( moveDown );

            Image moveUp = new ImageButton( images.shuffleUp() );
            moveUp.setTitle( constants.MoveUpList() );
            moveUp.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    if ( index > 0 ) {
                        FieldData oneUp = field.collectionFieldList.get( index - 1 );
                        FieldData onMyLine = field.collectionFieldList.get( index );
                        field.collectionFieldList.set( index,
                                                       oneUp );
                        field.collectionFieldList.set( index - 1,
                                                       onMyLine );
                        calculateValueFromList();
                        refreshEditor();
                    }
                }
            } );
            hpanel.add( moveUp );
            panel.add( hpanel );
            i++;
        }

        if ( this.field.collectionFieldList.size() == 0 ) {
            Image add = new ImageButton( images.newItem(),
                                         constants.AElementToAddInCollectionList(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 FieldData newFieldData = new FieldData();
                                                 newFieldData.setName( field.getName() );
                                                 newFieldData.collectionType = field.collectionType;
                                                 field.collectionFieldList.add( newFieldData );
                                                 calculateValueFromList();
                                                 refreshEditor();
                                             }
                                         } );
            panel.add( add );
        }
        return panel;
    }
View Full Code Here

    // hide all panels
    for ( Map.Entry<ScheduleType, Panel> me : scheduleTypeMap.entrySet() ) {
      me.getValue().setVisible( false );
    }
    // show the selected panel
    Panel p = scheduleTypeMap.get( scheduleType );
    p.setVisible( true );

    TemporalValue tv = scheduleTypeToTemporalValue( scheduleType );
    if ( null != tv ) {
      // force the recurrence editor to display the appropriate ui
      recurrenceEditor.setTemporalState( tv );
View Full Code Here

    admin.setStyleName( "admin-perspective" );
    admin.getElement().getStyle().clearHeight();
    admin.getElement().getStyle().clearWidth();
    adminPerspective.setWidget( admin );

    Panel adminContentPanel =
        (Panel) container.getDocumentRoot().getElementById( "adminContentPanel" ).getManagedObject();
    adminContentPanel.add( adminContentDeck );
    adminContentDeck.setHeight( "100%" );
    adminContentDeck.getElement().getStyle().setProperty( "height", "100%" );
    fetchPluginOverlays();
  }
View Full Code Here

        if ( container != null ) {
          cancel();
          // call this method when Elements are added to DOM
          GwtTree adminCatTree = (GwtTree) container.getDocumentRoot().getElementById( "adminCatTree" );
          adminCatTree.getTree().removeStyleName( "gwt-Tree" );
          Panel adminContentPanel =
              (Panel) container.getDocumentRoot().getElementById( "adminContentPanel" ).getManagedObject();
          adminContentPanel.setWidth( "100%" );

          for ( int i = 0; i < adminCatTree.getTree().getItemCount(); i++ ) {
            TreeItem treeItem = adminCatTree.getTree().getItem( i );
            Element e = treeItem.getElement();
            e.getStyle().clearPadding();
View Full Code Here

TOP

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

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.