Package org.drools.guvnor.client.common

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


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

        PrettyFormLayout pf = new PrettyFormLayout();

        VerticalPanel vert = new VerticalPanel();
        String m = constants.AnalysingPackage(packageName);
        vert.add( new HTML( m ) );
        Button run = new Button( constants.RunAnalysis() );
        run.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                runAnalysis();
            }
        } );
        vert.add( run );

        pf.addHeader( images.analyzeLarge(),
                      vert );
        layout.add( pf );

        layout.add( new Label() );
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( images.statusLarge(),
                        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 Button                  btnRestorePackage;
    private Button                  btnDeletePackage;

    public ArchivedAssetManager() {

        PrettyFormLayout pf = new PrettyFormLayout();

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

        pf.addHeader( images.backupLarge(),
                      header );

        final TabOpener tabOpener = TabOpener.getInstance();

        OpenItemCommand openSelectedCommand = new OpenItemCommand() {
            public void open(String key) {
                tabOpener.openAsset( key );
            }

            public void open(MultiViewRow[] rows) {
                tabOpener.openAssetsToMultiView( rows );
            }
        };

        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,
                                             openSelectedCommand );
        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

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

        vert.add( run );

        pf.addHeader( images.scenarioLarge(),
                      vert );

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

    private VerticalPanel         layout;
    private PermissionsPagedTable table;

    public PermissionViewer() {

        PrettyFormLayout pf = new PrettyFormLayout();

        VerticalPanel header = new VerticalPanel();
        Label caption = new Label( constants.PermissionDetails() );
        caption.getElement().getStyle().setFontWeight( FontWeight.BOLD );
        header.add( caption );
        header.add( howToTurnOn() );

        pf.addHeader( images.userPermissionsLarge(),
                      header );

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

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

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

    private VerticalPanel layout;
    private LogPagedTable table;

    public LogViewer() {

        PrettyFormLayout pf = new PrettyFormLayout();

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

        pf.addHeader( images.eventLogLarge(),
                      header );

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

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

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

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

    public BackupManager() {

        PrettyFormLayout widtab = new PrettyFormLayout();
        widtab.addHeader( images.backupLarge(),
                          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

        FlexTable listPanel = new FlexTable();
        listPanel.setWidget( 0,
                             0,
                             searchTitle);
                            
        PrettyFormLayout pfl = new PrettyFormLayout();
        pfl.startSection();
        pfl.addRow( listPanel );
        pfl.endSection();

        criteria.add( pfl );
        criteria.add( layout );
        container.add( criteria );
        container.add( resultsP );
View Full Code Here

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

        head.addHeader( DroolsGuvnorImages.INSTANCE.snapshot(),
                        header() );

        vert.add( head );

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

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

    private ListBox       currentStatuses;

    public StateManager() {
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader( images.statusLarge(),
                        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

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.