Package org.drools.guvnor.client.common

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


                             String title) {
        Widget widget = layout.getWidget( row,
                                          0 );
        if ( widget instanceof DirtyableHorizontalPane ) {
            DirtyableHorizontalPane horiz = (DirtyableHorizontalPane) widget;
            final Image icon = new ImageButton( img );
            icon.setTitle( title );
            horiz.add( icon );
        }
    }
View Full Code Here


                                           ClickHandler moveDownListener,
                                           ClickHandler moveUpListener) {

        final DirtyableHorizontalPane hp = new DirtyableHorizontalPane();

        Image addPattern = new ImageButton( images.newItemBelow() );
        addPattern.setTitle( title );
        addPattern.addClickHandler( addBelowListener );

        Image moveDown = new ImageButton( images.shuffleDown() );
        moveDown.setTitle( constants.MoveDown() );
        moveDown.addClickHandler( moveDownListener );

        Image moveUp = new ImageButton( images.shuffleUp() );
        moveUp.setTitle( constants.MoveUp() );
        moveUp.addClickHandler( moveUpListener );

        hp.add( addPattern );
        hp.add( moveDown );
        hp.add( moveUp );
View Full Code Here

    }

    private Image getAddButton(final RuleModel model,
                               final Command refresh,
                               final TextBox box) {
        final Image addbutton = new ImageButton( images.newItem() );
        addbutton.setTitle( constants.AddMetadataToTheRule() );

        addbutton.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {

                model.addMetadata( new RuleMetadata( box.getText(),
                                                     "" ) );
View Full Code Here

            type = vf.getName();
            ab.add( new SmallLabel( constants.AFactOfType0HasValues( vf.getName() ) ) );
        }
        this.showResults = showResults;

        Image add = new ImageButton( images.addFieldToFact(),
                                     constants.AddAFieldToThisExpectation(),
                                     new ClickHandler() {
                                         public void onClick(ClickEvent w) {

                                             String[] fields = (String[]) sce.getModelFields( type );
View Full Code Here

            data.setWidget( i,
                            3,
                            cellEditor );

            Image del = new ImageButton( images.deleteItemSmall(),
                                         constants.RemoveThisFieldExpectation(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 if ( Window.confirm( constants.AreYouSureYouWantToRemoveThisFieldExpectation(
                                                                                     fld.getFieldName() ) ) ) {
View Full Code Here

    }

    protected Widget addRemoveButton(Widget w, ClickHandler listener) {
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();

        final Image remove = new ImageButton( images.deleteItemSmall() );
        remove.setTitle( constants.RemoveThisBlockOfData() );
        remove.addClickHandler( listener );

        horiz.setWidth( "100%" );
        w.setWidth( "100%" );

        horiz.add( w );
View Full Code Here

                                            parents,
                                            i );

            //now the clear icon
            final int currentRow = i;
            Image clear = new ImageButton( images.deleteItemSmall() );
            clear.setTitle( constants.RemoveThisWholeRestriction() );
            clear.addClickHandler( createClickHandlerForClearImageButton( currentRow ) );

            if ( !this.readOnly ) {
                //This used to be 5 and Connectives were not rendered
                table.setWidget( currentRow,
                                 6,
View Full Code Here

                                            nested[i],
                                            false,
                                            0 );
                //add in remove icon here...
                final int currentRow = i;
                Image clear = new ImageButton( images.deleteItemSmall() );
                clear.setTitle( constants.RemoveThisNestedRestriction() );
                clear.addClickHandler( new ClickHandler() {

                    public void onClick(ClickEvent event) {
                        if ( Window.confirm( constants.RemoveThisItemFromNestedConstraint() ) ) {
                            setModified( true );
                            constraint.removeConstraint( currentRow );
View Full Code Here

        }
    }

    private Image createaAddConnectiveImageButton(final RuleModeller modeller,
                                                  final SingleFieldConstraint constraint) {
        Image addConnective = new ImageButton( images.addConnective() );
        addConnective.setTitle( constants.AddMoreOptionsToThisFieldsValues() );
        addConnective.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                setModified( true );
                constraint.addNewConnective();
                modeller.refreshWidget();
View Full Code Here

    private Widget getSetterLabel() {
        HorizontalPanel horiz = new HorizontalPanel();

        if ( model.state == ActionCallMethod.TYPE_UNDEFINED ) {
            Image edit = new ImageButton( images.addFieldToFact() );
            edit.setTitle( constants.AddAnotherFieldToThisSoYouCanSetItsValue() );
            edit.addClickHandler( new ClickHandler() {

                public void onClick(ClickEvent event) {
                    Widget w = (Widget) event.getSource();
                    showAddFieldPopup( w );
View Full Code Here

TOP

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

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.