/** * Builds and returns a right aligned button bar with the given buttons. * * @param buttons an array of buttons to add * @return a right aligned button bar with the given buttons */ public static JPanel buildRightAlignedBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); 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 * @return a left aligned button bar with the given buttons */ public static JPanel buildLeftAlignedBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGriddedButtons(buttons); builder.addGlue(); return builder.getPanel(); }
/** * Builds and returns a right aligned button bar with the given buttons. * * @param buttons * an array of buttons to add * @return a right aligned button bar with the given buttons */ public static JPanel buildRightAlignedBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); 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 * @return a left aligned button bar with the given buttons */ public static JPanel buildLeftAlignedBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGriddedButtons(buttons); builder.addGlue(); return builder.getPanel(); }
/** * Builds and returns a centered button bar with the given buttons. * * @param buttons an array of buttons to add * @return a centered button bar with the given buttons */ public static JPanel buildCenteredBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGlue(); builder.addGriddedButtons(buttons); builder.addGlue(); return builder.getPanel(); }
/** * Builds and returns a centered button bar with the given buttons. * * @param buttons * an array of buttons to add * @return a centered button bar with the given buttons */ public static JPanel buildCenteredBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGlue(); builder.addGriddedButtons(buttons); builder.addGlue(); 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(); }
/** * 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 bar with help and other buttons. * * @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 JPanel buildHelpBar(JButton help, JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGridded(help); builder.addRelatedGap(); builder.addGlue(); builder.addGriddedButtons(buttons); return builder.getPanel(); }
/** * Builds and returns a right aligned bar with help and other buttons. * * @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 JPanel buildHelpBar(JButton help, JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGridded(help); builder.addRelatedGap(); builder.addGlue(); builder.addGriddedButtons(buttons); return builder.getPanel(); }
builder.addGriddedButtons(leftAlignedButtons); builder.addRelatedGap(); builder.addGriddedButtons(rightAlignedButtons);
builder.addGriddedButtons(leftAlignedButtons); builder.addRelatedGap(); builder.addGriddedButtons(rightAlignedButtons);