Package org.gwt.mosaic.ui.client

Examples of org.gwt.mosaic.ui.client.ToolButton$ButtonWidget


  private ButtonLabelType labelType = ButtonLabelType.TEXT_ON_RIGHT;

  private ToolButtonBean targetBean;

  public ToolButtonBindings(Action source) {
    this(source, new ToolButton());
  }
View Full Code Here


    toggleButton.addClickListener(action);
    return toggleButton;
  }

  private ToolButton createToolButton(Action action) {
    ToolButton toolButton = new ToolButton();
    if (action.getText() != null) {
      toolButton.setText(action.getText());
    }
    if (action.getTitle() != null) {
      toolButton.getTitle();
    }
    toolButton.addClickListener(action);
    return toolButton;
  }
View Full Code Here

        final ToolBar toolBar = new ToolBar();
        panel.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

        // -----

        menuButton = new ToolButton("Open", new ClickHandler()
        {
            public void onClick(ClickEvent clickEvent) {
                controller.handleEvent(new Event(GetProcessDefinitionsAction.ID, null));
            }
        });       
        toolBar.add(menuButton);


        // -----

        title = new HTML();
        title.getElement().setAttribute("style", "font-size:24px; font-weight:BOLD");

        // ------------

        BoxLayout boxLayout = new BoxLayout(BoxLayout.Orientation.HORIZONTAL);
        timespanPanel = new LayoutPanel(boxLayout);
        timespanPanel.setPadding(0);

        timespan = new HTML();
        timespan.getElement().setAttribute("style", "padding-left:10px;padding-top:2px; color:#C8C8C8;font-size:16px;text-align:left;");
        timespanButton = new ToolButton();

        timespanButton.setStyle(ToolButton.ToolButtonStyle.MENU);
        timespanButton.getElement().setAttribute("style", "padding-right:0px;background-image:none;");
        timespanButton.setVisible(false);
View Full Code Here

      toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));

      // toolbar
      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(UpdateJobsAction.ID, null)
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      toolBar.add(
          new ToolButton("Execute", new ClickListener() {
            public void onClick(Widget sender) {
              JobRef selection = getSelection();
              if(null==selection)
              {
                MessageBox.alert("Missing selection", "Please select a job!");
View Full Code Here


  private Widget createMenuBtn()
  {
    // Add a menu button
    ToolButton menuButton = new ToolButton("Available Reports");
    menuButton.setStyle(ToolButton.ToolButtonStyle.MENU);

    // Make a command that we will execute from all menu items.
    Command cmd1 = new Command() {
      public void execute() {
        setFrameUrl(URLBuilder.getInstance().getOverallReportUrl());
      }
    };

    Command cmd2 = new Command() {
      public void execute()
      {
        SearchWindow sw = new SearchWindow("Open process summary report", search);
        sw.center();

        controller.handleEvent(
            new Event(
                UpdateSearchDefinitionsAction.ID,
                "report.definition.search"
            )
        );

      }
    };

    PopupMenu menuBtnMenu = new PopupMenu();
    menuBtnMenu.addItem("Overall System Activity", cmd1);
    menuBtnMenu.addItem("Process Summary", cmd2);

    menuButton.setMenu(menuBtnMenu);

    return menuButton;
  }
View Full Code Here

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

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(UpdateDeploymentsAction.ID, null)
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      toolBar.add(
          new ToolButton("Delete", new ClickListener() {
            public void onClick(Widget sender) {

              DeploymentRef deploymentRef = getSelection();
              if(deploymentRef!=null)
              {
View Full Code Here

      toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));

      // toolbar
      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(UpdateDefinitionsAction.ID, null)
              );
View Full Code Here

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

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      toolBar.add(
          new ToolButton("Claim", new ClickListener() {
            public void onClick(Widget sender)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
View Full Code Here

  public static ToolButton newToolButton(final String action,
      final ToolButtonStyle style, final ButtonLabelType labelType) {
    final ToolButtonBindings bindings = new ToolButtonBindings(
        getActionMap().get(action));
    final ToolButton toolButton = bindings.getTarget();
    toolButton.setStyle(style);
    bindings.setLabelType(labelType);
    bindings.bind();
    return toolButton;
  }
View Full Code Here

  private ButtonLabelType labelType = ButtonLabelType.TEXT_ON_RIGHT;

  private ToolButtonBean targetBean;

  public ToolButtonBindings(Action source) {
    this(source, new ToolButton());
  }
View Full Code Here

TOP

Related Classes of org.gwt.mosaic.ui.client.ToolButton$ButtonWidget

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.