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 TypeMethodDescriptionvoidaddBinding(T anObj, Binding aBinding) Adds the individual binding at the given index to given component.protected SwingEventAdaptercreateEventAdapter(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.intgetBindingCount(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 ChangeListenerReturns a change listener suitable for some controls.Returns the individual child object for given object and index.intgetChildCount(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.booleangetSendActionOnFocusLost(T aComponent) Returns whether this component should send action when focus lost.booleangetSendActionOnFocusLostDefault(T aComponent) Returns whether given component defaults to send action when it loses focus.voidInitializes newly created object.booleanisEnabled(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.voidsetConstraints(T aComponent, Object theConstraints) Sets the constraints for component.voidsetEnabled(T anObj, UIEvent.Type aType, boolean aValue) Sets whether given event is enabled.voidSets given component's owner.voidsetSendActionOnFocusLost(T aComponent, Boolean aValue) Sets whether this component should sends action when it loses focus.Methods inherited from class SwingHelper
getHelper, getSwingHelper, getSwingHelperMethods inherited from class 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
-
initUI
-
getParent
-
getChildCount
Returns the number of children for given object.- Specified by:
getChildCountin classUIHelper<T extends JComponent>
-
getChild
-
getOwner
-
setOwner
-
getConstraints
-
setConstraints
-
getAutosizing
-
getChangeListener
Returns a change listener suitable for some controls. -
getSendActionOnFocusLost
Returns whether this component should send action when focus lost. -
setSendActionOnFocusLost
-
getSendActionOnFocusLostDefault
Returns whether given component defaults to send action when it loses focus. -
getBindingCount
Returns the number of bindings associated with given component.- Overrides:
getBindingCountin classUIHelper<T extends JComponent>
-
getBinding
Returns the individual binding at the given index for given component.- Overrides:
getBindingin classUIHelper<T extends JComponent>
-
getBindings
-
addBinding
Adds the individual binding at the given index to given component.- Overrides:
addBindingin classUIHelper<T extends JComponent>
-
removeBinding
Removes the binding at the given index from given component.- Overrides:
removeBindingin classUIHelper<T extends JComponent>
-
getPropertyNamesImpl
Returns the property names for JComponents.- Overrides:
getPropertyNamesImplin classUIHelper<T extends JComponent>
-
isEnabled
Returns whether given event is enabled.- Specified by:
isEnabledin classUIHelper<T extends JComponent>
-
setEnabled
Sets whether given event is enabled.- Specified by:
setEnabledin classUIHelper<T extends JComponent>
-
getEventAdapter
Returns the SwingEventAdapter for component. -
createEventAdapter
Creates the SwingEventAdapter for component.
-