Package org.drools.guvnor.client.common

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


    private VerticalPanel layout;
    private LogPagedTable table;

    public EventLogViewImpl() {

        PrettyFormLayout pf = new PrettyFormLayout();

        VerticalPanel header = new VerticalPanel();
        Constants constants = ((Constants) GWT.create(Constants.class));
        Label caption = new Label(constants.ShowRecentLogTip());
        caption.getElement().getStyle().setFontWeight(FontWeight.BOLD);
        header.add(caption);

        pf.addHeader(GuvnorImages.INSTANCE.EventLog(),
                header);

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

        pf.startSection();
        pf.addRow(layout);
        pf.endSection();

        setupWidget();
        initWidget(pf);
    }
View Full Code Here


    public ArchivedAssetManager(ClientFactory clientFactory,
                                EventBus eventBus) {

        this.eventBus = eventBus;

        PrettyFormLayout pf = new PrettyFormLayout();

        VerticalPanel header = new VerticalPanel();
        header.add( new HTML( constants.ArchivedItems() ) );

        pf.addHeader(GuvnorImages.INSTANCE.BackUp(),
                      header );

        loadPackages();

        Command restoreSelectedAssetCommand = new Command() {

            public void execute() {
                if ( table.getSelectedRowUUIDs() == null ) {
                    Window.alert( constants.PleaseSelectAnItemToRestore() );
                    return;
                }
                RepositoryServiceFactory.getAssetService().archiveAssets( table.getSelectedRowUUIDs(),
                                                                          false,
                                                                          new GenericCallback<java.lang.Void>() {
                                                                              public void onSuccess(Void arg0) {
                                                                                  Window.alert( constants.ItemRestored() );
                                                                                  table.refresh();
                                                                              }
                                                                          } );
            }

        };

        Command deleteSelectedAssetCommand = new Command() {

            public void execute() {
                if ( table.getSelectedRowUUIDs() == null ) {
                    Window.alert( constants.PleaseSelectAnItemToPermanentlyDelete() );
                    return;
                }
                if ( !Window.confirm( constants.AreYouSureDeletingAsset() ) ) {
                    return;
                }
                RepositoryServiceFactory.getAssetService().removeAssets( table.getSelectedRowUUIDs(),
                                                                         new GenericCallback<java.lang.Void>() {
                                                                             public void onSuccess(Void arg0) {
                                                                                 Window.alert( constants.ItemDeleted() );
                                                                                 table.refresh();
                                                                             }
                                                                         } );
            }

        };

        table = new AdminArchivedPagedTable(
                                             restoreSelectedAssetCommand,
                                             deleteSelectedAssetCommand,
                                             clientFactory );
        HorizontalPanel packagesToolbar = new HorizontalPanel();
        btnRestorePackage = new Button( constants.RestoreSelectedPackage() );
        btnRestorePackage.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                if ( packages.getSelectedIndex() == -1 ) {
                    Window.alert( constants.PleaseSelectAnItemToRestore() );
                    return;
                }
                restorePackage( packages.getValue( packages.getSelectedIndex() ) );
            }

        } );
        packagesToolbar.add( btnRestorePackage );

        btnDeletePackage = new Button( constants.PermanentlyDeletePackage() );
        btnDeletePackage.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                if ( packages.getSelectedIndex() == -1 ) {
                    Window.alert( constants.PleaseSelectAnItemToPermanentlyDelete() );
                    return;
                }
                if ( Window.confirm( constants.AreYouSurePackageDelete() ) ) {
                    deletePackage( packages.getValue( packages.getSelectedIndex() ) );
                }
            }

        } );
        packagesToolbar.add( btnDeletePackage );

        pf.startSection( constants.ArchivedPackagesList() );
        pf.addRow( packagesToolbar );
        pf.addRow( packages );
        pf.endSection();

        pf.startSection( constants.ArchivedAssets() );
        pf.addRow( table );
        pf.endSection();

        initWidget( pf );
    }
