Package org.uberfire.client.common

Examples of org.uberfire.client.common.DirtyableHorizontalPane


                              int col,
                              Image icon ) {
        Widget widget = layout.getWidget( row,
                                          col );
        if ( widget instanceof DirtyableHorizontalPane ) {
            DirtyableHorizontalPane horiz = (DirtyableHorizontalPane) widget;
            horiz.add( icon );
        }
    }
View Full Code Here


            return;
        }
        Widget widget = layout.getWidget( row,
                                          col );
        if ( widget instanceof DirtyableHorizontalPane ) {
            DirtyableHorizontalPane horiz = (DirtyableHorizontalPane) widget;
            horiz.clear();
        }
    }
View Full Code Here

    private void addActionsButtonsToLayout( String title,
                                            ClickHandler addBelowListener,
                                            ClickHandler moveDownListener,
                                            ClickHandler moveUpListener ) {

        final DirtyableHorizontalPane hp = new DirtyableHorizontalPane();

        Image addPattern = CommonAltedImages.INSTANCE.NewItemBelow();
        addPattern.setTitle( title );
        addPattern.addClickHandler( addBelowListener );

        Image moveDown = CommonAltedImages.INSTANCE.MoveDown();
        moveDown.setTitle( Constants.INSTANCE.MoveDown() );
        moveDown.addClickHandler( moveDownListener );

        Image moveUp = CommonAltedImages.INSTANCE.MoveUp();
        moveUp.setTitle( Constants.INSTANCE.MoveUp() );
        moveUp.addClickHandler( moveUpListener );

        hp.add( addPattern );
        hp.add( moveDown );
        hp.add( moveUp );

        layout.setWidget( currentLayoutRow,
                          4,
                          hp );
        layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
View Full Code Here

    private void setTextBox( final RuleModel model,
                             final Command refresh ) {
        box.setVisibleLength( 15 );

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add( box );
        horiz.add( getAddButton( model,
                                 refresh,
                                 box ) );

        addAttribute( Constants.INSTANCE.Metadata3(),
                      horiz );
View Full Code Here

     * Wraps a RuleModellerWidget with an icon to delete the pattern
     */
    private Widget wrapLHSWidget( final CompositeFactPattern model,
                                  int i,
                                  RuleModellerWidget w ) {
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();

        final Image remove = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall();
        remove.setTitle( Constants.INSTANCE.RemoveThisENTIREConditionAndAllTheFieldConstraintsThatBelongToIt() );
        final int idx = i;
        remove.addClickHandler( new ClickHandler() {

            public void onClick( ClickEvent event ) {
                if ( Window.confirm( Constants.INSTANCE.RemoveThisEntireConditionQ() ) ) {
                    if ( pattern.removeFactPattern( idx ) ) {
                        getModeller().refreshWidget();
                    }
                }
            }
        } );

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

        horiz.add( w );
        if ( !( getModeller().lockLHS() || w.isReadOnly() ) ) {
            horiz.add( remove );
        }

        return horiz;
    }
View Full Code Here

        popup.show();
    }

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

        final Image remove = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall();
        remove.setAltText( Constants.INSTANCE.RemoveThisBlockOfData() );
        remove.setTitle( Constants.INSTANCE.RemoveThisBlockOfData() );
        remove.addClickHandler( listener );

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

        horiz.add( w );
        if ( !this.readOnly ) {
            horiz.add( remove );
        }
        return horiz;
    }
View Full Code Here

                at.setValue( DIALECTS[ 1 ] );
            }
            editor = lb;
        }

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        if ( editor != null ) {
            horiz.add( editor );
            if ( !isReadOnly ) {
                horiz.add( getRemoveIcon( idx ) );
            }
        }

        return horiz;
    }
View Full Code Here

        } else {
            editor = textBoxEditor( rm,
                                    isReadOnly );
        }

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add( editor );
        if ( !isReadOnly ) {
            horiz.add( getRemoveMetaIcon( idx ) );
        }

        return horiz;
    }
View Full Code Here

                                       w ) );
            widget.add( spacerWidget() );

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget( currentLayoutRow,
                              1,
                              new DirtyableHorizontalPane() );

            layout.setWidget( currentLayoutRow,
                              2,
                              this.wrapLineNumber( i + 1,
                                                   false ) );
View Full Code Here

                                     w ) );
            vert.add( spacerWidget() );

            layout.setWidget( currentLayoutRow,
                              0,
                              new DirtyableHorizontalPane() );
            layout.setWidget( currentLayoutRow,
                              1,
                              new DirtyableHorizontalPane() );

            layout.setWidget( currentLayoutRow,
                              2,
                              this.wrapLineNumber( i + 1,
                                                   true ) );
View Full Code Here

TOP

Related Classes of org.uberfire.client.common.DirtyableHorizontalPane

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.