|
JIDE 3.4.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jidesoft.combobox.PopupPanel
com.jidesoft.combobox.ButtonPopupPanel
com.jidesoft.combobox.MultiSelectListChooserPanel
public class MultiSelectListChooserPanel
MultiSelectListChooserPanel is a PopupPanel that can choose a value from a JList with allows multiple
selection.
| Nested Class Summary | |
|---|---|
protected class |
MultiSelectListChooserPanel.Handler
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Class<?> |
_class
|
protected JList |
_list
|
protected ListModel |
_listModel
|
protected MouseListener |
listMouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
listMouseMotionListener
This protected field is implementation specific. |
protected MouseListener |
mouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
mouseMotionListener
This protected field is implementation specific. |
| Fields inherited from class com.jidesoft.combobox.ButtonPopupPanel |
|---|
_cancelAction, _cancelButton, _okAction, _okButton |
| Fields inherited from class com.jidesoft.combobox.PopupPanel |
|---|
_previousSelectedObject, SELECTED_BY_MOUSE_ROLLOVER |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MultiSelectListChooserPanel()
|
|
MultiSelectListChooserPanel(Action okAction,
Action cancelAction)
|
|
MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz)
Creates a new JPanel with a double buffer and a flow layout. |
|
MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
Action okAction,
Action cancelAction)
|
|
MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
ConverterContext elementConverterContext)
Creates a new JPanel with a double buffer and a flow layout. |
|
MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
ConverterContext elementConverterContext,
Action okAction,
Action cancelAction)
|
|
MultiSelectListChooserPanel(Object[] objects,
Class<?> clazz)
Creates a new CheckBoxListChooserPanel. |
|
MultiSelectListChooserPanel(Object[] objects,
Class<?> clazz,
Action okAction,
Action cancelAction)
|
|
MultiSelectListChooserPanel(Vector<?> objects,
Class<?> clazz)
Creates a new JPanel with a double buffer and a flow layout. |
|
MultiSelectListChooserPanel(Vector<?> objects,
Class<?> clazz,
Action okAction,
Action cancelAction)
|
|
| Method Summary | |
|---|---|
protected void |
configureListModel(ComboBoxModel model)
Configure the list model with the combo box model of MultiSelectListChooserPanel. |
void |
contentsChanged(ListDataEvent e)
The list data listener when entry(s) is/are inserted in the combo box model. |
protected Vector<Object> |
convertComboBoxModelToVector(ComboBoxModel comboBoxModel)
|
protected MouseEvent |
convertMouseEvent(MouseEvent e)
|
protected JList |
createList(ComboBoxModel comboBoxModel)
Subclass can override this method to create a custom JList. |
protected ListModel |
createListModel(Vector<?> vector)
Creates the list model for the list use based on the vector. |
protected MouseListener |
createListMouseListener()
Creates a mouse listener that watches for mouse events in the popup's list. |
protected MouseMotionListener |
createListMouseMotionListener()
Creates a mouse motion listener that watches for mouse motion events in the popup's list. |
protected MouseListener |
createMouseListener()
Creates a listener that will watch for mouse-press and release events on the combo box. |
protected MouseMotionListener |
createMouseMotionListener()
Creates the mouse motion listener which will be added to the combo box. |
protected PropertyChangeListener |
createPropertyChangeListener()
Creates a PropertyChangeListener which will be added to the combo box. |
protected void |
customizeScroller(JScrollPane scroller)
Configures the scrollable portion which holds the list within the combo box popup. |
ObjectConverter |
getConverter()
Gets the converter that will convert the element in the ListModel to String that can be displayed on the JList. |
ConverterContext |
getConverterContext()
Gets the converter context that used to convert the element in the list to/from string. |
JList |
getList()
Gets the JList. |
int |
getMaximumRowCount()
Gets the maximum number of rows the JList displays |
ListCellRenderer |
getRenderer()
Returns the renderer used to display the selected item in the JComboBox field. |
Object |
getSelectedObject()
Gets the selected object. |
protected void |
initComponents()
|
protected void |
installListListeners()
Adds the listeners to the list control. |
void |
intervalAdded(ListDataEvent e)
The list data listener when new entry(s) is/are inserted in the combo box model. |
void |
intervalRemoved(ListDataEvent e)
The list data listener when old entry(s) is/are removed in the combo box model. |
protected boolean |
isAutoScroll()
|
void |
itemStateChanged(ItemEvent e)
|
protected Object[] |
retrieveListSelection()
|
void |
setConverter(ObjectConverter converter)
Sets a new converter that will convert the element in the ListModel to String that can be displayed on the JList. |
void |
setConverterContext(ConverterContext converterContext)
Sets the converter context that used to convert the element in the list to/from string. |
void |
setMaximumRowCount(int count)
Sets the maximum number of rows the JList displays. |
void |
setRenderer(ListCellRenderer renderer)
Sets the renderer that paints the list items and the item selected from the list in the JComboBox field. |
protected void |
setupList(JList list)
Configures the list. |
protected void |
updateListSelection(Object selectedObject)
|
| Methods inherited from class com.jidesoft.combobox.ButtonPopupPanel |
|---|
createButtonPanel, getCancelAction, getDefaultButton, getOkAction, getOkButton, setCancelAction, setOkAction |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JList _list
protected ListModel _listModel
protected Class<?> _class
protected MouseMotionListener mouseMotionListener
protected MouseListener mouseListener
protected MouseListener listMouseListener
createListMouseListener()protected MouseMotionListener listMouseMotionListener
createListMouseMotionListener()| Constructor Detail |
|---|
public MultiSelectListChooserPanel()
public MultiSelectListChooserPanel(Action okAction,
Action cancelAction)
public MultiSelectListChooserPanel(Object[] objects,
Class<?> clazz)
CheckBoxListChooserPanel.
objects - an array of objects to insert into the combo boxclazz - the element type
public MultiSelectListChooserPanel(Object[] objects,
Class<?> clazz,
Action okAction,
Action cancelAction)
objects - an array of objects to insert into the combo boxclazz - the element typeokAction - the OK actioncancelAction - the cancel action
public MultiSelectListChooserPanel(Vector<?> objects,
Class<?> clazz)
JPanel with a double buffer and a flow layout.
objects - a vector of the objectsclazz - the element type
public MultiSelectListChooserPanel(Vector<?> objects,
Class<?> clazz,
Action okAction,
Action cancelAction)
public MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz)
JPanel with a double buffer and a flow layout.
model - the ComboBoxModel that provides the displayed list of itemsclazz - the element type
public MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
Action okAction,
Action cancelAction)
model - the ComboBoxModel that provides the displayed list of itemsclazz - the element typeokAction - the OK actioncancelAction - the cancel action
public MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
ConverterContext elementConverterContext)
JPanel with a double buffer and a flow layout.
model - the combobox modelclazz - the element typeelementConverterContext - the converter context for the elements.
public MultiSelectListChooserPanel(ComboBoxModel model,
Class<?> clazz,
ConverterContext elementConverterContext,
Action okAction,
Action cancelAction)
| Method Detail |
|---|
protected void initComponents()
protected void customizeScroller(JScrollPane scroller)
scroller - the scroll pane to be customized.protected JList createList(ComboBoxModel comboBoxModel)
comboBoxModel - the combobox model which is used to create a CheckBoxList.
protected ListModel createListModel(Vector<?> vector)
vector - the elements vector
protected Vector<Object> convertComboBoxModelToVector(ComboBoxModel comboBoxModel)
protected void setupList(JList list)
list - the check box listpublic void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListenerprotected Object[] retrieveListSelection()
protected void updateListSelection(Object selectedObject)
public int getMaximumRowCount()
JList displays
JList displays.public void setMaximumRowCount(int count)
JList displays. If the number of objects in the model is greater
than count, the list uses a scrollbar.
count - an integer specifying the maximum number of items to display in the list before using a scrollbarpublic ListCellRenderer getRenderer()
JComboBox field.
public void setRenderer(ListCellRenderer renderer)
aRenderer.getListCellRendererComponent is called, passing the list
object and an index of -1.
renderer - the ListCellRenderer that displays the selected itempublic ConverterContext getConverterContext()
public void setConverterContext(ConverterContext converterContext)
converterContext - the converter context.public ObjectConverter getConverter()
public void setConverter(ObjectConverter converter)
converter - the object converterpublic JList getList()
public Object getSelectedObject()
MultiSelectListChooserPanel, the selected object is an
array of elements that are checked in the CheckBoxList. The return type is always Object[] regardless of the
actual data type.
getSelectedObject in class PopupPanelprotected MouseEvent convertMouseEvent(MouseEvent e)
protected MouseListener createMouseListener()
MouseListener which will be added to the combo box or nullprotected MouseMotionListener createMouseMotionListener()
MouseMotionListener which will be added to the combo box or nullprotected MouseListener createListMouseListener()
MouseListener or nullprotected MouseMotionListener createListMouseMotionListener()
MouseMotionListener or nullprotected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener which will be added to the combo box. If this method returns null
then it will not be added to the combo box.
PropertyChangeListener or nullprotected void installListListeners()
protected boolean isAutoScroll()
public void intervalAdded(ListDataEvent e)
intervalAdded in interface ListDataListenere - the eventpublic void intervalRemoved(ListDataEvent e)
intervalRemoved in interface ListDataListenere - the eventpublic void contentsChanged(ListDataEvent e)
contentsChanged in interface ListDataListenere - the eventprotected void configureListModel(ComboBoxModel model)
model - the combo box model
|
JIDE 3.4.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||