Package org.drools.guvnor.client.categorynav

Examples of org.drools.guvnor.client.categorynav.CategoryExplorerWidget


        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) {
                initialCategory = 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.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                doBuild( buildResults,
                         statusOperator.getValue( statusOperator.getSelectedIndex() ),
                         statusValue.getText(),
                         enableStatusCheckBox.isChecked(),
                         catOperator.getValue( catOperator.getSelectedIndex() ),
                         catChooser.getSelectedPath(),
                         enableCategoryCheckBox.isChecked(),
                         customSelector.getSelectedIndex() != -1 ? customSelector.getValue( customSelector.getSelectedIndex() ) : null );
            }
        } );
View Full Code Here


        importAssetLayout.addRow( new HTML( constants.NewLinkedAssetDesc1() ) );
     }

    private Widget getCatChooser() {

       Widget w = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) {
                initialCategory = selectedPath;
            }
        });
       ScrollPanel scroll = new ScrollPanel(w);
View Full Code Here

                  doPermsPanel(perms, vp);
                  pop.hide();
                }
              });
            } else if (sel.startsWith("analyst")) {                           //NON-NLS
              CategoryExplorerWidget cat = new CategoryExplorerWidget(new CategorySelectHandler() {
                public void selected(String selectedPath) {
                  if (perms.containsKey(sel)) {
                    perms.get(sel).add("category=" + selectedPath);            //NON-NLS
                  } else {
                    List<String> ls = new ArrayList<String>();
View Full Code Here

        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) {
                initialCategory = 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.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                doBuild( buildResults,
                         statusOperator.getValue( statusOperator.getSelectedIndex() ),
                         statusValue.getText(),
                         enableStatusCheckBox.isChecked(),
                         catOperator.getValue( catOperator.getSelectedIndex() ),
                         catChooser.getSelectedPath(),
                         enableCategoryCheckBox.isChecked(),
                         customSelector.getSelectedIndex() != -1 ? customSelector.getValue( customSelector.getSelectedIndex() ) : null );
            }
        } );
View Full Code Here

                  doPermsPanel(perms, vp);
                  pop.hide();
                }
              });
            } else if (sel.startsWith("analyst")) {                           //NON-NLS
              CategoryExplorerWidget cat = new CategoryExplorerWidget(new CategorySelectHandler() {
                public void selected(String selectedPath) {
                  if (perms.containsKey(sel)) {
                    perms.get(sel).add("category=" + selectedPath);            //NON-NLS
                  } else {
                    List<String> ls = new ArrayList<String>();
View Full Code Here

        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader("images/edit_category.gif", new HTML(constants.EditCategories())); //NON-NLS
        form.startSection(constants.CategoriesPurposeTip());

        explorer = new CategoryExplorerWidget(new CategorySelectHandler() {
            public void selected(String sel) {
                //don't need this here as we don't do anything on select in this spot
            }
         });
        SimplePanel editable = new SimplePanel();
View Full Code Here

        final FormStylePopup pop = new FormStylePopup( "images/config.png",
                                                       constants.AddACategoryRuleToThePackage() ); //NON-NLS
        final Button addbutton = new Button( constants.OK() );
        final TextBox ruleName = new TextBox();

        final CategoryExplorerWidget exw = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) { //not needed
            }
        } );

        ruleName.setVisibleLength( 15 );

        addbutton.setTitle( constants.CreateCategoryRule() );

        addbutton.addClickHandler(new ClickHandler() {
     
      public void onClick(ClickEvent event) {
        if ( exw.getSelectedPath().length() > 0 && ruleName.getText().trim().length() > 0 ) {
                    addToCatRules( exw.getSelectedPath(),
                                   ruleName.getText() );
                }
                refreshWidgets();
                pop.hide();
      }
View Full Code Here

        importAssetLayout.addRow( new HTML( constants.NewLinkedAssetDesc1() ) );
     }

    private Widget getCatChooser() {

       Widget w = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) {
                initialCategory = selectedPath;
            }
        });
       ScrollPanel scroll = new ScrollPanel(w);
View Full Code Here

        public CategorySelector() {
          setTitle(constants.SelectCategoryToAdd());
            VerticalPanel vert = new VerticalPanel();

            selector = new CategoryExplorerWidget(new CategorySelectHandler() {
                public void selected(String sel) {
                    selectedPath = sel;
                }

            });
View Full Code Here

        } );
    }

    private Widget getCatChooser() {

        Widget w = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) {
                initialCategory = selectedPath;
            }
        } );
        ScrollPanel scroll = new ScrollPanel( w );
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.categorynav.CategoryExplorerWidget

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.