Examples of MosaicPanel


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

        this.appContext = Registry.get(ApplicationContext.class);
        // riftsaw?
        isRiftsawInstance = appContext.getConfig().getProfileName().equals("BPEL Console");

        panel = new MosaicPanel();
        panel.setPadding(0);

        Registry.get(Controller.class).addView(ID, this);
        initialize();
View Full Code Here

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

    public void initialize()
    {
        if(!isInitialized)
        {
            instanceList = new MosaicPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
            instanceList.setPadding(0);
            instanceList.setWidgetSpacing(0);

            listBox =
                    new ListBox<ProcessInstanceRef>(
                            new String[] {
                                    "<b>Instance</b>", "State", "Start Date"}
                    );

            listBox.setCellRenderer(new ListBox.CellRenderer<ProcessInstanceRef>() {
                public void renderCell(ListBox<ProcessInstanceRef> listBox, int row, int column,
                                       ProcessInstanceRef item) {
                    switch (column) {
                        case 0:
                            listBox.setText(row, column, item.getId());
                            break;
                        case 1:
                            listBox.setText(row, column, item.getState().toString());
                            break;
                        case 2:
                            String d = item.getStartDate() != null ? dateFormat.format(item.getStartDate()) : "";
                            listBox.setText(row, column, d);
                            break;
                        default:
                            throw new RuntimeException("Unexpected column size");
                    }
                }
            });

            listBox.addRowSelectionHandler(
                    new RowSelectionHandler()
                    {
                        public void onRowSelection(RowSelectionEvent rowSelectionEvent)
                        {
                            int index = listBox.getSelectedIndex();
                            if(index!=-1)
                            {
                                ProcessInstanceRef item = listBox.getItem(index);

                                // enable or disable signal button depending on current activity
                                if (isSignalable(item)) {
                                    signalBtn.setEnabled(true);
                                } else {
                                    signalBtn.setEnabled(false);
                                }

                                terminateBtn.setEnabled(true);

                                // update details
                                controller.handleEvent(
                                        new Event(UpdateInstanceDetailAction.ID,
                                                new InstanceEvent(currentDefinition, item)
                                        )
                                );
                            }
                        }
                    }
            );

            // 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));


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

            /*pagingPanel = new PagingPanel(
              new PagingCallback()
              {
                public void rev()
                {
                  renderUpdate();
                }

                public void ffw()
                {
                  renderUpdate();
                }
              }
          );
          instanceList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));*/

            // cached data?
            if(this.cachedInstances!=null)
                bindData(this.cachedInstances);

            // layout
            MosaicPanel layout = new MosaicPanel(new BorderLayout());
            layout.setPadding(0);
            layout.add(instanceList, new BorderLayoutData(BorderLayout.Region.CENTER));

            // details
            InstanceDetailView detailsView = new InstanceDetailView();
            controller.addView(InstanceDetailView.ID, detailsView);
            controller.addAction(UpdateInstanceDetailAction.ID, new UpdateInstanceDetailAction());
            controller.addAction(ClearInstancesAction.ID, new ClearInstancesAction());
            controller.addAction(SignalExecutionAction.ID, new SignalExecutionAction());
            layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));

            panel.add(layout);

            isInitialized = true;

View Full Code Here

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

    private void createSignalWindow()
    {
        signalTextBoxes = new ArrayList<TextBox>();

        MosaicPanel layout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
        layout.setStyleName("bpm-window-layout");
        layout.setPadding(5);
        // toolbar
        final MosaicPanel toolBox = new MosaicPanel();

        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)
                    {

                        signalWindowPanel.close();
                        controller.handleEvent( new Event(UpdateInstancesAction.ID, getCurrentDefinition()));
                    }
                }
                )
        );

       

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

        layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
       
        Label header = new Label("Known active nodes to signal: ");
        header.setStyleName("bpm-label-header");
View Full Code Here

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

        Widget closeBtn = window.getHeader().getWidget(0, Caption.CaptionRegion.RIGHT);
        closeBtn.setVisible(false);
        window.setAnimationEnabled(false);


        MosaicPanel panel = new MosaicPanel();
        panel.addStyleName("bpm-login");

        createLayoutContent(panel);
        window.setWidget(panel);
    }
