Package org.gwt.mosaic.ui.client.layout

Examples of org.gwt.mosaic.ui.client.layout.BoxLayoutData


    if(!initialized)
    {
      this.propGrid = new PropertyGrid(new String[]{"Deployment ID:"});

      this.add(propGrid);
      this.add(resources, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
     
      this.initialized = true;
    }
  }
View Full Code Here


    super("Deployment details");
    super.setStyleName("bpm-detail-panel");

    grid = new PropertyGrid(new String[] {"ID:", "Name:", "Processes:"});
    MosaicPanel propLayout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));
    propLayout.add(grid, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));


    suspendBtn =  new Button("Retire", new ClickHandler() {

      public void onClick(ClickEvent clickEvent)
      {

        DeploymentRef deploymentRef = getSelection();
        if(deploymentRef!=null)
        {
          MessageBox.confirm("Retire deployment",
              "Do you want to retire this deployment? Any associated process will be suspended.",
              new MessageBox.ConfirmationCallback() {
                public void onResult(boolean doIt)
                {
                  if(doIt)
                  {
                    controller.handleEvent(
                        new Event(
                            SuspendDeploymentAction.ID,
                            getSelection().getId()
                        )
                    );
                  }
                }
              });
        }
        else
        {
          MessageBox.alert("Missing selection", "Please select a deployment");
        }
      }
    }
    );

    resumeBtn =  new Button("Activate", new ClickHandler() {
      public void onClick(ClickEvent clickEvent)
      {       
        DeploymentRef deploymentRef = getSelection();
        if(deploymentRef!=null)
        {
          MessageBox.confirm("Activate deployment",
              "Do you want to resume this deployment?",
              new MessageBox.ConfirmationCallback() {
                public void onResult(boolean doIt)
                {
                  if(doIt)
                  {
                    controller.handleEvent(
                        new Event(
                            ResumeDeploymentAction.ID,
                            getSelection().getId()
                        )
                    );
                  }
                }
              });
        }
        else
        {
          MessageBox.alert("Missing selection", "Please select a deployment");
        }
      }
    }
    );

    MosaicPanel btnLayout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
    btnLayout.add(suspendBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
    btnLayout.add(resumeBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
    propLayout.add(btnLayout);
   
    // properties
    final DeckLayoutPanel deck = new DeckLayoutPanel();
    deck.add(propLayout);

    // resource info
    ScrollLayoutPanel scrollPanel = new ScrollLayoutPanel();
    resourcePanel = new ResourcePanel();
    scrollPanel.add(resourcePanel);
    deck.add(scrollPanel);

    // selection
    final com.google.gwt.user.client.ui.ListBox dropBox = new com.google.gwt.user.client.ui.ListBox(false);
    dropBox.setStyleName("bpm-operation-ui");
    dropBox.addItem("Properties");
    dropBox.addItem("Resources");
    dropBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        deck.showWidget(dropBox.getSelectedIndex());
        deck.layout();
      }
    });

    this.getHeader().add(dropBox, Caption.CaptionRegion.RIGHT);
    this.add(deck, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    deck.showWidget(dropBox.getSelectedIndex());

    this.add(deck, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

  }
View Full Code Here

        }
      }
     
    });
       
        instanceList.add(listbox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
       
        panel.add(instanceList);
    callback.onSuccess(panel);

 
View Full Code Here

        layout.setStyleName("bpm-window-layout");
        layout.setPadding(5);

        Label header = new Label("Instance: "+ selectedProcessInstanceId);
        header.setStyleName("bpm-label-header");
        layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
       
        final DecoratedTabLayoutPanel tabPanel = new DecoratedTabLayoutPanel(false);
        tabPanel.setPadding(5);
       
        processEvents = new ListBox<String>(new String[]{"Process Events"});
        processEvents.setCellRenderer(new CellRenderer<String>(){

      @Override
      public void renderCell(ListBox<String> listBox, int row, int column, String item) {
        switch(column) {
        case 0:
          listBox.setWidget(row, column, new HTML(item));
          break;
        default:
          throw new RuntimeException("Should not happen!");
        }       
      }
        });

        MosaicPanel sourcePanel = new MosaicPanel();
        sourcePanel.add(processEvents, new BoxLayoutData(BoxLayoutData.FillStyle.VERTICAL));       
        tabPanel.add(sourcePanel, "Activity Events");
       
        tabPanel.selectTab(0);
       
        layout.add(tabPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
       
        processEventsWindow = new WidgetWindowPanel("History Instance Activity", layout, true);

        controller.handleEvent(new Event(LoadProcessInstanceEventsAction.ID, selectedProcessInstanceId));
View Full Code Here

        grid = new PropertyGrid(
                new String[] {"Process:", "Instance ID:", "State", "Start Date:", "Activity:"}
        );

        this.add(grid, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

        MosaicPanel buttonPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL) );
       
        if(isRiftsawInstance) {
          diagramBtn = new Button("Execution Path",
                  new ClickHandler()
                  {
                      public void onClick(ClickEvent clickEvent)
                      {
                          String diagramUrl = getCurrentDefintion().getDiagramUrl();
                          if(diagramUrl !=null && !diagramUrl.equals(""))
                          {
                              final ProcessInstanceRef selection = getCurrentInstance();
                              if(selection!=null)
                              {
                                  createDiagramWindow(selection);
 
                                  DeferredCommand.addCommand(new Command()
                                  {
                                      public void execute() {
                                          controller.handleEvent(
                                                  new Event(LoadInstanceActivityImage.class.getName(), selection)
                                          );
                                      }
                                  }
                                  );
 
                              }
                          }
                          else
                          {
                              MessageBox.alert("Incomplete deployment", "No diagram associated with process");
                          }
                      }
                  }
          );
        } else if(isjBPMInstance) {
          diagramBtn = new Button("Diagram",
                  new ClickHandler()
                  {
                    public void onClick(ClickEvent clickEvent)
                    {
                      String diagramUrl = getCurrentDefintion().getDiagramUrl();
                      if(diagramUrl !=null && !diagramUrl.equals(""))
                      {
                        ProcessInstanceRef selection = getCurrentInstance();
                        if(selection!=null)
                        {
                          createDiagramWindow(selection);
                          controller.handleEvent(
                              new Event(LoadActivityDiagramAction.ID, selection)
                          );
                        }
                      }
                      else
                      {
                        MessageBox.alert("Incomplete deployment", "No diagram associated with process");
                      }
                    }
                  }
              );
              diagramBtn.setVisible(!isRiftsawInstance);
        }
        diagramBtn.setEnabled(false);
        buttonPanel.add(diagramBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        instanceDataBtn = new Button("Instance Data",
                new ClickHandler()
                {
                    public void onClick(ClickEvent clickEvent)
                    {
                        if(currentInstance!=null)
                        {
                            createDataWindow(currentInstance);
                            controller.handleEvent(
                                    new Event(UpdateInstanceDataAction.ID, currentInstance.getId())
                            );
                        }
                    }
                }
        );
        instanceDataBtn.setEnabled(false);
        buttonPanel.add(instanceDataBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        this.add(buttonPanel);

        // plugin availability
        this.hasDiagramPlugin =
                ServerPlugins.has("org.jboss.bpm.console.server.plugin.GraphViewerPlugin");
View Full Code Here

        layout.setStyleName("bpm-window-layout");
        layout.setPadding(5);

        Label header = new Label("Instance: "+inst.getId());
        header.setStyleName("bpm-label-header");
        layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
       
        final DecoratedTabLayoutPanel tabPanel = new DecoratedTabLayoutPanel(false);
        tabPanel.setPadding(5);
       
        MosaicPanel diaViewLayout = new MosaicPanel();
        diaViewLayout.add(diagramView, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
       
        tabPanel.add(diagramView, "View");
 
        processEvents = new ListBox<String>(new String[]{"Process Events"});
        processEvents.setCellRenderer(new CellRenderer<String>(){

      @Override
      public void renderCell(ListBox<String> listBox, int row,
          int column, String item) {
        switch(column) {
        case 0:
          listBox.setWidget(row, column, new HTML(item));
          break;
        default:
          throw new RuntimeException("Should not happen!");
        }       
      }
        });
       
        MosaicPanel sourcePanel = new MosaicPanel();
        sourcePanel.add(processEvents, new BoxLayoutData(BoxLayoutData.FillStyle.VERTICAL));       
        tabPanel.add(sourcePanel, "Source");
       
        tabPanel.selectTab(0);
       
        layout.add(tabPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

        diagramWindowPanel = new WidgetWindowPanel(
                "Process Instance Activity",
                layout, true
        );

        controller.handleEvent(new Event(GetProcessInstanceEventsAction.ID, inst.getId()));
        } else if(isjBPMInstance) {
          MosaicPanel layout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
            layout.setStyleName("bpm-window-layout");
            layout.setPadding(5);

            Label header = new Label("Instance: "+inst.getId());
            header.setStyleName("bpm-label-header");
            layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

            layout.add(diagramView, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

            diagramWindowPanel = new WidgetWindowPanel(
                "Process Instance Activity",
                layout, true
            );   
View Full Code Here

    treePanel.setStyleName("bpm-property-box");

    tree = new Tree();
    treePanel.add(tree);
    this.add(treePanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    tree.addTreeListener(
        new TreeListener()
        {
          public void onTreeItemSelected(TreeItem treeItem)
View Full Code Here

        deck.layout();
      }
    });

    this.getHeader().add(dropBox, Caption.CaptionRegion.RIGHT);
    this.add(deck, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    deck.showWidget(dropBox.getSelectedIndex());

    this.add(deck, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

  }
View Full Code Here

            }
          }
          )
      );

      toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

      // filter
      MosaicPanel filterPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
      filterPanel.setStyleName("mosaic-ToolBar");
      final com.google.gwt.user.client.ui.ListBox dropBox = new com.google.gwt.user.client.ui.ListBox(false);
      dropBox.setStyleName("bpm-operation-ui");
      dropBox.addItem("All");
      dropBox.addItem("Timers");
      dropBox.addItem("Messages");

      dropBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          switch (dropBox.getSelectedIndex())
          {
            case 0:
              currentFilter = FILTER_NONE;
              break;
            case 1:
              currentFilter = FILTER_TIMER;
              break;
            case 2:
              currentFilter = FILTER_MESSAGE;
              break;
            default:
              throw new IllegalArgumentException("No such index");
          }

          renderFiltered();
        }
      });
      filterPanel.add(dropBox);

      toolBox.add(filterPanel, new BoxLayoutData(BoxLayoutData.FillStyle.VERTICAL));

      this.jobList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
      this.jobList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

      // details
      /*JobDetailView detailsView = new JobDetailView();
      controller.addView(JobDetailView.ID, detailsView);
      controller.addAction(UpdateJobDetailAction.ID, new UpdateJobDetailAction());
View Full Code Here

    this.clear();
    this.selection = null;

    Label desc = new Label("Please enter a process definition ID");
    //desc.setStyleName("bpm-label-header");
    this.add(desc, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    suggestBox = new SuggestBox(
        createOracle(definitions)
    );

    suggestBox.addEventHandler(
        new SuggestionHandler()
        {
          public void onSuggestionSelected(SuggestionEvent suggestionEvent)
          {
            selection = suggestionEvent.getSelectedSuggestion().getReplacementString();
          }
        }
    );

    this.add(suggestBox);

    Grid g = new Grid(2,2);
    g.setWidget(0,0, new Label("ID: "));
    g.setWidget(0,1, suggestBox);

    Button button = new Button(delegate.getActionName(),
        new ClickListener()
        {
          public void onClick(Widget widget)
          {
            if(selection!=null)
            {
              delegate.handleResult(selection);
              parent.close();
            }
          }
        });

    g.setWidget(1,1, button);
    this.add(g, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

    invalidate();
  }
View Full Code Here

TOP

Related Classes of org.gwt.mosaic.ui.client.layout.BoxLayoutData

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.