Class FormBuilder
java.lang.Object
com.inductiveautomation.snap.ui.UIOwner<SwingEvent,JComponent>
com.inductiveautomation.snap.swing.SwingOwner
com.inductiveautomation.snap.swing.FormBuilder
A class to build a form.
-
Field Summary
Fields inherited from class com.inductiveautomation.snap.ui.UIOwner
DragDrop, DragEnter, DragEvents, DragExit, DragOver, KeyEvents, KeyFinished, KeyPressed, KeyReleased, KeyTyped, MouseClicked, MouseDragged, MouseEntered, MouseEvents, MouseExited, MouseFinished, MouseMoved, MousePressed, MouseReleased -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddComboBox(String aTitle, String[] options, String aDefault) Adds an option field.Adds a label.<T extends JComponent>
TaddNode(T aComp) Adds a component.addRadioButton(String aTitle, String theText, boolean isSelected) Adds a radio button.addRadioButtons(String aTitle, String[] options, String aDefault) Adds radio buttons.Adds a separator.addTextField(String aTitle, String aDefault) Adds a text field.addTextField(String aTitle, String aDefault, int aWidth) Adds a text field.protected JComponentcreateUI()Creates the UI.protected ButtonGroupgetButtonGroup(String aName) Return the button group in this table for the given name (creating if needed).getFont()Returns the font.Returns the padding.intReturns the spacing between components.getStringValue(String aKey) Returns the specified value.Returns the specified value.protected voidrespondUI(SwingEvent anEvent) Responds to UI.voidSets the font.voidsetPadding(int aTp, int aLt, int aBt, int aRt) Sets the padding.voidsetPadding(Insets theInsets) Sets the padding.voidsetSpacing(int aValue) Sets the spacing between components.voidSets the specified value.booleanshowPanel(JComponent aComp, String aTitle, Icon anIcon) Runs the option panel and returns a map.Methods inherited from class com.inductiveautomation.snap.swing.SwingOwner
addKeyActionEvent, createTimer, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisibleMethods inherited from class com.inductiveautomation.snap.ui.UIOwner
addNodeBinding, disableEvents, enableEvents, getBindingModelValue, getBindingNodeValue, getConversionMap, getConversionMapKey, getConversionMaps, getConversionMapValue, getFirstFocus, getModelValue, getNode, getNodeAction, getNodeBoolValue, getNodeFloatValue, getNodeIntValue, getNodeItemDisplayKey, getNodeItems, getNodeSelectedIndex, getNodeSelectedItem, getNodeStringValue, getNodeText, getNodeValue, getUI, getUIHpr, initUI, initUI, isNodeEnabled, isNodeValueAdjusting, isSendEventDisabled, isUISet, processResetUI, processRespondUI, resetLater, resetNodeBindings, resetUI, runLaterDelayed, runLaterOnce, sendEvent, sendNodeAction, setBindingModelValue, setBindingNodeValue, setFirstFocus, setModelValue, setNodeAction, setNodeEnabled, setNodeItemDisplayKey, setNodeItems, setNodeItems, setNodeSelectedIndex, setNodeSelectedItem, setNodeText, setNodeValue, setSendEventDisabled
-
Constructor Details
-
FormBuilder
public FormBuilder()
-
-
Method Details
-
getPadding
Returns the padding. -
setPadding
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
Returns the font. -
setFont
Sets the font. -
addLabel
Adds a label. -
addSeparator
Adds a separator. -
addTextField
Adds a text field. -
addTextField
Adds a text field. -
addComboBox
Adds an option field. -
addRadioButtons
Adds radio buttons. -
addRadioButton
Adds a radio button. -
addNode
Adds a component. -
showPanel
Runs the option panel and returns a map. -
getValue
Returns the specified value. -
setValue
Sets the specified value. -
getStringValue
Returns the specified value. -
createUI
Creates the UI.- Overrides:
createUIin classSwingOwner
-
respondUI
Responds to UI.- Overrides:
respondUIin classUIOwner<SwingEvent,JComponent>
-
getButtonGroup
Return the button group in this table for the given name (creating if needed).
-