Class FormBuilder


public class FormBuilder extends SwingOwner
A class to build a form.
  • Constructor Details

    • FormBuilder

      public FormBuilder()
  • Method Details

    • getPadding

      public Insets getPadding()
      Returns the padding.
    • setPadding

      public void setPadding(Insets theInsets)
      Sets the padding.
    • setPadding

      public void setPadding(int aTp, int aLt, int aBt, int aRt)
      Sets the padding.
    • getSpacing

      public int getSpacing()
      Returns the spacing between components.
    • setSpacing

      public void setSpacing(int aValue)
      Sets the spacing between components.
    • getFont

      public Font getFont()
      Returns the font.
    • setFont

      public void setFont(Font aFont)
      Sets the font.
    • addLabel

      public JLabel addLabel(String aTitle)
      Adds a label.
    • addSeparator

      public JSeparator addSeparator()
      Adds a separator.
    • addTextField

      public JTextField addTextField(String aTitle, String aDefault)
      Adds a text field.
    • addTextField

      public JTextField addTextField(String aTitle, String aDefault, int aWidth)
      Adds a text field.
    • addComboBox

      public JComboBox addComboBox(String aTitle, String[] options, String aDefault)
      Adds an option field.
    • addRadioButtons

      public List<JRadioButton> addRadioButtons(String aTitle, String[] options, String aDefault)
      Adds radio buttons.
    • addRadioButton

      public JRadioButton addRadioButton(String aTitle, String theText, boolean isSelected)
      Adds a radio button.
    • addNode

      public <T extends JComponent> T addNode(T aComp)
      Adds a component.
    • showPanel

      public boolean showPanel(JComponent aComp, String aTitle, Icon anIcon)
      Runs the option panel and returns a map.
    • getValue

      public Object getValue(String aKey)
      Returns the specified value.
    • setValue

      public void setValue(String aKey, Object aValue)
      Sets the specified value.
    • getStringValue

      public String getStringValue(String aKey)
      Returns the specified value.
    • createUI

      protected JComponent createUI()
      Creates the UI.
      Overrides:
      createUI in class SwingOwner
    • respondUI

      protected void respondUI(SwingEvent anEvent)
      Responds to UI.
      Overrides:
      respondUI in class UIOwner<SwingEvent,JComponent>
    • getButtonGroup

      protected ButtonGroup getButtonGroup(String aName)
      Return the button group in this table for the given name (creating if needed).