View Full Code Here

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


        HTML html = new HTML("Version: " + Version.VERSION);
        html.setStyleName("bpm-login-info");

        MosaicPanel btnPanel = new MosaicPanel(new BoxLayout());
        btnPanel.add(html, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        btnPanel.add(submit);

        layoutPanel.add(messagePanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        layoutPanel.add(form, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
        layoutPanel.add(btnPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
View Full Code Here

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

    }

    private Widget createForm()
    {
        MosaicPanel panel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
        panel.setPadding(0);

        MosaicPanel box1 = new MosaicPanel(new BoxLayout());
        box1.setPadding(0);       
        MosaicPanel box2 = new MosaicPanel(new BoxLayout());
        box2.setPadding(0);

        usernameInput = new TextBox();
        passwordInput = new PasswordTextBox();


        BoxLayoutData bld1 = new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL);
        bld1.setPreferredWidth("70px");

        box1.add( new Label("Username:"), bld1);
        box1.add(usernameInput);

        box2.add(new Label("Password:"), bld1);
        box2.add(passwordInput);

        passwordInput.addKeyboardListener(
                new KeyboardListener()
                {
View Full Code Here

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

                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

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

        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

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

        this.appContext = Registry.get(ApplicationContext.class);
        // riftsaw?
        isRiftsawInstance = appContext.getConfig().getProfileName().equals("BPEL Console");

        panel = new MosaicPanel();
        panel.setPadding(0);

        Registry.get(Controller.class).addView(ID, this);
        initialize();
View Full Code Here

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

    public void initialize()
    {
        if(!isInitialized)
        {
            instanceList = new MosaicPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
            instanceList.setPadding(0);
            instanceList.setWidgetSpacing(0);

            listBox =
                    new ListBox<ProcessInstanceRef>(
                            new String[] {
                                    "<b>Instance</b>", "State", "Start Date"}
                    );

            listBox.setCellRenderer(new ListBox.CellRenderer<ProcessInstanceRef>() {
                public void renderCell(ListBox<ProcessInstanceRef> listBox, int row, int column,
                                       ProcessInstanceRef item) {
                    switch (column) {
                        case 0:
                            listBox.setText(row, column, item.getId());
                            break;
                        case 1:
                            listBox.setText(row, column, item.getState().toString());
                            break;
                        case 2:
                            String d = item.getStartDate() != null ? dateFormat.format(item.getStartDate()) : "";
                            listBox.setText(row, column, d);
                            break;
                        default:
                            throw new RuntimeException("Unexpected column size");
                    }
                }
            });

            listBox.addRowSelectionHandler(
                    new RowSelectionHandler()
                    {
                        public void onRowSelection(RowSelectionEvent rowSelectionEvent)
                        {
                            int index = listBox.getSelectedIndex();
                            if(index!=-1)
                            {
                                ProcessInstanceRef item = listBox.getItem(index);

                                // enable or disable signal button depending on current activity
                                if (isSignalable(item)) {
                                    signalBtn.setEnabled(true);
                                } else {
                                    signalBtn.setEnabled(false);
                                }

                                terminateBtn.setEnabled(true);

                                // update details
                                controller.handleEvent(
                                        new Event(UpdateInstanceDetailAction.ID,
                                                new InstanceEvent(currentDefinition, item)
                                        )
                                );
                            }
                        }
                    }
            );

            // 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();
                                            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));


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

            /*pagingPanel = new PagingPanel(
              new PagingCallback()
              {
                public void rev()
                {
                  renderUpdate();
                }

                public void ffw()
                {
                  renderUpdate();
                }
              }
          );
          instanceList.add(pagingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));*/

            // cached data?
            if(this.cachedInstances!=null)
                bindData(this.cachedInstances);

            // layout
            MosaicPanel layout = new MosaicPanel(new BorderLayout());
            layout.setPadding(0);
            layout.add(instanceList, new BorderLayoutData(BorderLayout.Region.CENTER));

            // details
            InstanceDetailView detailsView = new InstanceDetailView();
            controller.addView(InstanceDetailView.ID, detailsView);
            controller.addAction(UpdateInstanceDetailAction.ID, new UpdateInstanceDetailAction());
            controller.addAction(ClearInstancesAction.ID, new ClearInstancesAction());
            controller.addAction(SignalExecutionAction.ID, new SignalExecutionAction());
            layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH,10,200));

            panel.add(layout);

            isInitialized = true;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.