/** * Sets a default border that has a gap in the bar's north. */ public void setDefaultButtonBarGapBorder() { getPanel().setBorder(Borders.BUTTON_BAR_GAP_BORDER); }
/** * 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.addButton(buttons); final JPanel panel = builder.getPanel(); final JPanel outerPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); outerPanel.add(panel); return outerPanel; }
/** * Builds and returns a button bar with the given buttons. All button * columns will grow with the bar. * * @param buttons an array of buttons to add * @return a filled button bar with the given buttons */ public static JPanel buildGrowingBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGriddedGrowingButtons(buttons); return builder.getPanel(); }
/** * Builds and returns a button bar with the given buttons. All button * columns will grow with the bar. * * @param buttons * an array of buttons to add * @return a filled button bar with the given buttons */ public static JPanel buildGrowingBar(JButton[] buttons) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGriddedGrowingButtons(buttons); 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(); }
private JPanel createButtonBar() { _closeBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { setVisible(false); } }); final ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGlue(); // builder.addGridded(new JButton("Alter")); // builder.addRelatedGap(); builder.addGridded(_closeBtn); 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(); }
private JPanel createButtonBar() { _closeBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { setVisible(false); } }); final ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGlue(); // builder.addGridded(new JButton("Alter")); // builder.addRelatedGap(); builder.addGridded(_closeBtn); 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(); }
private JPanel buildToolBar() { final ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGlue(); // i18n[mysql.alterDlgAlter=Alter] builder.addGridded(new JButton(s_stringMgr.getString("mysql.alterDlgAlter"))); builder.addRelatedGap(); // i18n[mysql.alterDlgClose=Close] builder.addGridded(new JButton(s_stringMgr.getString("mysql.alterDlgClose"))); 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 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 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(); }
/** * Builds and returns a filled button bar with Add, Remove, and * Properties. * * @param add the Add button * @param remove the Remove button * @param properties the Properties button * @return a panel that contains the button(s) */ public static JPanel buildAddRemovePropertiesBar( JButton add, JButton remove, JButton properties) { ButtonBarBuilder builder = new ButtonBarBuilder(); builder.addGriddedGrowing(add); builder.addRelatedGap(); builder.addGriddedGrowing(remove); builder.addRelatedGap(); builder.addGriddedGrowing(properties); return builder.getPanel(); }