Package org.gwt.mosaic.forms.client.builder

Examples of org.gwt.mosaic.forms.client.builder.ButtonBarBuilder


   *
   * @param buttons an array of buttons to add
   * @return a left aligned button bar with the given buttons
   */
  public static LayoutPanel buildLeftAlignedBar(Button[] buttons) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGriddedButtons(buttons);
    builder.addGlue();
    return builder.getPanel();
  }
View Full Code Here


   * @param leftToRightButtonOrder the order in which the buttons to add
   * @return a left aligned button bar with the given buttons
   */
  public static LayoutPanel buildLeftAlignedBar(Button[] buttons,
      boolean leftToRightButtonOrder) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.setLeftToRightButtonOrder(leftToRightButtonOrder);
    builder.addGriddedButtons(buttons);
    builder.addGlue();
    return builder.getPanel();
  }
View Full Code Here

   *
   * @param buttons an array of buttons to add
   * @return a centered button bar with the given buttons
   */
  public static LayoutPanel buildCenteredBar(Button[] buttons) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGlue();
    builder.addGriddedButtons(buttons);
    builder.addGlue();
    return builder.getPanel();
  }
View Full Code Here

   *
   * @param buttons an array of buttons to add
   * @return a filled button bar with the given buttons
   */
  public static LayoutPanel buildGrowingBar(Button[] buttons) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGriddedGrowingButtons(buttons);
    return builder.getPanel();
  }
View Full Code Here

   *
   * @param buttons an array of buttons to add
   * @return a right aligned button bar with the given buttons
   */
  public static LayoutPanel buildRightAlignedBar(Button[] buttons) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGlue();
    builder.addGriddedButtons(buttons);
    return builder.getPanel();
  }
View Full Code Here

   * @param leftToRightButtonOrder the order in which the buttons to add
   * @return a right aligned button bar with the given buttons
   */
  public static LayoutPanel buildRightAlignedBar(Button[] buttons,
      boolean leftToRightButtonOrder) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.setLeftToRightButtonOrder(leftToRightButtonOrder);
    builder.addGlue();
    builder.addGriddedButtons(buttons);
    return builder.getPanel();
  }
View Full Code Here

   * @param help the help button to add on the left side
   * @param buttons an array of buttons to add
   * @return a right aligned button bar with the given buttons
   */
  public static LayoutPanel buildHelpBar(Button help, Button[] buttons) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGridded(help);
    builder.addRelatedGap();
    builder.addGlue();
    builder.addGriddedButtons(buttons);
    return builder.getPanel();
  }
View Full Code Here

   * @param properties the Properties button
   * @return a panel that contains the button(s)
   */
  public static LayoutPanel buildAddRemovePropertiesBar(Button add, Button remove,
      Button properties) {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGriddedGrowing(add);
    builder.addRelatedGap();
    builder.addGriddedGrowing(remove);
    builder.addRelatedGap();
    builder.addGriddedGrowing(properties);
    return builder.getPanel();
  }
View Full Code Here

   */
  public static LayoutPanel buildWizardBar(Button[] leftAlignedButtons,
      Button back, Button next, Button overlaidFinish,
      Button[] rightAlignedButtons) {

    ButtonBarBuilder builder = new ButtonBarBuilder();
    if (leftAlignedButtons != null) {
      builder.addGriddedButtons(leftAlignedButtons);
      builder.addRelatedGap();
    }
    builder.addGlue();
    builder.addGridded(back);
    builder.addGridded(next);

    // Optionally overlay the finish and next button.
    if (overlaidFinish != null) {
      builder.nextColumn(-1);
      builder.add(overlaidFinish);
      builder.nextColumn();
    }

    if (rightAlignedButtons != null) {
      builder.addRelatedGap();
      builder.addGriddedButtons(rightAlignedButtons);
    }
    return builder.getPanel();
  }
View Full Code Here

TOP

Related Classes of org.gwt.mosaic.forms.client.builder.ButtonBarBuilder

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.