Package org.kie.uberfire.client.common

Examples of org.kie.uberfire.client.common.SmallLabel


    private void refreshAttributeWidget() {
        this.attributeConfigWidget.clear();
        if ( model.getMetadataCols().size() > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new HTML( "  " ) );
            hp.add( new SmallLabel( new StringBuilder( GuidedDecisionTableConstants.INSTANCE.Metadata1() )
                                            .append( GuidedDecisionTableConstants.COLON ).toString() ) );
            attributeConfigWidget.add( hp );
        }
        for ( MetadataCol52 atc : model.getMetadataCols() ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
            hp.add( new HTML( "    " ) );
            if ( !isReadOnly ) {
                hp.add( removeMeta( atc ) );
            }
            final SmallLabel label = makeColumnLabel( atc );
            hp.add( label );

            final MetadataCol52 at = atc;
            final CheckBox hide = new CheckBox( new StringBuilder( GuidedDecisionTableConstants.INSTANCE.HideThisColumn() ).append( GuidedDecisionTableConstants.COLON ).toString() );
            hide.setStyleName( "form-field" );
            hide.setValue( atc.isHideColumn() );
            hide.addClickHandler( new ClickHandler() {
                public void onClick( ClickEvent sender ) {
                    final MetadataCol52 clonedAt = at.cloneColumn();
                    at.setHideColumn( hide.getValue() );
                    dtable.setColumnVisibility( at,
                                                !at.isHideColumn() );
                    setColumnLabelStyleWhenHidden( label,
                                                   hide.getValue() );
                    fireUpdateColumn( identity.getName(), clonedAt, at, clonedAt.diff( at ) );
                }
            } );
            hp.add( new HTML( "  " ) );
            hp.add( hide );

            attributeConfigWidget.add( hp );
        }
        if ( model.getAttributeCols().size() > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new HTML( "  " ) );
            hp.add( new SmallLabel( GuidedDecisionTableConstants.INSTANCE.Attributes() ) );
            attributeConfigWidget.add( hp );
        }

        for ( AttributeCol52 atc : model.getAttributeCols() ) {
            final AttributeCol52 at = atc;
            HorizontalPanel hp = new HorizontalPanel();
            hp.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );

            hp.add( new HTML( "    " ) );
            if ( !isReadOnly ) {
                hp.add( removeAttr( at ) );
            }
            final SmallLabel label = makeColumnLabel( atc );
            hp.add( label );

            final Widget defaultValue = DefaultValueWidgetFactory.getDefaultValueWidget( atc,
                                                                                         isReadOnly, new DefaultValueWidgetFactory.DefaultValueChangedEventHandler() {
                @Override
                public void onDefaultValueChanged( DefaultValueWidgetFactory.DefaultValueChangedEvent event ) {
                    final AttributeCol52 clonedAt = at.cloneColumn();
                    clonedAt.setDefaultValue( event.getOldDefaultValue() );
                    fireUpdateColumn( identity.getName(), clonedAt, at, clonedAt.diff( at ) );
                }
            } );

            if ( at.getAttribute().equals( RuleAttributeWidget.SALIENCE_ATTR ) ) {
                hp.add( new HTML( "  " ) );
                final CheckBox useRowNumber = new CheckBox( GuidedDecisionTableConstants.INSTANCE.UseRowNumber() );
                useRowNumber.setStyleName( "form-field" );
                useRowNumber.setValue( at.isUseRowNumber() );
                useRowNumber.setEnabled( !isReadOnly );
                hp.add( useRowNumber );

                hp.add( new SmallLabel( "(" ) );
                final CheckBox reverseOrder = new CheckBox( GuidedDecisionTableConstants.INSTANCE.ReverseOrder() );
                reverseOrder.setStyleName( "form-field" );
                reverseOrder.setValue( at.isReverseOrder() );
                reverseOrder.setEnabled( at.isUseRowNumber() && !isReadOnly );

                useRowNumber.addClickHandler( new ClickHandler() {
                    public void onClick( ClickEvent sender ) {
                        final AttributeCol52 clonedAt = at.cloneColumn();
                        at.setUseRowNumber( useRowNumber.getValue() );
                        reverseOrder.setEnabled( useRowNumber.getValue() );
                        dtable.updateSystemControlledColumnValues();
                        fireUpdateColumn( identity.getName(), clonedAt, at, clonedAt.diff( at ) );
                    }
                } );

                reverseOrder.addClickHandler( new ClickHandler() {
                    public void onClick( ClickEvent sender ) {
                        final AttributeCol52 clonedAt = at.cloneColumn();
                        at.setReverseOrder( reverseOrder.getValue() );
                        dtable.updateSystemControlledColumnValues();
                        fireUpdateColumn( identity.getName(), clonedAt, at, clonedAt.diff( at ) );
                    }
                } );
                hp.add( reverseOrder );
                hp.add( new SmallLabel( ")" ) );
            }
            hp.add( new HTML( "  " ) );
            hp.add( new SmallLabel( new StringBuilder( GuidedDecisionTableConstants.INSTANCE.DefaultValue() ).append( GuidedDecisionTableConstants.COLON ).toString() ) );
            hp.add( defaultValue );

            final CheckBox hide = new CheckBox( new StringBuilder( GuidedDecisionTableConstants.INSTANCE.HideThisColumn() ).append( GuidedDecisionTableConstants.COLON ).toString() );
            hide.setStyleName( "form-field" );
            hide.setValue( at.isHideColumn() );
