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 class
JComboBoxHpr.ItemsModel
A combobox model implementation to handle binding.static class
JComboBoxHpr.JComboBoxEventAdapter
A SwingEventListener for JComboBox.
-
Constructor Summary
Constructors Constructor Description JComboBoxHpr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SwingEventAdapter
createEventAdapter(T aComboBox)
Creates a SwingEventAdapter subclass.int
getChildCount(T anObj)
Override to suppress children.java.lang.String
getItemDisplayKey(T aComboBox)
Returns the render key chain.java.util.List
getItems(T anObj)
Returns the items for an object.java.lang.String
getPropertyNameMapped(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.void
initUI(T anObj, UIOwner anOwner)
Initializes newly created object.void
setItemDisplayKey(T aComboBox, java.lang.String aKey)
Sets the display key for ComboBox items.void
setItems(T anObj, java.util.List theItems)
Sets the items for an object.void
setSelectedIndex(T aCBox, int anIndex)
Override to repaint.void
setValue(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:
getChildCount
in classJComponentHpr<T extends javax.swing.JComboBox>
-
initUI
public void initUI(T anObj, UIOwner anOwner)
Initializes newly created object.- Overrides:
initUI
in classJComponentHpr<T extends javax.swing.JComboBox>
-
createEventAdapter
protected SwingEventAdapter createEventAdapter(T aComboBox)
Creates a SwingEventAdapter subclass.- Overrides:
createEventAdapter
in 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:
getPropertyNamesImpl
in classJComponentHpr<T extends javax.swing.JComboBox>
-
getPropertyNameMapped
public java.lang.String getPropertyNameMapped(T anObj, java.lang.String aName)
Returns a mapped property name.- Overrides:
getPropertyNameMapped
in 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:
setSelectedIndex
in 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:
getItemDisplayKey
in classUIHelper<T extends javax.swing.JComboBox>
-
setItemDisplayKey
public void setItemDisplayKey(T aComboBox, java.lang.String aKey)
Sets the display key for ComboBox items.- Overrides:
setItemDisplayKey
in classUIHelper<T extends javax.swing.JComboBox>
-
-