Package org.gwt.mosaic.ui.client

Examples of org.gwt.mosaic.ui.client.ToolBar


            final MosaicPanel toolBox = new MosaicPanel();

            toolBox.setPadding(0);
            toolBox.setWidgetSpacing(5);

            final ToolBar toolBar = new ToolBar();
            refreshBtn = new Button("Refresh", new ClickHandler() {

                public void onClick(ClickEvent clickEvent) {
                    controller.handleEvent(
                            new Event(
                                    UpdateInstancesAction.ID,
                                    getCurrentDefinition()
                            )
                    );
                }
            }
            );
            toolBar.add(refreshBtn);
            refreshBtn.setEnabled(false);
            toolBar.addSeparator();

            startBtn = new Button("Start", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    MessageBox.confirm("Start new execution",
                            "Do you want to start a new execution of this process?",
                            new MessageBox.ConfirmationCallback()
                            {
                                public void onResult(boolean doIt)
                                {
                                    if (doIt)
                                    {
                                        String url = getCurrentDefinition().getFormUrl();
                                        boolean hasForm = (url != null && !url.equals(""));
                                        if (hasForm)
                                        {
                                            ProcessDefinitionRef definition = getCurrentDefinition();
                                            iframeWindow = new IFrameWindowPanel(
                                                    definition.getFormUrl(), "New Process Instance: " + definition.getId()
                                            );

                                            iframeWindow.setCallback(
                                                    new IFrameWindowCallback()
                                                    {
                                                        public void onWindowClosed()
                                                        {
                                                            controller.handleEvent(
                                                                    new Event(UpdateInstancesAction.ID, getCurrentDefinition())
                                                            );
                                                        }
                                                    }
                                            );

                                            iframeWindow.show();
                                        }
                                        else
                                        {
                                            controller.handleEvent(
                                                    new Event(
                                                            StartNewInstanceAction.ID,
                                                            getCurrentDefinition()
                                                    )
                                            );
                                        }
                                    }

                                }
                            });

                }
            }
            );


            terminateBtn = new Button("Terminate", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {

                        MessageBox.confirm("Terminate instance",
                                "Terminating this instance will stop further execution.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {
                                        if (doIt)
                                        {
                                          ProcessInstanceRef selection = getSelection();
                                          if (selection.getState().equals(ProcessInstanceRef.STATE.ENDED)) {
                                              MessageBox.alert("Info", "Process is already completed");
                                            } else {
                                             
                                              selection.setState(ProcessInstanceRef.STATE.ENDED);
                                              selection.setEndResult(ProcessInstanceRef.RESULT.OBSOLETE);
                                              controller.handleEvent(
                                                      new Event(
                                                              StateChangeAction.ID,
                                                              selection
                                                      )
                                              );
                                            }
                                        }
                                    }
                                });
                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );           


            deleteBtn = new Button("Delete", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {
                        MessageBox.confirm("Delete instance",
                                "Deleting this instance will remove any history information and associated tasks as well.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {

                                        if (doIt)
                                        {
                                          try {
                                              ProcessInstanceRef selection = getSelection();
                                              if (selection.getState().equals(ProcessInstanceRef.STATE.ENDED)) {
                                                MessageBox.alert("Info", "Process is already completed");
                                              } else {
                                                selection.setState(ProcessInstanceRef.STATE.ENDED);
   
                                                controller.handleEvent(
                                                        new Event(
                                                                DeleteInstanceAction.ID,
                                                                selection
                                                        )
                                                );
                                              }
                                          } catch (Exception e) {
                        MessageBox.alert("Warning", e.getMessage());
                      }
                                        }
                                    }
                                });

                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );

            signalBtn = new Button("Signal", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                 
                  if (getSelection() != null)
                    {
                    createSignalWindow();
                  }
                  else
                  {
                      MessageBox.alert("Missing selection", "Please select an instance");
                  }
                }
            }
            );

            if(!isRiftsawInstance// riftsaw doesn't support instance operations
            {
                toolBar.add(startBtn);
                toolBar.add(signalBtn);
                toolBar.add(deleteBtn);

                startBtn.setEnabled(false);
                deleteBtn.setEnabled(false);
                signalBtn.setEnabled(false);
            }

            // terminate works on any BPM Engine
            toolBar.add(terminateBtn);
            terminateBtn.setEnabled(false);

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

View Full Code Here


        toolBox.setPadding(0);
        toolBox.setWidgetSpacing(5);
        toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));

        final ToolBar toolBar = new ToolBar();
        toolBar.add(
                new Button("Signal", new ClickHandler() {

                    public void onClick(ClickEvent clickEvent)
                    {
                        int selectedToken = listBoxTokens.getSelectedIndex();
                     // issue warning if user selected row and typed into signal ref text box
                      if (selectedToken != -1 && signalRef.getText().length() > 0)
                      {
                        MessageBox.alert("Multi selection", "Known active nodes and signal ref (text box) is given, please choose only one of them");
                      } else
                       
                        if (selectedToken != -1) {

                            controller.handleEvent(
                                    new Event(SignalExecutionAction.ID,
                                            new SignalInstanceEvent(getCurrentDefinition(), getSelection(), listBoxTokens.getItem(selectedToken), eventData.getText(), selectedToken)));

                        } else if (signalRef.getText().length() > 0) {
                         
                          TokenReference token = new TokenReference();
                          token.setId(getSelection().getId());
                          token.setName(signalRef.getText());
                          int foundMatch = -1;
                          int index = 0;
                          // try to find matching element from the list to avoid double signal problems
                          for (TokenReference ref : tokensToSignal)
                          {
                            if (ref.getName().equals(token.getName())) {
                              foundMatch = index;
                              break;
                            }
                            index++;
                          }
                         
                            controller.handleEvent(
                                    new Event(SignalExecutionAction.ID,
                                            new SignalInstanceEvent(getCurrentDefinition(), getSelection(), token, eventData.getText(), foundMatch)));

                        } else {
                            MessageBox.alert("Incomplete selection", "Please select element you want to signal");
                        }


                    }
                }
                )
        );

        toolBar.add(
                new Button("Close", new ClickHandler() {

                    public void onClick(ClickEvent clickEvent)
                    {
View Full Code Here

   * @deprecated
   */
  @Deprecated
  private Widget makeHeader() {

    ToolBar masterPanel = new ToolBar();
    //masterPanel.setWidth("100%");


    final Label titleLabel = new Label("System Messages", false);
    titleLabel.setStylePrimaryName(LogClientBundle.INSTANCE.css().logTitle());

    HorizontalPanel buttonPanel = new HorizontalPanel();
    levelButtons = new Button[levels.length];
    for (int i = 0; i < levels.length; i++) {
      final int level = levels[i];
      levelButtons[i] = new Button(LogUtil.levelToString(level));
      buttonPanel.add(levelButtons[i]);
      levelButtons[i].addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          ((Button) event.getSource()).setFocus(false);
          Log.setCurrentLogLevel(level);
        }
      });
    }

    Button clearButton = new Button("Clear");
    clearButton.addStyleName(LogClientBundle.INSTANCE.css().logClearButton());
    DOM.setStyleAttribute(clearButton.getElement(), "color", "#00c");
    clearButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        ((Button) event.getSource()).setFocus(false);
        Log.clear();
      }
    });
    buttonPanel.add(clearButton);

    //masterPanel.add(titleLabel);
    masterPanel.add(buttonPanel);
  
    return masterPanel;
  }
