Package org.drools.guvnor.client.common

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


            editor = checkBoxEditor(at);
        } else {
            editor = textBoxEditor(at);
        }

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add(editor);
        horiz.add(getRemoveIcon(idx));

        return horiz;
    }
View Full Code Here


            editor = new InfoPopup(constants.FrozenAreas(), constants.FrozenExplanation());
        } else {
            editor = textBoxEditor(rm);
        }

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add(editor);
        horiz.add(getRemoveMetaIcon(idx));

        return horiz;
    }
View Full Code Here

                model.addMetadata(new RuleMetadata(box.getText(), ""));
                refreshWidget();
                pop.hide();
            }
        });
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add(box);
        horiz.add(addbutton);




View Full Code Here

            w.addOnModifiedCommand(this.onWidgetModifiedCommand);

            w.setWidth( "100%" );
            widget.add(spacerWidget());

            DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
            horiz.setWidth("100%");
            //horiz.setBorderWidth(2);

            Image remove = new ImageButton("images/delete_faded.gif"); //NON-NLS
            remove.setTitle(constants.RemoveThisAction());
            final int idx = i;
            remove.addClickListener(new ClickListener() {

                public void onClick(Widget w) {
                    if (Window.confirm(constants.RemoveThisItem())) {
                        model.removeRhsItem(idx);
                        refreshWidget();
                    }
                }
            });
            horiz.add(w);
            if (!(w instanceof ActionRetractFactWidget)) {
                w.setWidth("100%");               //NON-NLS
                horiz.setWidth("100%");
            }

            if (!lockRHS()) {
                horiz.add(remove);
            }


            widget.add(horiz);
View Full Code Here

     * This adds the widget to the UI, also adding the remove icon.
     */
    private Widget wrapLHSWidget(final RuleModel model,
            int i,
            RuleModellerWidget w) {
        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();

        final Image remove = new ImageButton("images/delete_faded.gif"); //NON-NLS
        remove.setTitle(constants.RemoveThisENTIREConditionAndAllTheFieldConstraintsThatBelongToIt());
        final int idx = i;
        remove.addClickListener(new ClickListener() {

            public void onClick(Widget w) {
                if (Window.confirm(constants.RemoveThisEntireConditionQ())) {
                    if (model.removeLhsItem(idx)) {
                        refreshWidget();
                    } else {
                        ErrorPopup.showMessage(constants.CanTRemoveThatItemAsItIsUsedInTheActionPartOfTheRule());
                    }
                }
            }
        });


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

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

        return horiz;
    }
View Full Code Here

        if (isLHSLine){
            id="lhsLine";
        }
        id+=number;

        DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
        horiz.add(new HTML("<div class='x-form-field' id='"+id+"'>" + number + ".</div>"));

        return horiz;
    }
View Full Code Here

    }

    private void addLineIcon(int row, String img, 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

        if (layout.getCellCount(row)<=0){
            return;
        }
        Widget widget = layout.getWidget(row, 0);
        if (widget instanceof DirtyableHorizontalPane){
            DirtyableHorizontalPane horiz = (DirtyableHorizontalPane)widget;
            while (horiz.getWidgetCount() > 1){
                horiz.remove(horiz.getWidgetCount()-1);
            }
        }
    }
View Full Code Here

        }
    }

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

        DirtyableHorizontalPane hp = new DirtyableHorizontalPane();

        Image addPattern = new ImageButton("images/new_item_below.png");
        addPattern.setTitle(title);
        addPattern.addClickListener(addBelowListener);

        Image moveDown = new ImageButton("images/shuffle_down.gif");
        moveDown.setTitle(constants.MoveDown());
        moveDown.addClickListener(moveDownListener);

        Image moveUp = new ImageButton("images/shuffle_up.gif");
        moveUp.setTitle(constants.MoveUp());
        moveUp.addClickListener(moveUpListener);
       
        hp.add(addPattern);
        hp.add(moveDown);
        hp.add(moveUp);



        final ExtElement e = new ExtElement(hp.getElement());
        e.setOpacity(0.1f, false);

        FocusPanel actionPanel = new FocusPanel(hp);

        MouseListenerAdapter mouseListenerAdapter = new MouseListenerAdapter() {
View Full Code Here

        this.modeller = modeller;
    }

    public Widget connectives(SingleFieldConstraint c, String factClass) {
        if ( c.connectives != null && c.connectives.length > 0 ) {
            DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
            for ( int i = 0; i < c.connectives.length; i++ ) {
                ConnectiveConstraint con = c.connectives[i];
                horiz.add( connectiveOperatorDropDown( con, c.fieldName ) );
                horiz.add( connectiveValueEditor( con, factClass, c.fieldName ) );
            }
            return horiz;
        } else {
            //nothing to do
            return null;
View Full Code Here

TOP

Related Classes of org.drools.guvnor.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.