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

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


      public void onSuccess(InquiryResponse response) {
        if (response.isSuccess()) {
          Business business = response.getBusiness();
          if (table!=null) detailPanel.remove(table);
          table = new FlexTable();
          table.addTableListener(detailPanel);
          detailPanel.add(table);
          int row = 0;
          for (Service service : business.getServices()) {
            table.getCellFormatter().addStyleName(row, 1, "ListHeader");
View Full Code Here


      public void onSuccess(InquiryResponse response) {
        if (response.isSuccess()) {
          Business business = response.getBusiness();
          if (table!=null) detailPanel.remove(table);
          table = new FlexTable();
          detailPanel.add(table);
          table.addTableListener(detailPanel);
          int row = 0;
          table.getCellFormatter().addStyleName(row, 1, "ListHeader");
          table.setHTML(row, 0, UDDIBrowser.images.business().getHTML());
View Full Code Here

      public void onSuccess(InquiryResponse response) {
        if (response.isSuccess()) {
          Service service = response.getService();
          if (table!=null) detailPanel.remove(table);
          table = new FlexTable();
          table.setWidth("100%");
          table.setCellSpacing(0);
          table.setCellPadding(4);
          detailPanel.add(table);
          table.addTableListener(detailPanel);
          int row = 0;
          table.getCellFormatter().addStyleName(row, 1, "ListHeader");
          table.setHTML(row, 0, UDDIBrowser.images.service().getHTML());
          table.setHTML(row++, 1, service.getName());
          table.setHTML(row, 0, UDDIBrowser.images.key().getHTML());
          table.setText(row++, 1, service.getKey());
          table.setHTML(row, 0, UDDIBrowser.images.description().getHTML());
          table.setText(row++, 1, service.getDescription());
         
          for (ServiceBinding serviceBinding : service.getServiceBindings()) {
           
            table.setHTML(row, 0, UDDIBrowser.images.bindingtemplate().getHTML());
            table.setText(row++, 1, "Binding Template");
           
            int bindingRow = 0;
            FlexTable bindingtable = new FlexTable();
            bindingtable.setHTML(bindingRow, 0, UDDIBrowser.images.key().getHTML());
            bindingtable.setText(bindingRow++, 1, serviceBinding.getKey());
            bindingtable.setHTML(bindingRow, 0, UDDIBrowser.images.description().getHTML());
            bindingtable.setText(bindingRow++, 1,  serviceBinding.getDescription());
            bindingtable.setHTML(bindingRow, 0, UDDIBrowser.images.endpointlive().getHTML());
           
            // For JBossESB or others using "other" as UrlType, don't display the accesspoint as
            // http URL
            if (OTHER_BINDING_TYPE.equals(serviceBinding.getUrlType())) {
              bindingtable.setHTML(bindingRow++, 1, serviceBinding.getUrlType() + ":"
                  new HTML(serviceBinding.getAccessPoint()).getHTML());             
            } else {
              bindingtable.setHTML(bindingRow++, 1, serviceBinding.getUrlType() + ":"
                new HTML("<a href='"
                + serviceBinding.getAccessPoint() + "'>"
                + serviceBinding.getAccessPoint() + "</a>").getHTML());
            }
            table.setHTML(row++, 1, bindingtable.toString());
          }
        } else {
          Window.alert("error: " + response.getMessage());
        }
      }
View Full Code Here

    } else {
      this.subscription = subscription;
      toClerkName = subscription.getToClerkName();
    }
   
    flexTable = new FlexTable();
    add(flexTable);
    drawPanel();
   
  }
View Full Code Here

      newPublisher();
    } else {
      this.publisher = publisher;
    }
   
    FlexTable flexTable = new FlexTable();
    add(flexTable);

    Label id = new Label ("Id:");
    id.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(0, 0, id);
    idBox.setText(this.publisher.getAuthorizedName());
    idBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(0, 1, idBox);
   
    Label name = new Label ("Name:");
    name.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(1, 0, name);
    nameBox.setText(this.publisher.getPublisherName());
    nameBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(1, 1,nameBox);
   
    Label email = new Label ("Email:");
    email.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(2, 0,email);
    emailAddressBox.setText(this.publisher.getEmailAddress());
    emailAddressBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(2, 1,emailAddressBox);
   
    Label isAdmin = new Label ("Is Admin:");
    isAdmin.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(3, 0,isAdmin);
    isAdminBox.setChecked("true".equalsIgnoreCase(this.publisher.getIsAdmin()));
    isAdminBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(3, 1,isAdminBox);
   
    Label isEnabled = new Label ("Is Enabled:");
    isEnabled.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(4, 0,isEnabled);
    isEnabledBox.setChecked("true".equalsIgnoreCase(this.publisher.getIsEnabled()));
    isEnabledBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(4, 1,isEnabledBox);
   
    Label maxBusinesses = new Label ("Max Businesses:");
    maxBusinesses.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(5, 0,maxBusinesses);
    maxBusinessesBox.setText(String.valueOf(this.publisher.getMaxBusinesses()));
    maxBusinessesBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(5, 1,maxBusinessesBox);
   
    Label maxServicesPerBusiness = new Label ("Max Service Per Business:");
    maxServicesPerBusiness.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(6, 0,maxServicesPerBusiness);
    maxServicesPerBusinessBox.setText(String.valueOf(this.publisher.getMaxServicePerBusiness()));
    maxServicesPerBusinessBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(6, 1,maxServicesPerBusinessBox);
   
    Label maxBindingsPerService = new Label ("Max Bindings Per Service:");
    maxBindingsPerService.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(7, 0,maxBindingsPerService);
    maxBindingsPerServiceBox.setText(String.valueOf(this.publisher.getMaxBindingsPerService()));
    maxBindingsPerServiceBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(7, 1,maxBindingsPerServiceBox);
   
    Label maxTModels = new Label ("Max TModels:");
    maxTModels.setStyleName("portlet-form-field-label-right");
    flexTable.setWidget(8, 0,maxTModels);
    maxTModelBox.setText(String.valueOf(this.publisher.getMaxTModels()));
    maxTModelBox.setStyleName("portlet-form-input-field");
    flexTable.setWidget(8, 1,maxTModelBox);
   
  }
View Full Code Here

     */
    public AssetCategoryEditor(MetaData d,
                               boolean readOnly) {
        this.data = d;

        list = new FlexTable();
        this.readOnly = readOnly;
        loadData( list );
        list.setStyleName( "rule-List" );
        layout.setWidget( 0,
                          0,
View Full Code Here

        makeDirty();
        resetBox();
    }

    private void resetBox() {
        list = new FlexTable();
        list.setStyleName( "rule-List" );
        layout.setWidget( 0,
                          0,
                          list );
        loadData( list );
View Full Code Here

        this.actions = eng.actionDSLSentences;
        this.conditions = eng.conditionDSLSentences;

        text.setStyleName( "dsl-text-Editor" ); //NON-NLS

        FlexTable layout = new FlexTable();
        layout.setWidget( 0,
                          0,
                          text );

        text.addChangeHandler( new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                data.content = text.getText();
                makeDirty();
            }
        } );

        text.addKeyDownHandler( new KeyDownHandler() {
            public void onKeyDown(KeyDownEvent event) {
                if ( event.getNativeKeyCode() == ' ' && event.getNativeKeyCode() == KeyCodes.KEY_CTRL ) {
                    showInTextOptions();
                }

                if ( event.getNativeKeyCode() == KeyCodes.KEY_TAB ) {
                    int nextPos = text.getCursorPos() + 1;
                    text.cancelKey();
                    insertText( "\t" );
                    text.setCursorPos( nextPos );

                }
            }
        } );

        VerticalPanel vert = new VerticalPanel();

        Image lhsOptions = new ImageButton( images.newDSLPattern() );
        final String msg = constants.AddANewCondition();
        lhsOptions.setTitle( msg );
        lhsOptions.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                showSuggestions( conditions );
            }
        } );

        Image rhsOptions = new ImageButton( images.newDSLAction() );
        final String msg2 = constants.AddAnAction();
        rhsOptions.setTitle( msg2 );
        rhsOptions.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                showSuggestions( actions );
            }
        } );

        vert.add( lhsOptions );
        vert.add( rhsOptions );

        layout.setWidget( 0,
                          1,
                          vert );

        layout.getCellFormatter().setWidth( 0,
                                            0,
                                            "95%" );
        layout.getFlexCellFormatter().setAlignment( 0,
                                                    0,
                                                    HasHorizontalAlignment.ALIGN_LEFT,
                                                    HasVerticalAlignment.ALIGN_TOP );
        layout.getCellFormatter().setWidth( 0,
                                            1,
                                            "5%" );
        layout.getFlexCellFormatter().setAlignment( 0,
                                                    1,
                                                    HasHorizontalAlignment.ALIGN_CENTER,
                                                    HasVerticalAlignment.ALIGN_MIDDLE );

        layout.setWidth( "100%" );
        layout.setHeight( "100%" );

        initWidget( layout );
    }