View Full Code Here

      // toolbar
      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reload();


            }
          }
          )
      );

      toolBar.add(
          new Button("Claim", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                controller.handleEvent(
                    new Event(
                        ClaimTaskAction.ID,
                        new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
                    )
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                        new Event(
                            SkipTaskAction.ID,
                            new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
                        ));
            }
            else
            {
              MessageBox.alert("Missing selection", "Please select a task");
            }
          }
        }
        );
      skipBtn.setEnabled(false);
      toolBar.add(skipBtn);

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

      this.taskList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
      this.taskList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
View Full Code Here

      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);
      //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reload();

            }
          }
          )
      );


      Button viewBtn = new Button("View", new ClickHandler()
      {

        public void onClick(ClickEvent clickEvent)
        {
          TaskRef selection = getSelection();

          if (selection != null)
          {
            if (selection.getUrl() != null && !selection.getUrl().equals(""))
            {
              iframeWindow = new IFrameWindowPanel(
                  selection.getUrl(), "Task Form: "+selection.getName()
              );

              iframeWindow.setCallback(
                  new IFrameWindowCallback()
                  {
                    public void onWindowClosed()
                    {
                      reload();
                    }
                  }
              );

              iframeWindow.show();
            }
            else
            {
              MessageBox.alert("Invalid operation", "The task doesn't provide a UI");
            }
          }
          else
          {
            MessageBox.alert("Missing selection", "Please select a task");
          }
        }
      }
      );
      toolBar.add(viewBtn);

      toolBar.add(
          new Button("Release", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                TaskIdentityEvent payload = new TaskIdentityEvent(
                    null, selection
                );

                controller.handleEvent(
                    new Event(ReleaseTaskAction.ID, payload)
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                  new Event(
                      SkipTaskAction.ID,
                      new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
                  )
              );
            }
            else
            {
              MessageBox.alert("Missing selection", "Please select a task");
            }
          }
        }
        );
      skipBtn.setEnabled(false);
      toolBar.add(skipBtn);


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

      this.taskList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
