Class JComponentHpr<T extends JComponent>
java.lang.Object
com.inductiveautomation.snap.ui.UIHelper<T>
com.inductiveautomation.snap.swing.SwingHelper<T>
com.inductiveautomation.snap.swing.helpers.JComponentHpr<T>
- Direct Known Subclasses:
DragWell.Helper
,JComboBoxHpr
,JListHpr
,JMenuItemHpr
,JProgressBarHpr
,JScrollPaneHpr
,JSliderHpr
,JSpinnerHpr
,JSplitPaneHpr
,JTabbedPaneHpr
,JTableHpr
,JTextComponentHpr
,JTreeHpr
,LabeledHpr
,RJColorWellHpr
,RJThumbWheelHpr
,SpringsPaneHpr
,SwitchPaneHpr
This class is used to provide Snap UI functionality to Swing JComponents.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinding
(T anObj, Binding aBinding) Adds the individual binding at the given index to given component.protected SwingEventAdapter
createEventAdapter
(T aComponent) Creates the SwingEventAdapter for component.getAutosizing
(T aComponent) Returns the autosizing for the given component.getBinding
(T anObj, int anIndex) Returns the individual binding at the given index for given component.int
getBindingCount
(T anObj) Returns the number of bindings associated with given component.getBindings
(T anObj, boolean doCreate) Returns the list of RibsBindings, with option to create, if missing.protected ChangeListener
Returns a change listener suitable for some controls.Returns the individual child object for given object and index.int
getChildCount
(T aComp) Returns the number of children for given object.getConstraints
(T aComponent) Returns the constraints for component.getEventAdapter
(T aComponent, boolean doCreate) Returns the SwingEventAdapter for component.Returns the name of the given component.Returns given component's owner.Returns the parent object for given object.getPropertyNamesImpl
(T anObj) Returns the property names for JComponents.boolean
getSendActionOnFocusLost
(T aComponent) Returns whether this component should send action when focus lost.boolean
getSendActionOnFocusLostDefault
(T aComponent) Returns whether given component defaults to send action when it loses focus.void
Initializes newly created object.boolean
isEnabled
(T anObj, UIEvent.Type aType) Returns whether given event is enabled.removeBinding
(T anObj, int anIndex) Removes the binding at the given index from given component.void
setConstraints
(T aComponent, Object theConstraints) Sets the constraints for component.void
setEnabled
(T anObj, UIEvent.Type aType, boolean aValue) Sets whether given event is enabled.void
Sets given component's owner.void
setSendActionOnFocusLost
(T aComponent, Boolean aValue) Sets whether this component should sends action when it loses focus.Methods inherited from class com.inductiveautomation.snap.swing.SwingHelper
getHelper, getSwingHelper, getSwingHelper
Methods inherited from class com.inductiveautomation.snap.ui.UIHelper
enableEvents, getAction, getBinding, getChild, getItemDisplayKey, getItems, getKeyValue, getPropertyNameMapped, getPropertyNames, getSelectedIndex, getSelectedIndexes, getSelectedIndexs, getSelectedItem, getText, getValue, initUIDeep, isEnabled, isPropertyName, isValueAdjusting, removeBinding, setAction, setEnabled, setItemDisplayKey, setItems, setItems, setKeyValue, setSelectedIndex, setSelectedIndexes, setSelectedItem, setText, setValue
-
Constructor Details
-
JComponentHpr
public JComponentHpr()
-
-
Method Details
-
getName
Returns the name of the given component.- Specified by:
getName
in classUIHelper<T extends JComponent>
-
initUI
Initializes newly created object.- Overrides:
initUI
in classUIHelper<T extends JComponent>
-
getParent
Returns the parent object for given object.- Specified by:
getParent
in classUIHelper<T extends JComponent>
-
getChildCount
Returns the number of children for given object.- Specified by:
getChildCount
in classUIHelper<T extends JComponent>
-
getChild
Returns the individual child object for given object and index.- Specified by:
getChild
in classUIHelper<T extends JComponent>
-
getOwner
Returns given component's owner.- Specified by:
getOwner
in classUIHelper<T extends JComponent>
-
setOwner
Sets given component's owner.- Specified by:
setOwner
in classUIHelper<T extends JComponent>
-
getConstraints
Returns the constraints for component. -
setConstraints
Sets the constraints for component. -
getAutosizing
Returns the autosizing for the given component. -
getChangeListener
Returns a change listener suitable for some controls. -
getSendActionOnFocusLost
Returns whether this component should send action when focus lost. -
setSendActionOnFocusLost
Sets whether this component should sends action when it loses focus. -
getSendActionOnFocusLostDefault
Returns whether given component defaults to send action when it loses focus. -
getBindingCount
Returns the number of bindings associated with given component.- Overrides:
getBindingCount
in classUIHelper<T extends JComponent>
-
getBinding
Returns the individual binding at the given index for given component.- Overrides:
getBinding
in classUIHelper<T extends JComponent>
-
getBindings
Returns the list of RibsBindings, with option to create, if missing. -
addBinding
Adds the individual binding at the given index to given component.- Overrides:
addBinding
in classUIHelper<T extends JComponent>
-
removeBinding
Removes the binding at the given index from given component.- Overrides:
removeBinding
in classUIHelper<T extends JComponent>
-
getPropertyNamesImpl
Returns the property names for JComponents.- Overrides:
getPropertyNamesImpl
in classUIHelper<T extends JComponent>
-
isEnabled
Returns whether given event is enabled.- Specified by:
isEnabled
in classUIHelper<T extends JComponent>
-
setEnabled
Sets whether given event is enabled.- Specified by:
setEnabled
in classUIHelper<T extends JComponent>
-
getEventAdapter
Returns the SwingEventAdapter for component. -
createEventAdapter
Creates the SwingEventAdapter for component.
-