Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.ButtonBarBuilder


  public JComponent getConfigurationPanel()
  {
    if( configPanel == null )
    {
      ButtonBarBuilder builder = new ButtonBarBuilder();

      infoLabel = new JLabel();
      delayField = new JTextField( 4 );
      UISupport.setPreferredHeight( delayField, 18 );
      delayField.setHorizontalAlignment( JTextField.RIGHT );
      delayField.setText( String.valueOf( burstDelay / 1000 ) );
      delayField.setToolTipText( "Sets the delay before each burst run in seconds" );
      delayField.getDocument().addDocumentListener( new DocumentListenerAdapter()
      {

        public void update( Document doc )
        {
          try
          {
            burstDelay = Integer.parseInt( delayField.getText() ) * 1000;
            notifyConfigurationChanged();
          }
          catch( NumberFormatException e )
          {
          }
        }
      } );

      builder.addFixed( new JLabel( "Burst Delay" ) );
      builder.addRelatedGap();

      builder.addFixed( delayField );
      builder.addRelatedGap();

      durationField = new JTextField( 4 );
      UISupport.setPreferredHeight( durationField, 18 );
      durationField.setHorizontalAlignment( JTextField.RIGHT );
      durationField.setText( String.valueOf( burstDuration / 1000 ) );
      durationField.setToolTipText( "Specifies the duration of a burst run in seconds" );
      durationField.getDocument().addDocumentListener( new DocumentListenerAdapter()
      {

        public void update( Document doc )
        {
          try
          {
            burstDuration = Integer.parseInt( durationField.getText() ) * 1000;
            notifyConfigurationChanged();
          }
          catch( NumberFormatException e )
          {
          }
        }
      } );

      builder.addFixed( new JLabel( "Burst Duration" ) );
      builder.addRelatedGap();
      builder.addFixed( durationField );
      builder.addRelatedGap();
      builder.addFixed( infoLabel );

      configPanel = builder.getPanel();
    }

    return configPanel;
  }
View Full Code Here


    loadTestLog.removeListDataListener( logTableModel );
  }

  private JComponent buildStatus()
  {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    rowCountLabel = new JLabel( "0 entries" );
    builder.addFixed( rowCountLabel );
    builder.addGlue();
    builder.setBorder( BorderFactory.createEmptyBorder( 3, 3, 3, 3 ) );
    return builder.getPanel();
  }
View Full Code Here

    messageTabs.setPreferredSize( new Dimension( 500, 400 ) );

    JPanel panel = new JPanel( new BorderLayout() );
    panel.add( UISupport.createTabPanel( messageTabs, true ), BorderLayout.CENTER );

    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addFixed( new JLabel( "Mock Request handled at " + new Date( result.getTimestamp() ) + ", time taken: "
        + result.getTimeTaken() + "ms" ) );
    builder.addGlue();
    builder.setBorder( BorderFactory.createEmptyBorder( 2, 2, 2, 2 ) );
    panel.add( builder.getPanel(), BorderLayout.PAGE_START );

    return panel;
  }
View Full Code Here

    private List buttons = new ArrayList();

    public ButtonBarGroupContainerPopulator() {
        super(new JPanel());
        builder = new ButtonBarBuilder((JPanel)getContainer());
    }
View Full Code Here

     *
     * @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();
    }
View Full Code Here

     * @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();
    }
View Full Code Here

     *
     * @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();
    }
View Full Code Here

     *
     * @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();
    }
View Full Code Here

     *
     * @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();
    }
View Full Code Here

     * @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();
    }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.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.