Class JComboBoxHpr<T extends javax.swing.JComboBox>
- java.lang.Object
-
- com.inductiveautomation.snap.ui.UIHelper<T>
-
- com.inductiveautomation.snap.swing.SwingHelper<T>
-
- com.inductiveautomation.snap.swing.helpers.JComponentHpr<T>
-
- com.inductiveautomation.snap.swing.helpers.JComboBoxHpr<T>
-
public class JComboBoxHpr<T extends javax.swing.JComboBox> extends JComponentHpr<T>
This class provides Ribs functionality for JComboBox.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJComboBoxHpr.ItemsModelA combobox model implementation to handle binding.static classJComboBoxHpr.JComboBoxEventAdapterA SwingEventListener for JComboBox.
-
Constructor Summary
Constructors Constructor Description JComboBoxHpr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SwingEventAdaptercreateEventAdapter(T aComboBox)Creates a SwingEventAdapter subclass.intgetChildCount(T anObj)Override to suppress children.java.lang.StringgetItemDisplayKey(T aComboBox)Returns the render key chain.java.util.ListgetItems(T anObj)Returns the items for an object.java.lang.StringgetPropertyNameMapped(T anObj, java.lang.String aName)Returns a mapped property name.protected java.util.List<java.lang.String>getPropertyNamesImpl(T anObj)Returns the property names for given object.voidinitUI(T anObj, UIOwner anOwner)Initializes newly created object.voidsetItemDisplayKey(T aComboBox, java.lang.String aKey)Sets the display key for ComboBox items.voidsetItems(T anObj, java.util.List theItems)Sets the items for an object.voidsetSelectedIndex(T aCBox, int anIndex)Override to repaint.voidsetValue(T aCBox, java.lang.String aPropertyName, java.lang.Object aValue)Override to convert SelectedItem enums to String if needed.-
Methods inherited from class com.inductiveautomation.snap.swing.helpers.JComponentHpr
addBinding, getAutosizing, getBinding, getBindingCount, getBindings, getChangeListener, getChild, getConstraints, getEventAdapter, getName, getOwner, getParent, getSendActionOnFocusLost, getSendActionOnFocusLostDefault, isEnabled, removeBinding, setConstraints, setEnabled, setOwner, setSendActionOnFocusLost
-
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, getKeyValue, getPropertyNames, getSelectedIndex, getSelectedIndexes, getSelectedIndexs, getSelectedItem, getText, getValue, initUIDeep, isEnabled, isPropertyName, isValueAdjusting, removeBinding, setAction, setEnabled, setItems, setKeyValue, setSelectedIndexes, setSelectedItem, setText
-
-
-
-
Method Detail
-
getChildCount
public int getChildCount(T anObj)
Override to suppress children.- Overrides:
getChildCountin classJComponentHpr<T extends javax.swing.JComboBox>
-
initUI
public void initUI(T anObj, UIOwner anOwner)
Initializes newly created object.- Overrides:
initUIin classJComponentHpr<T extends javax.swing.JComboBox>
-
createEventAdapter
protected SwingEventAdapter createEventAdapter(T aComboBox)
Creates a SwingEventAdapter subclass.- Overrides:
createEventAdapterin classJComponentHpr<T extends javax.swing.JComboBox>
-
getPropertyNamesImpl
protected java.util.List<java.lang.String> getPropertyNamesImpl(T anObj)
Returns the property names for given object.- Overrides:
getPropertyNamesImplin classJComponentHpr<T extends javax.swing.JComboBox>
-
getPropertyNameMapped
public java.lang.String getPropertyNameMapped(T anObj, java.lang.String aName)
Returns a mapped property name.- Overrides:
getPropertyNameMappedin classUIHelper<T extends javax.swing.JComboBox>
-
setValue
public void setValue(T aCBox, java.lang.String aPropertyName, java.lang.Object aValue)
Override to convert SelectedItem enums to String if needed.
-
setSelectedIndex
public void setSelectedIndex(T aCBox, int anIndex)
Override to repaint.- Overrides:
setSelectedIndexin classUIHelper<T extends javax.swing.JComboBox>
-
getItems
public java.util.List getItems(T anObj)
Returns the items for an object.
-
setItems
public void setItems(T anObj, java.util.List theItems)
Sets the items for an object.
-
getItemDisplayKey
public java.lang.String getItemDisplayKey(T aComboBox)
Returns the render key chain.- Overrides:
getItemDisplayKeyin classUIHelper<T extends javax.swing.JComboBox>
-
setItemDisplayKey
public void setItemDisplayKey(T aComboBox, java.lang.String aKey)
Sets the display key for ComboBox items.- Overrides:
setItemDisplayKeyin classUIHelper<T extends javax.swing.JComboBox>
-
-