Package snap.viewx

Class FormBuilder

All Implemented Interfaces:
PropChange.DoChange
Direct Known Subclasses:
DialogBox

public class FormBuilder extends ViewOwner
A class to build a form.
  • Field Details

    • _formView

      protected ColView _formView
  • Constructor Details

    • FormBuilder

      public FormBuilder()
      Constructor.
  • Method Details

    • getPadding

      public Insets getPadding()
      Returns the padding.
    • setPadding

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

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

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

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

      public Font getFont()
      Returns the font.
    • setFont

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

      public Label addLabel(String aTitle)
      Adds a label.
    • addTextArea

      public TextArea addTextArea(String aTitle)
      Adds a TextArea.
    • addSeparator

      public Separator addSeparator()
      Adds a separator.
    • addTextField

      public TextField addTextField(String aName, String aDefault)
      Adds a text field.
    • addTextField

      public TextField addTextField(String aLabel, String aName, String aDefault)
      Adds a text field.
    • addComboBox

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

      public RowView addButtons(String[] theTitles)
      Adds buttons.
    • addButtons

      public RowView addButtons(String[] theNames, String[] theLabels)
      Adds buttons.
    • addRadioButtons

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

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

      public <T extends View> T addView(T aView)
      Adds a View.
    • removeView

      public <T extends View> T removeView(T aView)
      Removes a View.
    • showPanel

      public boolean showPanel(View aView, String aTitle, Image anImage)
      Show Dialog.
    • 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.
    • createFormView

      protected ColView createFormView()
      Creates the FormView.
    • createUI

      protected View createUI()
      Creates the UI.
      Overrides:
      createUI in class ViewOwner
    • respondUI

      protected void respondUI(ViewEvent anEvent)
      Responds to UI.
      Overrides:
      respondUI in class ViewOwner