Examples of FormStyleLayout


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

public class VerifierResultWidget extends Composite {

    public VerifierResultWidget(AnalysisReport report,
                                boolean showFactUsage) {
       
        FormStyleLayout layout = new FormStyleLayout();

        Tree tree = new Tree();

        TreeItem errors = doMessageLines( Constants.INSTANCE.Errors(),
                                          DroolsGuvnorImages.INSTANCE.error(),
                                          report.errors );
        tree.addItem( errors );

        TreeItem warnings = doMessageLines( Constants.INSTANCE.Warnings(),
                                            DroolsGuvnorImages.INSTANCE.warning(),
                                            report.warnings );
        tree.addItem( warnings );

        TreeItem notes = doMessageLines( Constants.INSTANCE.Notes(),
                                         DroolsGuvnorImages.INSTANCE.note(),
                                         report.notes );
        tree.addItem( notes );

        if ( showFactUsage ) {
            tree.addItem( new FactUsagesItem( report.factUsages ) );
        }

        tree.addCloseHandler( new CloseHandler<TreeItem>() {
            public void onClose(CloseEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        tree.addOpenHandler( new OpenHandler<TreeItem>() {
            public void onOpen(OpenEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        layout.addRow( tree );

        initWidget( layout );
    }
View Full Code Here

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

    public RuleAttributeWidget(RuleModeller parent,
                               RuleModel model) {
        this.parent = parent;
        this.model = model;
        FormStyleLayout layout = new FormStyleLayout();
        //Adding metadata here, seems redundant to add a new widget for metadata. Model does handle meta data separate.
        RuleMetadata[] meta = model.metadataList;
        if ( meta.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[i];
            layout.addAttribute( rmd.attributeName,
                                 getEditorWidget( rmd,
                                                  i ) );
        }
        RuleAttribute[] attrs = model.attributes;
        if ( attrs.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Attributes1() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < attrs.length; i++ ) {
            RuleAttribute at = attrs[i];
            layout.addAttribute( at.attributeName,
                                 getEditorWidget( at,
                                                  i ) );
        }

        initWidget( layout );
View Full Code Here

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

public class VerifierResultWidget extends Composite {

    public VerifierResultWidget(AnalysisReport report,
                                boolean showFactUsage) {
       
        FormStyleLayout layout = new FormStyleLayout();

        Tree tree = new Tree();

        TreeItem errors = doMessageLines( Constants.INSTANCE.Errors(),
                                          DroolsGuvnorImageResources.INSTANCE.error(),
                                          report.errors );
        tree.addItem( errors );

        TreeItem warnings = doMessageLines( Constants.INSTANCE.Warnings(),
                                            DroolsGuvnorImageResources.INSTANCE.warning(),
                                            report.warnings );
        tree.addItem( warnings );

        TreeItem notes = doMessageLines( Constants.INSTANCE.Notes(),
                                         DroolsGuvnorImageResources.INSTANCE.note(),
                                         report.notes );
        tree.addItem( notes );

        if ( showFactUsage ) {
            tree.addItem( new FactUsagesItem( report.factUsages ) );
        }

        tree.addCloseHandler( new CloseHandler<TreeItem>() {
            public void onClose(CloseEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        tree.addOpenHandler( new OpenHandler<TreeItem>() {
            public void onOpen(OpenEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        layout.addRow( tree );

        initWidget( layout );
    }
View Full Code Here

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

        advancedDisclosure.setOpen( true );

        VerticalPanel container = new VerticalPanel();
        VerticalPanel criteria = new VerticalPanel();

        FormStyleLayout ts = new FormStyleLayout();
        final TextBox tx = new TextBox();
        ts.addAttribute( constants.SearchFor(),
                         tx );

        final CheckBox archiveBox = new CheckBox();
        archiveBox.setValue( false );
        ts.addAttribute( constants.IncludeArchivedAssetsInResults(),
                         archiveBox );

        Button go = new Button();
        go.setText( constants.Search1() );
        ts.addAttribute( "",
                         go );
        ts.setWidth( "100%" );

        final SimplePanel resultsP = new SimplePanel();
        final ClickHandler cl = new ClickHandler() {

            public void onClick(ClickEvent arg0) {
View Full Code Here

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

                put( constants.CheckinComment(),
                        new MetaDataQuery( "drools:checkinComment" ) ); // NON-NLS
            }
        };

        FormStyleLayout fm = new FormStyleLayout();
        for ( Iterator<String> iterator = atts.keySet().iterator(); iterator.hasNext(); ) {
            String fieldName = (String) iterator.next();
            final MetaDataQuery q = (MetaDataQuery) atts.get( fieldName );
            final TextBox box = new TextBox();
            box.setTitle( constants.WildCardsSearchTip() );
            fm.addAttribute( fieldName
                                     + ":",
                             box );
            box.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent arg0) {
                    q.valueList = box.getText();
                }
            } );
        }

        HorizontalPanel created = new HorizontalPanel();
        created.add( new SmallLabel( constants.AfterColon() ) );
        final DatePickerTextBox createdAfter = new DatePickerTextBox( "" );
        created.add( createdAfter );

        created.add( new SmallLabel( "&nbsp;" ) ); // NON-NLS

        created.add( new SmallLabel( constants.BeforeColon() ) );
        final DatePickerTextBox createdBefore = new DatePickerTextBox( "" );
        created.add( createdBefore );

        fm.addAttribute( constants.DateCreated1(),
                         created );

        HorizontalPanel lastMod = new HorizontalPanel();
        lastMod.add( new SmallLabel( constants.AfterColon() ) );
        final DatePickerTextBox lastModAfter = new DatePickerTextBox( "" );
        lastMod.add( lastModAfter );

        lastMod.add( new SmallLabel( "&nbsp;" ) ); // NON-NLS

        lastMod.add( new SmallLabel( constants.BeforeColon() ) );
        final DatePickerTextBox lastModBefore = new DatePickerTextBox( "" );
        lastMod.add( lastModBefore );

        fm.addAttribute( constants.LastModified1(),
                         lastMod );

        final SimplePanel resultsP = new SimplePanel();
        Button search = new Button( constants.Search() );
        fm.addAttribute( "",
                         search );
        search.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent arg0) {
                resultsP.clear();
                try {
View Full Code Here

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

    public QuickFindWidget( final ClientFactory clientFactory ) {

        VerticalPanel container = new VerticalPanel();
        VerticalPanel criteria = new VerticalPanel();

        FormStyleLayout layout = new FormStyleLayout( images.systemSearch(),
                "" );

        searchBox = new SuggestBox( new SuggestOracle() {
            public void requestSuggestions( Request r,
                                            Callback cb ) {
                loadShortList( r.getQuery(),
                        archiveBox.getValue(),
                        caseSensitiveBox.getValue(),
                        r,
                        cb );

            }
        } );

        HorizontalPanel srch = new HorizontalPanel();

        final SimplePanel resultsP = new SimplePanel();
        final ClickHandler cl = new ClickHandler() {
            public void onClick( ClickEvent event ) {
                resultsP.clear();
                QueryPagedTable table = new QueryPagedTable(
                        searchBox.getValue(),
                        archiveBox.getValue(),
                        caseSensitiveBox.getValue(),
                        clientFactory );
                resultsP.add( table );
            }
        };
        searchBox.addKeyUpHandler( new KeyUpHandler() {
            public void onKeyUp( KeyUpEvent event ) {
                if ( event.getNativeKeyCode() == KeyCodes.KEY_ENTER ) {
                    cl.onClick( null );
                }
            }
        } );
        srch.add( searchBox );
        layout.addAttribute( constants.FindItemsWithANameMatching(),
                srch );

        archiveBox = new CheckBox();
        archiveBox.setValue( false );
        layout.addAttribute( constants.IncludeArchivedAssetsInResults(),
                archiveBox );

        caseSensitiveBox = new CheckBox();
        caseSensitiveBox.setValue( false );
        layout.addAttribute( constants.IsSearchCaseSensitive(),
                caseSensitiveBox );

        Button go = new Button( constants.Search() );
        go.addClickHandler( cl );
        layout.addAttribute( "",
                go );

        HorizontalPanel searchTitle = new HorizontalPanel();
        searchTitle.add( new Image( images.information() ) );
        searchTitle.add( new Label( constants.EnterSearchString() ) );
View Full Code Here

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

    public RuleAttributeWidget( final RuleModeller parent,
                                final RuleModel model,
                                final boolean isReadOnly ) {
        this.parent = parent;
        this.model = model;
        FormStyleLayout layout = new FormStyleLayout();
        //Adding metadata here, seems redundant to add a new widget for metadata. Model does handle meta data separate.
        RuleMetadata[] meta = model.metadataList;
        if ( meta.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( GuidedRuleEditorResources.CONSTANTS.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[ i ];
            layout.addAttribute( rmd.getAttributeName(),
                                 getEditorWidget( rmd,
                                                  i,
                                                  isReadOnly ) );
        }
        RuleAttribute[] attrs = model.attributes;
        if ( attrs.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( GuidedRuleEditorResources.CONSTANTS.Attributes1() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < attrs.length; i++ ) {
            RuleAttribute at = attrs[ i ];
            layout.addAttribute( at.getAttributeName(),
                                 getEditorWidget( at,
                                                  i,
                                                  isReadOnly ) );
        }
View Full Code Here

Examples of org.uberfire.client.common.FormStyleLayout

    public RuleAttributeWidget( final RuleModeller parent,
                                final RuleModel model,
                                final boolean isReadOnly ) {
        this.parent = parent;
        this.model = model;
        FormStyleLayout layout = new FormStyleLayout();
        //Adding metadata here, seems redundant to add a new widget for metadata. Model does handle meta data separate.
        RuleMetadata[] meta = model.metadataList;
        if ( meta.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[ i ];
            layout.addAttribute( rmd.getAttributeName(),
                                 getEditorWidget( rmd,
                                                  i,
                                                  isReadOnly ) );
        }
        RuleAttribute[] attrs = model.attributes;
        if ( attrs.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Attributes1() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < attrs.length; i++ ) {
            RuleAttribute at = attrs[ i ];
            layout.addAttribute( at.getAttributeName(),
                                 getEditorWidget( at,
                                                  i,
                                                  isReadOnly ) );
        }
View Full Code Here

Examples of org.uberfire.client.common.FormStyleLayout

    private void doSearch() {
        VerticalPanel container = new VerticalPanel();
        VerticalPanel criteria = new VerticalPanel();

        FormStyleLayout ts = new FormStyleLayout();

        ts.addAttribute( "Upload new Jar:", doUploadForm() );

        final TextBox searchTextBox = new TextBox();
        //tx.setWidth("100px");
        ts.addAttribute( "Find items with a name matching:", searchTextBox );

        Button go = new Button();
        go.setText( "Search" );
        ts.addAttribute( "",
                         go );

        ts.setWidth( "100%" );

        final ClickHandler cl = new ClickHandler() {

            public void onClick( ClickEvent arg0 ) {
                resultsP.clear();
View Full Code Here

Examples of org.uberfire.client.common.FormStyleLayout

    public RuleAttributeWidget( final RuleModeller parent,
                                final RuleModel model,
                                final boolean isReadOnly ) {
        this.parent = parent;
        this.model = model;
        FormStyleLayout layout = new FormStyleLayout();
        //Adding metadata here, seems redundant to add a new widget for metadata. Model does handle meta data separate.
        RuleMetadata[] meta = model.metadataList;
        if ( meta.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Metadata2() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < meta.length; i++ ) {
            RuleMetadata rmd = meta[ i ];
            layout.addAttribute( rmd.getAttributeName(),
                                 getEditorWidget( rmd,
                                                  i,
                                                  isReadOnly ) );
        }
        RuleAttribute[] attrs = model.attributes;
        if ( attrs.length > 0 ) {
            HorizontalPanel hp = new HorizontalPanel();
            hp.add( new SmallLabel( Constants.INSTANCE.Attributes1() ) );
            layout.addRow( hp );
        }
        for ( int i = 0; i < attrs.length; i++ ) {
            RuleAttribute at = attrs[ i ];
            layout.addAttribute( at.getAttributeName(),
                                 getEditorWidget( at,
                                                  i,
                                                  isReadOnly ) );
        }
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.