View Full Code Here

        outer.setWidget( 0,
                         0,
                         new SmallLabel( constants.ExpectRules() ) );
        initWidget( outer );

        FlexTable data = render( rfl,
                                 scenario );
        outer.setWidget( 1,
                         0,
                         data );
    }
View Full Code Here

                         data );
    }

    private FlexTable render(final FixtureList rfl,
                             final Scenario sc) {
        FlexTable data = new DirtyableFlexTable();

        for ( int i = 0; i < rfl.size(); i++ ) {
            final VerifyRuleFired v = (VerifyRuleFired) rfl.get( i );

            if ( showResults && v.getSuccessResult() != null ) {
                if ( !v.getSuccessResult().booleanValue() ) {
                    data.setWidget( i,
                                    0,
                                    new Image( images.warning() ) );
                    data.setWidget( i,
                                    4,
                                    new HTML( constants.ActualResult(v.getActualResult().toString()) ) );

                    data.getCellFormatter().addStyleName( i,
                                                          4,
                                                          "testErrorValue" ); //NON-NLS

                } else {
                    data.setWidget( i,
                                    0,
                                    new Image( images.testPassed() ) );
                }

            }
            data.setWidget( i,
                            1,
                            new SmallLabel( v.getRuleName() + ":" ) );
            data.getFlexCellFormatter().setAlignment( i,
                                                      1,
                                                      HasHorizontalAlignment.ALIGN_RIGHT,
                                                      HasVerticalAlignment.ALIGN_MIDDLE );

            final ListBox b = new ListBox();
            b.addItem( constants.firedAtLeastOnce(),
                       "y" );
            b.addItem( constants.didNotFire(),
                       "n" );
            b.addItem( constants.firedThisManyTimes(),
                       "e" );
            final TextBox num = new TextBox();
            num.setVisibleLength( 5 );

            if ( v.getExpectedFire() != null ) {
                b.setSelectedIndex( (v.getExpectedFire().booleanValue()) ? 0 : 1 );
                num.setVisible( false );
            } else {
                b.setSelectedIndex( 2 );
                String xc = (v.getExpectedCount() != null) ? "" + v.getExpectedCount().intValue() : "0";
                num.setText( xc );
            }

            b.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    String s = b.getValue( b.getSelectedIndex() );
                    if ( s.equals( "y" ) || s.equals( "n" ) ) {
                        num.setVisible( false );
                        v.setExpectedFire( (s.equals( "y" )) ? Boolean.TRUE : Boolean.FALSE );
                        v.setExpectedCount( null );
                    } else {
                        num.setVisible( true );
                        v.setExpectedFire( null );
                        num.setText( "1" );
                        v.setExpectedCount( new Integer( 1 ) );
                    }
                }
            } );

            b.addItem( constants.ChooseDotDotDot() );

            num.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    v.setExpectedCount( new Integer( num.getText() ) );
                }
            } );

            HorizontalPanel h = new HorizontalPanel();
            h.add( b );
            h.add( num );
            data.setWidget( i,
                            2,
                            h );

            Image del = new ImageButton( images.deleteItemSmall(),
                                         constants.RemoveThisRuleExpectation(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 if ( Window.confirm( constants.AreYouSureYouWantToRemoveThisRuleExpectation() ) ) {
                                                     rfl.remove( v );
                                                     sc.removeFixture( v );
                                                     outer.setWidget( 1,
                                                                      0,
                                                                      render( rfl,
                                                                              sc ) );
                                                 }
                                             }
                                         } );

            data.setWidget( i,
                            3,
                            del );

            //we only want numbers here...
            num.addKeyPressHandler( new KeyPressHandler() {
View Full Code Here

TOP

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

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.