Package org.drools.guvnor.client.common

Examples of org.drools.guvnor.client.common.SmallLabel


                           widgets( lit,
                                    new InfoPopup( constants.LiteralValue(),
                                                   constants.LiteralValTip() ) ) );

        form.addRow( new HTML( "<hr/>" ) );
        form.addRow( new SmallLabel( constants.AdvancedOptions() ) );

        // If we are here, then there must be a bound variable compatible with
        // me
        if ( isThereABoundVariableToSet() == true ) {
            Button variable = new Button( constants.BoundVariable() );
View Full Code Here


                }
            } );
        }

        HorizontalPanel created = new HorizontalPanel();
        created.add( new SmallLabel( constants.AfterColon() ) );
        final DatePickerTextBox createdAfter = new DatePickerTextBox( "" );
        created.add( createdAfter );

        created.add( new SmallLabel( "&nbsp;" ) ); // NON-NLS

        created.add( new SmallLabel( constants.BeforeColon() ) );
        final DatePickerTextBox createdBefore = new DatePickerTextBox( "" );
        created.add( createdBefore );

        fm.addAttribute( constants.DateCreated1(),
                created );

        HorizontalPanel lastMod = new HorizontalPanel();
        lastMod.add( new SmallLabel( constants.AfterColon() ) );
        final DatePickerTextBox lastModAfter = new DatePickerTextBox( "" );
        lastMod.add( lastModAfter );

        lastMod.add( new SmallLabel( "&nbsp;" ) ); // NON-NLS

        lastMod.add( new SmallLabel( constants.BeforeColon() ) );
        final DatePickerTextBox lastModBefore = new DatePickerTextBox( "" );
        lastMod.add( lastModBefore );

        fm.addAttribute( constants.LastModified1(),
                lastMod );
View Full Code Here

                                                 }
                                             } ) );

            grid.setWidget( 0,
                            0,
                            new SmallLabel( "Available Facts" ) ); //TODO i18n
            grid.setWidget( 0,
                            1,
                            new SmallLabel( "" ) );
            grid.setWidget( 0,
                            2,
                            new SmallLabel( "WorkingSet Facts" ) ); //TODO i18n
            grid.setWidget( 1,
                            0,
                            availFacts );
            grid.setWidget( 1,
                            1,
View Full Code Here

                                                           }
                                                       } );

                    g.setWidget( i + 1,
                                 1,
                                 new SmallLabel( p ) );
                    g.setWidget( i + 1,
                                 2,
                                 del );
                }
View Full Code Here

        if ( result == null || result.getLines() == null || result.getLines().size() == 0 ) {
            FormStylePopup pop = new FormStylePopup();
            pop.setWidth( 200 + "px" );
            pop.setTitle( constants.ValidationResultsDotDot() );
            HorizontalPanel h = new HorizontalPanel();
            h.add( new SmallLabel( "<img src='" + new Image( images.greenTick() ).getUrl() + "'/><i>"
                    + constants.ItemValidatedSuccessfully() + "</i>" ) );
            pop.addRow( h );
            pop.show();
        } else {
            FormStylePopup pop = new FormStylePopup( images.packageBuilder(),
View Full Code Here

        } );

        final FlexTable table = new FlexTable();

        VerticalPanel vp = new VerticalPanel();
        vp.add( new SmallLabel( constants.FactTypes() ) );
        vp.add( factsCombo );
        table.setWidget( 0,
                         0,
                         vp );

        vp = new VerticalPanel();
        vp.add( new SmallLabel( constants.Field() ) );
        vp.add( fieldsCombo );
        table.setWidget( 1,
                         0,
                         vp );

        vp = new VerticalPanel();
        vp.add( new SmallLabel( "Custom Form URL:" ) ); //TODO i18n

        Button btnUpdateURL = new Button( constants.OK(),
                                          new ClickHandler() {
                                              public void onClick(ClickEvent event) {

                                                  int w;
                                                  int h;

                                                  try {
                                                      w = Integer.parseInt( customFormWidth.getText() );
                                                      h = Integer.parseInt( customFormHeight.getText() );
                                                  } catch ( NumberFormatException ex ) {
                                                      Window.alert( "Width and Height must be integer values!" ); //TODO: I18N
                                                      return;
                                                  }

                                                  if ( ((WorkingSetConfigData) workingSet.getContent()).customForms == null ) {
                                                      ((WorkingSetConfigData) workingSet.getContent()).customForms = new ArrayList<CustomFormConfiguration>();
                                                  }

                                                  String factType = factsCombo.getItemText( factsCombo.getSelectedIndex() );
                                                  String fieldName = fieldsCombo.getItemText( fieldsCombo.getSelectedIndex() );

                                                  CustomFormConfiguration newCustomFormConfiguration = CustomFormsContainer.getEmptyCustomFormConfiguration();
                                                  newCustomFormConfiguration.setFactType( factType );
                                                  newCustomFormConfiguration.setFieldName( fieldName );
                                                  newCustomFormConfiguration.setCustomFormURL( customFormURL.getText() );
                                                  newCustomFormConfiguration.setCustomFormWidth( w );
                                                  newCustomFormConfiguration.setCustomFormHeight( h );

                                                  workingSetEditor.getCustomFormsContainer().putCustomForm( newCustomFormConfiguration );
                                                  ((WorkingSetConfigData) workingSet.getContent()).customForms = workingSetEditor.getCustomFormsContainer().getCustomForms();
                                              }
                                          } );

        vp.add( customFormURL );
        vp.add( new SmallLabel( "Width:" ) );
        vp.add( customFormWidth );
        vp.add( new SmallLabel( "Height:" ) );
        vp.add( customFormHeight );
        table.setWidget( 2,
                         0,
                         vp );