View Full Code Here


        UpdateColumnAuditLogEntry entry = new UpdateColumnAuditLogEntry( userName, originCol, newCol, diffs );
        model.getAuditLog().add( entry );
    }

    private SmallLabel makeColumnLabel( MetadataCol52 mdc ) {
        SmallLabel label = new SmallLabel( mdc.getMetadata() );
        setColumnLabelStyleWhenHidden( label,
                                       mdc.isHideColumn() );
        return label;
    }
View Full Code Here

                                       mdc.isHideColumn() );
        return label;
    }

    private SmallLabel makeColumnLabel( AttributeCol52 ac ) {
        SmallLabel label = new SmallLabel( ac.getAttribute() );
        setColumnLabelStyleWhenHidden( label,
                                       ac.isHideColumn() );
        return label;
    }
View Full Code Here

            public void onClick( ClickEvent event ) {
                ListBox rules = new ListBox( true );
                for ( String ruleName : executionTrace.getRulesFired() ) {
                    rules.addItem( ruleName );
                }
                add( new SmallLabel( "&nbsp:" + TestScenarioConstants.INSTANCE.RulesFired() ) );
                add( rules );
                show.setVisible( false );
            }
        } );
View Full Code Here

                        g.setWidget( row,
                                     0,
                                     getEventImage( lg[ 0 ] ) );
                        g.setWidget( row,
                                     1,
                                     new SmallLabel( lg[ 1 ] ) );
                    } else {
                        g.setWidget( row,
                                     1,
                                     hz( getEventImage( lg[ 0 ] ),
                                         new SmallLabel( lg[ 1 ] ) ) );
                    }
                    row++;
                } else if ( id == 6 ) {
                    firing = true;
                    g.setWidget( row,
                                 0,
                                 getEventImage( lg[ 0 ] ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<b>" + lg[ 1 ] + "</b>" ) );
                    row++;
                } else if ( id == 7 ) {
                    firing = false;
                } else {
                    g.setWidget( row,
                                 0,
                                 getEventImage( lg[ 0 ] ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<font color='grey'>" + lg[ 1 ] + "</font>" ) );
                    row++;
                }
            } else {
                g.setWidget( row,
                             0,
                             new Image( AuditEventsImages.INSTANCE.miscEvent() ) );
                g.setWidget( row,
                             1,
                             new SmallLabel( "<font color='grey'>" + lg[ 1 ] + "</font>" ) );
                row++;
            }
        }
        vp.add( g );
        vp.add( new HTML( "<hr/>" ) );
View Full Code Here

                                         HasHorizontalAlignment.ALIGN_CENTER,
                                         HasVerticalAlignment.ALIGN_MIDDLE );
        setStyleName( "modeller-fact-pattern-Widget" );
        setWidget( 0,
                   0,
                   new SmallLabel( TestScenarioConstants.INSTANCE.DeleteFacts() ) );
        getFlexCellFormatter().setColSpan( 0,
                                           0,
                                           2 );

        int row = 1;
        for ( Fixture fixture : retractList ) {
            if ( fixture instanceof RetractFact ) {
                final RetractFact retractFact = (RetractFact) fixture;
                setWidget( row,
                           0,
                           new SmallLabel( retractFact.getName() ) );

                setWidget( row,
                           1,
                           new DeleteButton( retractFact ) );
View Full Code Here

                           widgets( lit,
                                    new InfoPopup( TestScenarioConstants.INSTANCE.LiteralValue(),
                                                   TestScenarioConstants.INSTANCE.LiteralValTip() ) ) );

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

        // If we are here, then there must be a bound variable compatible with
        // me

        Button variable = new Button( TestScenarioConstants.INSTANCE.BoundVariable() );
View Full Code Here

                                               HasHorizontalAlignment.ALIGN_CENTER,
                                               HasVerticalAlignment.ALIGN_MIDDLE );
        outer.setStyleName( "modeller-fact-pattern-Widget" );
        outer.setWidget( 0,
                         0,
                         new SmallLabel( TestScenarioConstants.INSTANCE.ActivateRuleFlowGroup() ) );
        outer.getFlexCellFormatter().setColSpan( 0,
                                                 0,
                                                 2 );

        int row = 1;
        for ( Fixture fixture : retList ) {
            final ActivateRuleFlowGroup acticateRuleFlowGroup = (ActivateRuleFlowGroup) fixture;
            outer.setWidget( row,
                             0,
                             new SmallLabel( acticateRuleFlowGroup.getName() ) );
            Image image = CommonAltedImages.INSTANCE.DeleteItemSmall();
            image.setAltText( TestScenarioConstants.INSTANCE.RemoveThisRuleFlowActivation() );
            ImageButton del = new ImageButton( image,
                                               TestScenarioConstants.INSTANCE.RemoveThisRuleFlowActivation(),
                                               new ClickHandler() {
View Full Code Here

        form.addAttribute( TestScenarioConstants.INSTANCE.LiteralValue() + ":",
                           widgets( lit,
                                    new InfoPopup( TestScenarioConstants.INSTANCE.Literal(),
                                                   TestScenarioConstants.INSTANCE.LiteralValTip() ) ) );
        form.addRow( new HTML( "<hr/>" ) );
        form.addRow( new SmallLabel( TestScenarioConstants.INSTANCE.AdvancedSection() ) );

        /*
         * If there is a bound variable that is the same type of the current
         * variable type, then show a button
         */
 
View Full Code Here

        add( new ExpectationButton( previousEx,
                                    scenario,
                                    parent,
                                    scenarioWidgetComponentCreator,
                                    oracle ) );
        add( new SmallLabel( TestScenarioConstants.INSTANCE.EXPECT() ) );
        add( new DeleteButton() );
    }
View Full Code Here

TOP

Related Classes of org.kie.uberfire.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.