View Full Code Here

            final MosaicPanel toolBox = new MosaicPanel();

            toolBox.setPadding(0);
            toolBox.setWidgetSpacing(5);

            final ToolBar toolBar = new ToolBar();
            refreshBtn = new Button("Refresh", new ClickHandler() {

                public void onClick(ClickEvent clickEvent) {
                    controller.handleEvent(
                            new Event(
                                    UpdateInstancesAction.ID,
                                    getCurrentDefinition()
                            )
                    );
                }
            }
            );
            toolBar.add(refreshBtn);
            refreshBtn.setEnabled(false);
            toolBar.addSeparator();

            startBtn = new Button("Start", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    MessageBox.confirm("Start new execution",
                            "Do you want to start a new execution of this process?",
                            new MessageBox.ConfirmationCallback()
                            {
                                public void onResult(boolean doIt)
                                {
                                    if (doIt)
                                    {
                                        String url = getCurrentDefinition().getFormUrl();
                                        boolean hasForm = (url != null && !url.equals(""));
                                        if (hasForm)
                                        {
                                            ProcessDefinitionRef definition = getCurrentDefinition();
                                            iframeWindow = new IFrameWindowPanel(
                                                    definition.getFormUrl(), "New Process Instance: " + definition.getId()
                                            );

                                            iframeWindow.setCallback(
                                                    new IFrameWindowCallback()
                                                    {
                                                        public void onWindowClosed()
                                                        {
                                                            controller.handleEvent(
                                                                    new Event(UpdateInstancesAction.ID, getCurrentDefinition())
                                                            );
                                                        }
                                                    }
                                            );

                                            iframeWindow.show();
                                        }
                                        else
                                        {
                                            controller.handleEvent(
                                                    new Event(
                                                            StartNewInstanceAction.ID,
                                                            getCurrentDefinition()
                                                    )
                                            );
                                        }
                                    }

                                }
                            });

                }
            }
            );


            terminateBtn = new Button("Terminate", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {

                        MessageBox.confirm("Terminate instance",
                                "Terminating this instance will stop further execution.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {
                                        if (doIt)
                                        {
                                            ProcessInstanceRef selection = getSelection();
                                            selection.setState(ProcessInstanceRef.STATE.ENDED);
                                            selection.setEndResult(ProcessInstanceRef.RESULT.OBSOLETE);
                                            controller.handleEvent(
                                                    new Event(
                                                            StateChangeAction.ID,
                                                            selection
                                                    )
                                            );
                                        }
                                    }
                                });
                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );           


            deleteBtn = new Button("Delete", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {
                        MessageBox.confirm("Delete instance",
                                "Deleting this instance will remove any history information and associated tasks as well.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {

                                        if (doIt)
                                        {
                                            ProcessInstanceRef selection = getSelection();
                                            selection.setState(ProcessInstanceRef.STATE.ENDED);

                                            controller.handleEvent(
                                                    new Event(
                                                            DeleteInstanceAction.ID,
                                                            selection
                                                    )
                                            );
                                        }
                                    }
                                });

                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );

            signalBtn = new Button("Signal", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                 
                  if (getSelection() != null)
                    {
                    createSignalWindow();
                  }
                  else
                  {
                      MessageBox.alert("Missing selection", "Please select an instance");
                  }
                }
            }
            );

            if(!isRiftsawInstance// riftsaw doesn't support instance operations
            {
                toolBar.add(startBtn);
                toolBar.add(signalBtn);
                toolBar.add(deleteBtn);

                startBtn.setEnabled(false);
                deleteBtn.setEnabled(false);
                signalBtn.setEnabled(false);
            }

            // terminate works on any BPM Engine
            toolBar.add(terminateBtn);
            terminateBtn.setEnabled(false);

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

View Full Code Here

        toolBox.setPadding(0);
        toolBox.setWidgetSpacing(5);
        toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));

        final ToolBar toolBar = new ToolBar();
        toolBar.add(
                new Button("Signal", new ClickHandler() {

                    public void onClick(ClickEvent clickEvent)
                    {
                        int selectedToken = listBoxTokens.getSelectedIndex();
                     // issue warning if user selected row and typed into signal ref text box
                      if (selectedToken != -1 && signalRef.getText().length() > 0)
                      {
                        MessageBox.alert("Multi selection", "Known active nodes and signal ref (text box) is given, please choose only one of them");
                      } else
                       
                        if (selectedToken != -1) {

                            controller.handleEvent(
                                    new Event(SignalExecutionAction.ID,
                                            new SignalInstanceEvent(getCurrentDefinition(), getSelection(), listBoxTokens.getItem(selectedToken), eventData.getText(), selectedToken)));

                        } else if (signalRef.getText().length() > 0) {
                         
                          TokenReference token = new TokenReference();
                          token.setId(getSelection().getId());
                          token.setName(signalRef.getText());
                          int foundMatch = -1;
                          int index = 0;
                          // try to find matching element from the list to avoid double signal problems
                          for (TokenReference ref : tokensToSignal)
                          {
                            if (ref.getName().equals(token.getName())) {
                              foundMatch = index;
                              break;
                            }
                            index++;
                          }
                         
                            controller.handleEvent(
                                    new Event(SignalExecutionAction.ID,
                                            new SignalInstanceEvent(getCurrentDefinition(), getSelection(), token, eventData.getText(), foundMatch)));

                        } else {
                            MessageBox.alert("Incomplete selection", "Please select element you want to signal");
                        }


                    }
                }
                )
        );

        toolBar.add(
                new Button("Close", new ClickHandler() {

                    public void onClick(ClickEvent clickEvent)
                    {
View Full Code Here

    final LayoutPanel panel = new LayoutPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
    panel.setPadding(0);
    panel.setWidgetSpacing(5);

    final ToolBar toolbar = new ToolBar();
    panel.add(toolbar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
   
    toolbar.add(new Button("Search", new ClickHandler() {

      @Override
      public void onClick(ClickEvent clickEvent) {

                if (definitionList.getItemCount() < 1) {
View Full Code Here

      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(0);
      toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reset();
             
              // force loading
              controller.handleEvent(
                  new Event(UpdateDeploymentsAction.ID, null)
              );
            }
          }
          )
      );


      Button deleteBtn = new Button("Delete", new ClickHandler()
      {
        public void onClick(ClickEvent clickEvent)
        {
          DeploymentRef deploymentRef = getSelection();
          if (deploymentRef != null)
          {
            MessageBox.confirm("Delete deployment",
                "Do you want to delete this deployment? Any related data will be removed.",
                new MessageBox.ConfirmationCallback()
                {
                  public void onResult(boolean doIt)
                  {
                    if (doIt)
                    {
                      controller.handleEvent(
                          new Event(
                              DeleteDeploymentAction.ID,
                              getSelection().getId()
                          )
                      );
                    }
                  }
                });
          }
          else
          {
            MessageBox.alert("Missing selection", "Please select a deployment");
          }
        }
      }
      );

      if(!isRiftsawInstance)
        toolBar.add(deleteBtn);

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

      // filter
      MosaicPanel filterPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
View Full Code Here

            final MosaicPanel toolBox = new MosaicPanel();

            toolBox.setPadding(0);
            toolBox.setWidgetSpacing(5);

            final ToolBar toolBar = new ToolBar();
            refreshBtn = new Button("Refresh", new ClickHandler() {

                public void onClick(ClickEvent clickEvent) {
                    controller.handleEvent(
                            new Event(
                                    UpdateInstancesAction.ID,
                                    getCurrentDefinition()
                            )
                    );
                }
            }
            );
            toolBar.add(refreshBtn);
            refreshBtn.setEnabled(false);
            toolBar.addSeparator();

            startBtn = new Button("Start", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    MessageBox.confirm("Start new execution",
                            "Do you want to start a new execution of this process?",
                            new MessageBox.ConfirmationCallback()
                            {
                                public void onResult(boolean doIt)
                                {
                                    if (doIt)
                                    {
                                        String url = getCurrentDefinition().getFormUrl();
                                        boolean hasForm = (url != null && !url.equals(""));
                                        if (hasForm)
                                        {
                                            ProcessDefinitionRef definition = getCurrentDefinition();
                                            iframeWindow = new IFrameWindowPanel(
                                                    definition.getFormUrl(), "New Process Instance: " + definition.getId()
                                            );

                                            iframeWindow.setCallback(
                                                    new IFrameWindowCallback()
                                                    {
                                                        public void onWindowClosed()
                                                        {
                                                            controller.handleEvent(
                                                                    new Event(UpdateInstancesAction.ID, getCurrentDefinition())
                                                            );
                                                        }
                                                    }
                                            );

                                            iframeWindow.show();
                                        }
                                        else
                                        {
                                            controller.handleEvent(
                                                    new Event(
                                                            StartNewInstanceAction.ID,
                                                            getCurrentDefinition()
                                                    )
                                            );
                                        }
                                    }

                                }
                            });

                }
            }
            );


            terminateBtn = new Button("Terminate", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {

                        MessageBox.confirm("Terminate instance",
                                "Terminating this instance will stop further execution.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {
                                        if (doIt)
                                        {
                                            ProcessInstanceRef selection = getSelection();
                                            selection.setState(ProcessInstanceRef.STATE.ENDED);
                                            selection.setEndResult(ProcessInstanceRef.RESULT.OBSOLETE);
                                            controller.handleEvent(
                                                    new Event(
                                                            StateChangeAction.ID,
                                                            selection
                                                    )
                                            );
                                        }
                                    }
                                });
                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );           


            deleteBtn = new Button("Delete", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    if (getSelection() != null)
                    {
                        MessageBox.confirm("Delete instance",
                                "Deleting this instance will remove any history information and associated tasks as well.",
                                new MessageBox.ConfirmationCallback()
                                {
                                    public void onResult(boolean doIt)
                                    {

                                        if (doIt)
                                        {
                                            ProcessInstanceRef selection = getSelection();
                                            selection.setState(ProcessInstanceRef.STATE.ENDED);

                                            controller.handleEvent(
                                                    new Event(
                                                            DeleteInstanceAction.ID,
                                                            selection
                                                    )
                                            );
                                        }
                                    }
                                });

                    }
                    else
                    {
                        MessageBox.alert("Missing selection", "Please select an instance");
                    }
                }
            }
            );

            signalBtn = new Button("Signal", new ClickHandler()
            {
                public void onClick(ClickEvent clickEvent)
                {
                    createSignalWindow();
                }
            }
            );

            if(!isRiftsawInstance// riftsaw doesn't support instance operations
            {
                toolBar.add(startBtn);
                toolBar.add(signalBtn);
                toolBar.add(deleteBtn);

                startBtn.setEnabled(false);
                deleteBtn.setEnabled(false);
                signalBtn.setEnabled(false);
            }

            // terminate works on any BPM Engine
            toolBar.add(terminateBtn);
            terminateBtn.setEnabled(false);

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

View Full Code Here

TOP

Related Classes of org.gwt.mosaic.ui.client.ToolBar

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.