View Full Code Here

        FormStyleLayout layout = new FormStyleLayout();
        //Adding metadata here, seems redundant to add a new widget for metadata. Model does handle meta data separate.
        RuleMetadata[] meta = model.metadataList;
        if ( meta.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( constants.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute( rmd.attributeName,
                                 getEditorWidget( rmd,
                                                  i ) );
        }
        RuleAttribute[] attrs = model.attributes;
        if ( attrs.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( constants.Attributes1() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < attrs.length; i++ ) {
            RuleAttribute at = attrs[i];
            layout.addAttribute( at.attributeName,
View Full Code Here

        final VerticalPanel panel = new VerticalPanel();

        HorizontalPanel hp = new HorizontalPanel();

        hp.add( new SmallLabel( constants.FactTypes() ) );
        hp.add( new ClickableLabel( constants.hide(),
                                    new ClickHandler() {
                                        public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
                                            panel.setVisible( false );
                                        }
View Full Code Here

        }
        lastCount = ls.size();
    }

    private Widget appendComment(DiscussionRecord r) {
        SmallLabel hrd = new SmallLabel( constants.smallCommentBy0On1Small(r.author,
                                                        new Date( r.timestamp )) );
        hrd.addStyleName( "discussion-header" );
        commentList.add( hrd );

        String[] parts = r.note.split( "\n" );

        if ( parts.length > 0 ) {
View Full Code Here

                                              "5%" );

        if ( this.showLHS() ) {
            layout.setWidget( currentLayoutRow,
                              0,
                              new SmallLabel( "<b>" + constants.WHEN() + "</b>" ) );

            if ( !lockLHS() ) {
                layout.setWidget( currentLayoutRow,
                                  2,
                                  addPattern );
            }
            currentLayoutRow++;

            renderLhs( this.model );
        }

        if ( this.showRHS() ) {
            layout.setWidget( currentLayoutRow,
                              0,
                              new SmallLabel( "<b>" + constants.THEN() + "</b>" ) );

            Image addAction = new ImageButton( images.newItem() );
            addAction.setTitle( constants.AddAnActionToThisRule() );
            addAction.addClickHandler( new ClickHandler() {

                public void onClick(ClickEvent event) {
                    showActionSelector( (Widget) event.getSource(),
                                        null );
                }
            } );
            if ( !lockRHS() ) {
                layout.setWidget( currentLayoutRow,
                                  2,
                                  addAction );
            }
            currentLayoutRow++;

            renderRhs( this.model );
        }

        if ( showAttributes() ) {

            final int tmp1 = currentLayoutRow;
            final int tmp2 = currentLayoutRow + 1;

            final RuleModeller self = this;
            if ( !this.showingOptions ) {
                ClickableLabel showMoreOptions = new ClickableLabel( "(show options...)",
                                                                     new ClickHandler() {

                                                                         public void onClick(ClickEvent event) {
                                                                             showingOptions = true;
                                                                             layout.setWidget( tmp1,
                                                                                               0,
                                                                                               new SmallLabel( constants.optionsRuleModeller() ) );
                                                                             layout.setWidget( tmp1,
                                                                                               2,
                                                                                               getAddAttribute() );
                                                                             layout.setWidget( tmp2,
                                                                                               1,
                                                                                               new RuleAttributeWidget( self,
                                                                                                                        self.model ) );
                                                                         }
                                                                     } );
                layout.setWidget( tmp1,
                                  0,
                                  showMoreOptions );
            } else {
                layout.setWidget( tmp1,
                                  0,
                                  new SmallLabel( constants.optionsRuleModeller() ) );
                layout.setWidget( tmp1,
                                  2,
                                  getAddAttribute() );
                layout.setWidget( tmp2,
                                  1,
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.common.SmallLabel

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.