JIDE 3.5.15

com.jidesoft.combobox
Class ComboBoxModelWrapperUtils

java.lang.Object
  extended by com.jidesoft.combobox.ComboBoxModelWrapperUtils

public class ComboBoxModelWrapperUtils
extends Object

ListWrapperUtilsis a utility class that contains several useful methods for ComboBoxModelWrapper.


Constructor Summary
ComboBoxModelWrapperUtils()
           
 
Method Summary
static ComboBoxModel getActualComboBoxModel(ComboBoxModel outerModel, Class<?> targetModelClass)
          Gets the list model whose class is targetModelClass.
static int getActualIndexAt(ComboBoxModel outerModel, int row)
          Gets the actual row index at an outerModel.
static int getActualIndexAt(ComboBoxModel outerModel, int row, Class<?> innerModelClass)
          Gets the actual row index at an outerModel whose class is innerModelClass.
static int getIndexAt(ComboBoxModel outerModel, ComboBoxModel innerModel, int rowInInnerModel)
          Gets the row at the outermost model knowing the row index in an inner model
static int getIndexAt(ComboBoxModel outerModel, int rowInInnerModel)
          Gets the row at the outermost model knowing the row index in an inner model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboBoxModelWrapperUtils

public ComboBoxModelWrapperUtils()
Method Detail

getActualIndexAt

public static int getActualIndexAt(ComboBoxModel outerModel,
                                   int row,
                                   Class<?> innerModelClass)
Gets the actual row index at an outerModel whose class is innerModelClass.

Parameters:
outerModel - the outermost outerModel.
row - the row of outermost outerModel
innerModelClass - the class of the inner outerModel
Returns:
the row index of inner outerModel. If it can't find it, -1 will be returned.

getActualIndexAt

public static int getActualIndexAt(ComboBoxModel outerModel,
                                   int row)
Gets the actual row index at an outerModel.

Parameters:
outerModel - the outermost outerModel.
row - the row of outermost outerModel
Returns:
the row index of nested model which is not a list wrapper. If it can't find it, -1 will be returned.

getIndexAt

public static int getIndexAt(ComboBoxModel outerModel,
                             ComboBoxModel innerModel,
                             int rowInInnerModel)
Gets the row at the outermost model knowing the row index in an inner model

Parameters:
outerModel -
innerModel -
rowInInnerModel -
Returns:
the row at the outermost model.

getIndexAt

public static int getIndexAt(ComboBoxModel outerModel,
                             int rowInInnerModel)
Gets the row at the outermost model knowing the row index in an inner model

Parameters:
outerModel -
rowInInnerModel -
Returns:
the row at the outermost model.

getActualComboBoxModel

public static ComboBoxModel getActualComboBoxModel(ComboBoxModel outerModel,
                                                   Class<?> targetModelClass)
Gets the list model whose class is targetModelClass.

Parameters:
outerModel -
targetModelClass -
Returns:
the list model whose class is targetModelClass.

JIDE 3.5.15