Class FormBuilder
- java.lang.Object
-
- com.inductiveautomation.snap.ui.UIOwner<SwingEvent,javax.swing.JComponent>
-
- com.inductiveautomation.snap.swing.SwingOwner
-
- com.inductiveautomation.snap.swing.FormBuilder
-
public class FormBuilder extends SwingOwner
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 Constructor Description FormBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JComboBoxaddComboBox(java.lang.String aTitle, java.lang.String[] options, java.lang.String aDefault)Adds an option field.javax.swing.JLabeladdLabel(java.lang.String aTitle)Adds a label.<T extends javax.swing.JComponent>
TaddNode(T aComp)Adds a component.javax.swing.JRadioButtonaddRadioButton(java.lang.String aTitle, java.lang.String theText, boolean isSelected)Adds a radio button.java.util.List<javax.swing.JRadioButton>addRadioButtons(java.lang.String aTitle, java.lang.String[] options, java.lang.String aDefault)Adds radio buttons.javax.swing.JSeparatoraddSeparator()Adds a separator.javax.swing.JTextFieldaddTextField(java.lang.String aTitle, java.lang.String aDefault)Adds a text field.javax.swing.JTextFieldaddTextField(java.lang.String aTitle, java.lang.String aDefault, int aWidth)Adds a text field.protected javax.swing.JComponentcreateUI()Creates the UI.protected javax.swing.ButtonGroupgetButtonGroup(java.lang.String aName)Return the button group in this table for the given name (creating if needed).java.awt.FontgetFont()Returns the font.java.awt.InsetsgetPadding()Returns the padding.intgetSpacing()Returns the spacing between components.java.lang.StringgetStringValue(java.lang.String aKey)Returns the specified value.java.lang.ObjectgetValue(java.lang.String aKey)Returns the specified value.protected voidrespondUI(SwingEvent anEvent)Responds to UI.voidsetFont(java.awt.Font aFont)Sets the font.voidsetPadding(int aTp, int aLt, int aBt, int aRt)Sets the padding.voidsetPadding(java.awt.Insets theInsets)Sets the padding.voidsetSpacing(int aValue)Sets the spacing between components.voidsetValue(java.lang.String aKey, java.lang.Object aValue)Sets the specified value.booleanshowPanel(javax.swing.JComponent aComp, java.lang.String aTitle, javax.swing.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
-
-
-
-
Method Detail
-
getPadding
public java.awt.Insets getPadding()
Returns the padding.
-
setPadding
public void setPadding(java.awt.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 java.awt.Font getFont()
Returns the font.
-
setFont
public void setFont(java.awt.Font aFont)
Sets the font.
-
addLabel
public javax.swing.JLabel addLabel(java.lang.String aTitle)
Adds a label.
-
addSeparator
public javax.swing.JSeparator addSeparator()
Adds a separator.
-
addTextField
public javax.swing.JTextField addTextField(java.lang.String aTitle, java.lang.String aDefault)Adds a text field.
-
addTextField
public javax.swing.JTextField addTextField(java.lang.String aTitle, java.lang.String aDefault, int aWidth)Adds a text field.
-
addComboBox
public javax.swing.JComboBox addComboBox(java.lang.String aTitle, java.lang.String[] options, java.lang.String aDefault)Adds an option field.
-
addRadioButtons
public java.util.List<javax.swing.JRadioButton> addRadioButtons(java.lang.String aTitle, java.lang.String[] options, java.lang.String aDefault)Adds radio buttons.
-
addRadioButton
public javax.swing.JRadioButton addRadioButton(java.lang.String aTitle, java.lang.String theText, boolean isSelected)Adds a radio button.
-
addNode
public <T extends javax.swing.JComponent> T addNode(T aComp)
Adds a component.
-
showPanel
public boolean showPanel(javax.swing.JComponent aComp, java.lang.String aTitle, javax.swing.Icon anIcon)Runs the option panel and returns a map.
-
getValue
public java.lang.Object getValue(java.lang.String aKey)
Returns the specified value.
-
setValue
public void setValue(java.lang.String aKey, java.lang.Object aValue)Sets the specified value.
-
getStringValue
public java.lang.String getStringValue(java.lang.String aKey)
Returns the specified value.
-
createUI
protected javax.swing.JComponent createUI()
Creates the UI.- Overrides:
createUIin classSwingOwner
-
respondUI
protected void respondUI(SwingEvent anEvent)
Responds to UI.- Overrides:
respondUIin classUIOwner<SwingEvent,javax.swing.JComponent>
-
getButtonGroup
protected javax.swing.ButtonGroup getButtonGroup(java.lang.String aName)
Return the button group in this table for the given name (creating if needed).
-
-