Examples of FormStyleLayout


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

                parameterPanel = new DecoratedDisclosurePanel( constants.Parameters() );
                parameterPanel.ensureDebugId( "cwDisclosurePanel" );
                parameterPanel.setWidth( "100%" );
                parameterPanel.setOpen( false );

                FormStyleLayout parametersForm = new FormStyleLayout();
                parametersForm.setHeight( "120px" );
                parameterPanel.setContent( parametersForm );

                ruleFlowViewer = new RuleFlowViewer( rfcm,
                        parametersForm );
            } catch (Exception e) {
View Full Code Here

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

                            final PackageConfigData conf,
                            boolean isHistoricalReadOnly) {
        this.clientFactory = clientFactory;
        this.conf = conf;
        this.isHistoricalReadOnly = isHistoricalReadOnly;
        layout = new FormStyleLayout();

        VerticalPanel header = new VerticalPanel();
        Label caption = new Label( "Dependencies" );
        caption.getElement().getStyle().setFontWeight( FontWeight.BOLD );
        header.add( caption );
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 caseSensitiveBox = new CheckBox();
        caseSensitiveBox.setValue( false );
        ts.addAttribute( constants.IsSearchCaseSensitive(),
                caseSensitiveBox );

        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

        this.conf = conf;
        this.clientFactory = clientFactory;

        // UI above the results table
        layout = new FormStyleLayout();
        final VerticalPanel container = new VerticalPanel();
        final VerticalPanel buildResults = new VerticalPanel();

        RadioButton wholePackageRadioButton = new RadioButton( "action",
                                                               constants.BuildWholePackage() );
        RadioButton builtInSelectorRadioButton = new RadioButton( "action",
                                                                  constants.BuildPackageUsingBuiltInSelector() );
        RadioButton customSelectorRadioButton = new RadioButton( "action",
                                                                 constants.BuildPackageUsingCustomSelector() );
        wholePackageRadioButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                buildWholePackageLayout.setVisible( true );
                builtInSelectorLayout.setVisible( false );
                customSelectorLayout.setVisible( false );
                buildMode = "buildWholePackage";
            }
        } );
        builtInSelectorRadioButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                buildWholePackageLayout.setVisible( false );
                builtInSelectorLayout.setVisible( true );
                customSelectorLayout.setVisible( false );
                buildMode = "builtInSelector";
            }
        } );
        customSelectorRadioButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                buildWholePackageLayout.setVisible( false );
                builtInSelectorLayout.setVisible( false );
                customSelectorLayout.setVisible( true );
                buildMode = "customSelector";
            }
        } );

        VerticalPanel verticalPanel = new VerticalPanel();

        HorizontalPanel wholePackageRadioButtonPanel = new HorizontalPanel();
        wholePackageRadioButtonPanel.add( wholePackageRadioButton );
        wholePackageRadioButtonPanel.add( new InfoPopup( constants.BuildWholePackage(),
                                                         constants.BuildWholePackageTip() ) );
        verticalPanel.add( wholePackageRadioButtonPanel );

        HorizontalPanel builtInSelectorRadioButtonPanel = new HorizontalPanel();
        builtInSelectorRadioButtonPanel.add( builtInSelectorRadioButton );
        builtInSelectorRadioButtonPanel.add( new InfoPopup( constants.BuiltInSelector(),
                                                            constants.BuiltInSelectorTip() ) );
        verticalPanel.add( builtInSelectorRadioButtonPanel );

        HorizontalPanel customSelectorRadioButtonPanel = new HorizontalPanel();
        customSelectorRadioButtonPanel.add( customSelectorRadioButton );
        customSelectorRadioButtonPanel.add( new InfoPopup( constants.CustomSelector(),
                                                           constants.SelectorTip() ) );
        verticalPanel.add( customSelectorRadioButtonPanel );

        layout.addAttribute( "",
                             verticalPanel );
        wholePackageRadioButton.setValue( true );

        buildWholePackageLayout.setVisible( true );
        builtInSelectorLayout.setVisible( false );
        customSelectorLayout.setVisible( false );

        // Build whole package layout
        layout.addRow( buildWholePackageLayout );

        // Built-in selector layout
        builtInSelectorLayout.addRow( new HTML( "&nbsp;&nbsp;<i>"
                                                + constants.BuildPackageUsingFollowingAssets()
                                                + "</i>" ) );

        HorizontalPanel builtInSelectorStatusPanel = new HorizontalPanel();
        final CheckBox enableStatusCheckBox = new CheckBox();
        enableStatusCheckBox.setValue( false );
        builtInSelectorStatusPanel.add( enableStatusCheckBox );
        builtInSelectorStatusPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                                  + constants.BuildPackageUsingBuiltInSelectorStatus()
                                                  + " </i>" ) );
        final ListBox statusOperator = new ListBox();
        String[] vals = new String[]{"=", "!="};
        for ( int i = 0; i < vals.length; i++ ) {
            statusOperator.addItem( vals[i],
                                    vals[i] );
        }
        builtInSelectorStatusPanel.add( statusOperator );

        final TextBox statusValue = new TextBox();
        statusValue.setTitle( constants.WildCardsSearchTip() );
        builtInSelectorStatusPanel.add( statusValue );

        builtInSelectorLayout.addRow( builtInSelectorStatusPanel );

        HorizontalPanel builtInSelectorCatPanel = new HorizontalPanel();
        final CheckBox enableCategoryCheckBox = new CheckBox();
        enableCategoryCheckBox.setValue( false );
        builtInSelectorCatPanel.add( enableCategoryCheckBox );
        builtInSelectorCatPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                               + constants.BuildPackageUsingBuiltInSelectorCat()
                                               + " </i>" ) );
        final ListBox catOperator = new ListBox();
        String[] catVals = new String[]{"=", "!="};
        for ( int i = 0; i < catVals.length; i++ ) {
            catOperator.addItem( catVals[i],
                                 catVals[i] );
        }
        builtInSelectorCatPanel.add( catOperator );
        final CategoryExplorerWidget catChooser = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) {
            }
        } );
        ScrollPanel catScroll = new ScrollPanel( catChooser );
        catScroll.setAlwaysShowScrollBars( true );
        catScroll.setSize( "300px",
                           "130px" );

        builtInSelectorCatPanel.add( catScroll );
        builtInSelectorLayout.addRow( builtInSelectorCatPanel );

        layout.addRow( builtInSelectorLayout );

        // Custom selector layout
        customSelectorLayout.setVisible( false );
        HorizontalPanel customSelectorPanel = new HorizontalPanel();
        customSelectorPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                           + constants.BuildPackageUsingCustomSelectorSelector()
                                           + " </i>" ) ); // NON-NLS

        final ListBox customSelector = new ListBox();
        customSelector.setTitle( constants.WildCardsSearchTip() );
        customSelectorPanel.add( customSelector );
        loadCustomSelectorList( customSelector );

        customSelectorLayout.addRow( customSelectorPanel );
        layout.addRow( customSelectorLayout );

        final Button b = new Button( constants.BuildPackage() );
        b.setTitle( constants.ThisWillValidateAndCompileAllTheAssetsInAPackage() );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                doBuild( buildResults,
                         statusOperator.getValue( statusOperator.getSelectedIndex() ),
                         statusValue.getText(),
                         enableStatusCheckBox.getValue(),
                         catOperator.getValue( catOperator.getSelectedIndex() ),
                         catChooser.getSelectedPath(),
                         enableCategoryCheckBox.getValue(),
                         customSelector.getSelectedIndex() != -1 ? customSelector.getValue( customSelector.getSelectedIndex() ) : null );
            }
        } );
        HorizontalPanel buildStuff = new HorizontalPanel();
        buildStuff.add( b );

        layout.addAttribute( constants.BuildBinaryPackage(),
                             buildStuff );
        layout.addRow( new HTML( "<i><small>"
                                 + constants.BuildingPackageNote()
                                 + "</small></i>" ) );// NON-NLS
        container.add( layout );

        // The build results
        container.add( buildResults );

        // UI below the results table
        layout = new FormStyleLayout();
        Button snap = new Button( constants.CreateSnapshotForDeployment() );
        snap.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                showSnapshotDialog( conf.getName(),
                                    null );
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.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.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

    private static Images images    = GWT.create( Images.class );

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

        Tree tree = new Tree();

        TreeItem errors = doMessageLines( constants.Errors(),
                                          images.error(),
                                          report.errors );
        tree.addItem( errors );

        TreeItem warnings = doMessageLines( constants.Warnings(),
                                            images.warning(),
                                            report.warnings );
        tree.addItem( warnings );

        TreeItem notes = doMessageLines( constants.Notes(),
                                         images.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 caseSensitiveBox = new CheckBox();
        caseSensitiveBox.setValue( false );
        ts.addAttribute( constants.IsSearchCaseSensitive(),
                caseSensitiveBox );

        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
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.