/** * Creates and returns a <code>ButtonBarBuilder</code> with * initialized with a left to right button order. * * @return a button bar builder with button order set to left-to-right */ public static ButtonBarBuilder createLeftToRightBuilder() { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(true); return builder; }
/** * Creates and returns a <code>ButtonBarBuilder</code> with initialized * with a left to right button order. * * @return a button bar builder with button order set to left-to-right */ public static ButtonBarBuilder createLeftToRightBuilder() { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(true); return builder; }
/** * Builds and returns a right aligned button bar with the given buttons. * * @param buttons * an array of buttons to add * @param leftToRightButtonOrder * the order in which the buttons to add * @return a right aligned button bar with the given buttons */ public static JPanel buildRightAlignedBar(JButton[] buttons, boolean leftToRightButtonOrder) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(leftToRightButtonOrder); builder.addGlue(); builder.addGriddedButtons(buttons); return builder.getPanel(); }
/** * Builds and returns a right aligned button bar with the given buttons. * * @param buttons an array of buttons to add * @param leftToRightButtonOrder the order in which the buttons to add * @return a right aligned button bar with the given buttons */ public static JPanel buildRightAlignedBar( JButton[] buttons, boolean leftToRightButtonOrder) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(leftToRightButtonOrder); builder.addGlue(); builder.addGriddedButtons(buttons); return builder.getPanel(); }
/** * Builds and returns a left aligned button bar with the given buttons. * * @param buttons an array of buttons to add * @param leftToRightButtonOrder the order in which the buttons to add * @return a left aligned button bar with the given buttons */ public static JPanel buildLeftAlignedBar( JButton[] buttons, boolean leftToRightButtonOrder) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(leftToRightButtonOrder); builder.addGriddedButtons(buttons); builder.addGlue(); return builder.getPanel(); }
/** * Builds and returns a left aligned button bar with the given buttons. * * @param buttons * an array of buttons to add * @param leftToRightButtonOrder * the order in which the buttons to add * @return a left aligned button bar with the given buttons */ public static JPanel buildLeftAlignedBar(JButton[] buttons, boolean leftToRightButtonOrder) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.setLeftToRightButtonOrder(leftToRightButtonOrder); builder.addGriddedButtons(buttons); builder.addGlue(); return builder.getPanel(); }