Examples of DirtyableHorizontalPane


Examples of org.uberfire.client.common.DirtyableHorizontalPane

     * 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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

    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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

                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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

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

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

        return horiz;
    }
View Full Code Here

Examples of org.uberfire.client.common.DirtyableHorizontalPane

                                       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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

                                     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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

        String id = "rhsLine";
        if ( isLHSLine ) {
            id = "lhsLine";
        }
        id += number;
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add( new HTML( "<div class='form-field' id='" + id + "'>" + number + ".</div>" ) );
        return horiz;
    }
View Full Code Here

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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

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

Examples of org.uberfire.client.common.DirtyableHorizontalPane

    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
TOP
Copyright © 2018 www.massapi.com. 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.