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 JComponent
createUI()
Creates the UI.protected ButtonGroup
getButtonGroup
(String aName) Return the button group in this table for the given name (creating if needed).getFont()
Returns the font.Returns the padding.int
Returns the spacing between components.getStringValue
(String aKey) Returns the specified value.Returns the specified value.protected void
respondUI
(SwingEvent anEvent) Responds to UI.void
Sets the font.void
setPadding
(int aTp, int aLt, int aBt, int aRt) Sets the padding.void
setPadding
(Insets theInsets) Sets the padding.void
setSpacing
(int aValue) Sets the spacing between components.void
Sets the specified value.boolean
showPanel
(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, setWindowVisible
Methods 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:
createUI
in classSwingOwner
-
respondUI
Responds to UI.- Overrides:
respondUI
in classUIOwner<SwingEvent,
JComponent>
-
getButtonGroup
Return the button group in this table for the given name (creating if needed).
-