Package org.gwt.mosaic.ui.client

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


  public void provideWidget(ProvisioningCallback callback)
  {
    panel = new LayoutPanel();

    CaptionLayoutPanel wrapper = new CaptionLayoutPanel("BPAF Data Keys");
    wrapper.setLayout(new ColumnLayout());
       
    LayoutPanel leftPanel = new LayoutPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));

    wrapper.getHeader().add(new Button("Reload",
        new ClickHandler()
        {
          public void onClick(ClickEvent clickEvent)
          {
            loadDefinitions();
          }
        })
    );

    processDefinitions = new ListBox<String>(new String[] {"processDefinitionID"});
    processDefinitions.setMinimumColumnWidth(0, 190);
    processDefinitions.setCellRenderer(
        new ListBox.CellRenderer<String>()
        {
          public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
          {
            switch (column)
            {
              case 0:               
                processDefinitions.setText(row, column, item);
                break;
              default:
                throw new IllegalArgumentException("unknown column");
            }
          }
        }
    );
    processDefinitions.addRowSelectionHandler(
        new RowSelectionHandler()
        {
          public void onRowSelection(RowSelectionEvent rowSelectionEvent)
          {
            loadInstances();
          }
        }
    );

    leftPanel.add(processDefinitions, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    // -----
    LayoutPanel rightPanel = new LayoutPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));

    processInstances = new ListBox<String>(new String[] {"processInstanceID"});
    processInstances.setMinimumColumnWidth(0, 190);
    processInstances.setCellRenderer(
        new ListBox.CellRenderer<String>()
        {
          public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
          {
            switch (column)
            {
              case 0:               
                processInstances.setText(row, column, item);
                break;
              default:
                throw new IllegalArgumentException("unknown column");
            }
          }
        }
    );
    processInstances.addRowSelectionHandler(
        new RowSelectionHandler()
        {
          public void onRowSelection(RowSelectionEvent rowSelectionEvent)
          {
            loadActivities();
          }
        }
    );

    activities = new ListBox<String>(new String[] {"activityDefinitionID"});
       activities.setMinimumColumnWidth(0, 190);
       activities.setCellRenderer(
           new ListBox.CellRenderer<String>()
           {
             public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
             {
               switch (column)
               {
                 case 0:
                   activities.setText(row, column, item);
                   break;
                 default:
                   throw new IllegalArgumentException("unknown column");
               }
             }
           }
       );


    rightPanel.add(processInstances, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
    rightPanel.add(activities, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
   
    // -----
    wrapper.add(leftPanel);
    wrapper.add(rightPanel);

    panel.add(wrapper);
    callback.onSuccess(panel);

  }
View Full Code Here


    isInitialized = true;
  }

  private CaptionLayoutPanel createLogPanel(final WSLayoutPanel parent)
  {
    final CaptionLayoutPanel messagePanel = new CaptionLayoutPanel("Messages");
    messagePanel.setPadding(0);

    // log panel
    // manually, otherwise it will appear on the login screen
    WorkspaceLogger logger = new WorkspaceLogger(
        new WorkspaceLogger.ThresholdNotification()
        {
          public void onLogLevel(int level)
          {
            // open the log panel on errors
            if(level >= Log.LOG_LEVEL_ERROR)
            {
              DeferredCommand.addCommand(
                  new Command()
                  {
                    public void execute()
                    {
                      parent.setCollapsed(messagePanel, false);
                      parent.invalidate();
                      parent.layout();
                    }
                  }
              );
            }
          }
        }
    );
    Widget widget = logger.getWidget();
    widget.setVisible(true);
    Log.addLogger(logger);
   
    messagePanel.add(widget);

    final ImageButton collapseBtn = new ImageButton(Caption.IMAGES.toolCollapseDown());
    messagePanel.getHeader().add(collapseBtn, Caption.CaptionRegion.RIGHT);

    collapseBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        parent.setCollapsed(messagePanel, true);
        parent.invalidate();
View Full Code Here

  public ReportLaunchPadView()
  {
    super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
    this.setPadding(5);

    CaptionLayoutPanel header = new CaptionLayoutPanel("Report configuration");
    header.setStyleName("bpm-detail-panel");
   
    header.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));   

    MosaicPanel templatePanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));   
    description = new HTML();

    dropBox = new com.google.gwt.user.client.ui.ListBox(false)
    dropBox.addChangeHandler(new ChangeHandler() {

      public void onChange(ChangeEvent changeEvent)
      {
        String reportTitle = dropBox.getItemText(dropBox.getSelectedIndex());
        selectForm(reportTitle);               
      }
    });

    templatePanel.add(dropBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
    templatePanel.add(description, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
    // ----

    inputPanel = new MosaicPanel();
   
    // ---
   
    header.add(templatePanel, new BoxLayoutData("250 px", "100 px"));
    header.add(inputPanel, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

    // --

    reportFrame = new ReportFrame();
View Full Code Here

    isInitialized = true;
  }

  private CaptionLayoutPanel createLogPanel(final WSLayoutPanel parent)
  {
    final CaptionLayoutPanel messagePanel = new CaptionLayoutPanel("Messages");
    messagePanel.setPadding(0);

    // log panel
    // manually, otherwise it will appear on the login screen
    WorkspaceLogger logger = new WorkspaceLogger(
        new WorkspaceLogger.ThresholdNotification()
        {
          public void onLogLevel(int level)
          {
            // open the log panel on errors
            if(level >= Log.LOG_LEVEL_ERROR)
            {
              DeferredCommand.addCommand(
                  new Command()
                  {
                    public void execute()
                    {
                      parent.setCollapsed(messagePanel, false);
                      parent.invalidate();
                      parent.layout();
                    }
                  }
              );
            }
          }
        }
    );
    Widget widget = logger.getWidget();
    widget.setVisible(true);
    Log.addLogger(logger);
   
    messagePanel.add(widget);

    final ImageButton collapseBtn = new ImageButton(Caption.IMAGES.toolCollapseDown());
    messagePanel.getHeader().add(collapseBtn, Caption.CaptionRegion.RIGHT);

    collapseBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        parent.setCollapsed(messagePanel, true);
        parent.invalidate();
View Full Code Here

TOP

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

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.