Package org.drools.guvnor.client.common

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


    private Constants constants = GWT.create(Constants.class);

    public BackupManager() {

        PrettyFormLayout widtab = new PrettyFormLayout();
        widtab.addHeader( "images/backup_large.png",
                          new HTML(constants.ImportOrExport()) );

        widtab.startSection(constants.ImportFromAnXmlFile());
        widtab.addAttribute( "",
                             newImportWidget() );
        widtab.endSection();

        widtab.startSection(constants.ExportToAZipFile());
        widtab.addAttribute( "",
                             newExportWidget() );

        widtab.endSection();

        /*
         * Package import/export
         */
        /*
 
View Full Code Here


    private ListBox currentStatuses;
    private Constants constants = ((Constants) GWT.create(Constants.class));

    public StateManager() {
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader( "images/status_large.png",
                        new HTML( "<b>" + constants.ManageStatuses() + "</b>" ) );
        form.startSection(constants.StatusTagsAreForTheLifecycleOfAnAsset());

        currentStatuses = new ListBox();
        currentStatuses.setVisibleItemCount( 7 );
        currentStatuses.setWidth( "50%" );

        refreshList();

        form.addAttribute(constants.CurrentStatuses(),
                           currentStatuses );

        HorizontalPanel hPanel = new HorizontalPanel();
        Button create = new Button(constants.NewStatus());
        create.setTitle(constants.CreateANewCategory());
        create.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                StatusEditor newCat = new StatusEditor( new Command() {
                    public void execute() {
                        refreshList();
                    }
                } );

                newCat.show();
            }
        } );

        Button edit = new Button(constants.RenameSelected());
        edit.addClickListener( new ClickListener() {
            public void onClick(Widget w) {

                if ( !currentStatuses.isItemSelected( currentStatuses.getSelectedIndex() ) ) {
                    Window.alert(constants.PleaseSelectAStatusToRename());
                    return;
                }
                renameSelected();

            }
        } );

        Button remove = new Button(constants.DeleteSelected());
        remove.addClickListener( new ClickListener() {
            public void onClick(Widget w) {

                if ( !currentStatuses.isItemSelected( currentStatuses.getSelectedIndex() ) ) {
                    Window.alert(constants.PleaseSelectAStatusToRemove());
                    return;
                }

                removeStatus();

            }

        } );
        hPanel.add( create );
        hPanel.add( edit );
        hPanel.add( remove );

        form.addAttribute(constants.AddNewStatus(),
                           hPanel );

        form.endSection();
        initWidget( form );
    }
View Full Code Here

                        EditItemEvent edit) {
        this.layout = new VerticalPanel();
        this.packageUUID = packageUUID;
        this.edit = edit;

        PrettyFormLayout pf = new PrettyFormLayout();

        VerticalPanel vert = new VerticalPanel();
        String m = Format.format( constants.AnalysingPackage(),
                                  new String[]{packageName} );
        vert.add( new HTML( m ) );
        Button run = new Button( constants.RunAnalysis() );
        run.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                runAnalysis();
            }
        } );
        vert.add( run );

        pf.addHeader( "images/analyse_large.png",
                      vert );
        layout.add( pf );

        layout.add( new Label() );
View Full Code Here

  }


  private void clear() {
    parent.clear();
    layout = new PrettyFormLayout();
    parent.add(layout);

  }
View Full Code Here

    public VerticalPanel layout = new VerticalPanel();
    private Constants constants = ((Constants) GWT.create(Constants.class));

    public RuleVerifierManager() {

        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader("images/rule_verification.png", new HTML(constants.EditRulesVerificationConfiguration())); //NON-NLS
        form.startSection(constants.AutomaticVerification());

        final CheckBox enableOnlineValidator = new CheckBox();
        enableOnlineValidator.setValue(WorkingSetManager.getInstance().isAutoVerifierEnabled());
        form.addAttribute(constants.Enabled(), enableOnlineValidator  );

        HorizontalPanel actions = new HorizontalPanel();

        form.addAttribute("", actions);

        Button btnSave = new Button(constants.SaveChanges());
        btnSave.setTitle(constants.SaveAllChanges());
        btnSave.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                WorkingSetManager.getInstance().setAutoVerifierEnabled(enableOnlineValidator.getValue());
                Window.alert(constants.AllChangesHaveBeenSaved());
            }
        });

        actions.add(btnSave);

        form.endSection();

        initWidget( form );

    }
View Full Code Here

    private CategoryExplorerWidget explorer;
    private Constants constants = ((Constants) GWT.create(Constants.class));

    public CategoryManager() {

        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();
        editable.add( explorer );

        form.addAttribute(constants.CurrentCategories(), editable );

        HorizontalPanel actions = new HorizontalPanel();


        form.addAttribute("", actions);

        Button newCat = new Button(constants.NewCategory());
        newCat.setTitle(constants.CreateANewCategory());
        newCat.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                CategoryEditor newCat = new CategoryEditor( explorer.getSelectedPath(), new Command() {
          public void execute() {
            explorer.refresh();
          }
                });

                newCat.show();
            }
        } );

        actions.add(newCat);

        Button rename = new Button(constants.RenameSelected());
        rename.addClickListener(new ClickListener() {
      public void onClick(Widget w) {
        if (!explorer.isSelected()) {
          Window.alert(constants.PleaseSelectACategoryToRename());
          return;
        }
        renameSelected();
      }
        });

        actions.add(rename);


        Button delete = new Button(constants.DeleteSelected());
        delete.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
              if (!explorer.isSelected())  {
                Window.alert(constants.PleaseSelectACategoryToDelete());
                return;
              }
                deleteSelected();
            }
        } );
        delete.setTitle(constants.DeleteSelectedCat());

        actions.add(delete);

        form.endSection();


        initWidget( form );

    }
View Full Code Here


        listPanel = new FlexTable();
        listPanel.setWidget( 0, 0, new HTML("<img src='images/information.gif'/>&nbsp;" + constants.EnterSearchString()) ); //NON-NLS

        PrettyFormLayout pfl = new PrettyFormLayout();
        pfl.startSection();
        pfl.addRow(listPanel);
        pfl.addRow( resultsP );

        pfl.endSection();
        layout.addRow(pfl);

        /*

        Button b = new Button("Do a request");
View Full Code Here

    private Constants constants = GWT.create(Constants.class);

    public BackupManager() {

        PrettyFormLayout widtab = new PrettyFormLayout();
        widtab.addHeader( "images/backup_large.png",
                          new HTML(constants.ImportOrExport()) );

        widtab.startSection(constants.ImportFromAnXmlFile());
        widtab.addAttribute( "",
                             newImportWidget() );
        widtab.endSection();

        widtab.startSection(constants.ExportToAZipFile());
        widtab.addAttribute( "",
                             newExportWidget() );

        widtab.endSection();

        /*
         * Package import/export
         */
        /*
 
View Full Code Here

            layout.remove( 2 );
        }
        if ( dt.actionCols.size() == 0 && dt.conditionCols.size() == 0 && dt.actionCols.size() == 0 ) {
            VerticalPanel vp = new VerticalPanel();
            vp.setWidth( "100%" );
            PrettyFormLayout pfl = new PrettyFormLayout();
            pfl.startSection();
            pfl.addRow( new HTML( "<img src='images/information.gif'/>&nbsp;" + constants.ConfigureColumnsNote() ) );

            pfl.endSection();
            vp.add( pfl );
            grid = doGrid();
            vp.add( grid );
            layout.add( vp );
View Full Code Here

      }
    });

    layout = new VerticalPanel();
    layout.setWidth("100%");
    PrettyFormLayout pf = new PrettyFormLayout();

    VerticalPanel vert = new VerticalPanel();
    vert.add(new HTML("<b>" + constants.ScenariosForPackage1() + "</b>" + packageName));
    Button run = new Button(constants.RunAllScenarios());
    run.addClickListener(new ClickListener() {
      public void onClick(Widget w) {
        runAllScenarios(packageUUID);
      }
    });

    vert.add(run);


    pf.addHeader("images/scenario_large.png", vert); //NON-NLS

    layout.add(pf);
    layout.add(grid);

    initWidget(layout);
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.common.PrettyFormLayout

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.