View Full Code Here

    //public String selectedPath;
    private CategoryExplorerWidget explorer;

    public CategoryManager() {

        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader(GuvnorImages.INSTANCE.EditCategories(),
                        new HTML( constants.EditCategories() ) );
        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.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent 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.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                if ( !explorer.isSelected() ) {
                    Window.alert( constants.PleaseSelectACategoryToRename() );
                    return;
                }
                renameSelected();
            }
        } );

        actions.add( rename );

        Button delete = new Button( constants.DeleteSelected() );
        delete.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent 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

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

    public BackupManager() {

        PrettyFormLayout widtab = new PrettyFormLayout();
        widtab.addHeader(GuvnorImages.INSTANCE.BackUp(),
                          new HTML( constants.ImportOrExport() ) );

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

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

        widtab.endSection();

        initWidget( widtab );

    }
View Full Code Here

    private ListBox       availableWorkspacesListBox;
    private ListBox       availableModulesListBox = new ListBox( true );
    private ListBox       selectedModulesListBox = new ListBox( true );

    public WorkspaceManager() {
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader(GuvnorImages.INSTANCE.WorkspaceManager(),
                        new HTML( "<b>" + constants.ManageWorkspaces() + "</b>" ) );
        form.startSection( constants.Workspaces() );

        form.addAttribute("", buildDoubleList());

        HorizontalPanel hPanel = new HorizontalPanel();
        Button create = new Button( constants.AddWorkspace() );
        create.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                WorkspaceEditor newCat = new WorkspaceEditor( new Command() {
                    public void execute() {
                        refreshWorkspaceList();
                    }
                } );

                newCat.show();
            }
        } );

        Button remove = new Button( constants.DeleteSelectedWorkspace() );
        remove.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                if ( availableWorkspacesListBox.getSelectedIndex() == -1 ) {
                    Window.alert( constants.PleaseSelectAWorkspaceToRemove() );
                    return;
                }
                removeWorkspace();
            }

        } );
       
        Button updateWorkspace = new Button(constants.UpdateSelectedWorkspace());
        updateWorkspace.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                if ( availableWorkspacesListBox.getSelectedIndex() == -1 ) {
                    Window.alert( constants.PleaseSelectAWorkspaceToUpdate() );
                    return;
                }
               
                updateWorkspace();
            }

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

        form.addAttribute( "",
                           hPanel );

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

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

    private ListBox       currentStatuses;

    public StateManager() {
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader(GuvnorImages.INSTANCE.Status(),
                        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.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                StatusEditor newCat = new StatusEditor( new Command() {
                    public void execute() {
                        refreshList();
                    }
                } );

                newCat.show();
            }
        } );

        Button edit = new Button( constants.RenameSelected() );
        edit.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {

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

            }
        } );

        Button remove = new Button( constants.DeleteSelected() );
        remove.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {

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

                removeStatus();

            }

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

        form.addAttribute("",
                           hPanel );

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

                Arrays.asList( new String[]{AssetFormats.TEST_SCENARIO} ),
                null,
                clientFactory );

        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.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                runAllScenarios( packageUUID );
            }
        } );

        vert.add( run );

        pf.addHeader(GuvnorImages.INSTANCE.Scenario(),
                vert );

        layout.add( pf );
        layout.add( this.table );
View Full Code Here

        this.clientFactory = clientFactory;
        this.eventBus = eventBus;
        vert = new VerticalPanel();
        this.snapInfo = snapInfo;
        this.parentConf = parentPackage;
        PrettyFormLayout head = new PrettyFormLayout();

        Image snapshot = GuvnorImages.INSTANCE.Snapshot();
        snapshot.setAltText("");
        head.addHeader(snapshot,
                        header() );

        vert.add( head );

        AssetViewerActivity assetViewerActivity = new AssetViewerActivity( parentConf.getUuid(),
View Full Code Here

        this.packageName = asset.metaData.packageName;
        this.guidedDecisionTable.setTableName( asset.name );

        layout = new VerticalPanel();

        configureColumnsNote = new PrettyFormLayout();
        configureColumnsNote.startSection();
        configureColumnsNote.addRow( new HTML( AbstractImagePrototype.create(images.information()).getHTML()
                                               + "&nbsp;"
                                               + constants.ConfigureColumnsNote() ) );
        configureColumnsNote.endSection();
View Full Code Here

        vert = new VerticalPanel();
        this.snapInfo = snapInfo;
        this.parentConf = parentPackage;
        this.close = closeSnap;
        PrettyFormLayout head = new PrettyFormLayout();

        head.addHeader( images.snapshot(),
                        header() );

        vert.add( head );
        vert.add( infoPanel() );
        vert.setWidth( "100%" );
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.