|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.combobox.PopupPanel com.jidesoft.combobox.ListChooserPanel 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 Action |
_cancelAction
|
protected JButton |
_cancelButton
|
protected ListModel |
_listModel
|
protected Action |
_okAction
|
protected JButton |
_okButton
|
Fields inherited from class com.jidesoft.combobox.ListChooserPanel |
---|
_class, _list, keyListener, listMouseListener, listMouseMotionListener, listSelectionListener, mouseListener, mouseMotionListener |
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)
|
Component |
createButtonPanel(int alignment)
|
protected MultiSelectListChooserPanel.Handler |
createHandler()
Creates the handler to handle mouse events and property change events |
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. |
Action |
getCancelAction()
|
JButton |
getDefaultButton()
Gets the default button |
Action |
getOkAction()
|
Object |
getSelectedObject()
Gets the selected object. |
protected void |
initComponents()
|
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()
|
protected void |
prepareSelectedObject()
|
protected Object[] |
retrieveListSelection()
|
void |
setCancelAction(Action cancelAction)
|
void |
setOkAction(Action okAction)
|
protected void |
setupList(JList list)
Configures the list. |
protected void |
updateListSelection(Object selectedObject,
boolean shouldScroll)
|
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 ListModel _listModel
protected JButton _okButton
protected JButton _cancelButton
protected Action _okAction
protected Action _cancelAction
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 typepublic 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 actionpublic MultiSelectListChooserPanel(Vector<?> objects, Class<?> clazz)
JPanel
with a double buffer and a flow layout.
objects
- a vector of the objectsclazz
- the element typepublic 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 typepublic 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 actionpublic 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 |
---|
public void setOkAction(Action okAction)
public Action getOkAction()
public void setCancelAction(Action cancelAction)
public Action getCancelAction()
public JButton getDefaultButton()
DefaultButtonProvider
getDefaultButton
in interface DefaultButtonProvider
public Component createButtonPanel(int alignment)
protected void initComponents()
initComponents
in class ListChooserPanel
protected JList createList(ComboBoxModel comboBoxModel)
createList
in class ListChooserPanel
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)
setupList
in class ListChooserPanel
list
- the check box listprotected Object[] retrieveListSelection()
protected void updateListSelection(Object selectedObject, boolean shouldScroll)
updateListSelection
in class ListChooserPanel
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 PopupPanel
protected MultiSelectListChooserPanel.Handler createHandler()
ListChooserPanel
createHandler
in class ListChooserPanel
protected boolean isAutoScroll()
isAutoScroll
in class ListChooserPanel
public void intervalAdded(ListDataEvent e)
intervalAdded
in interface ListDataListener
intervalAdded
in class ListChooserPanel
e
- the eventpublic void intervalRemoved(ListDataEvent e)
intervalRemoved
in interface ListDataListener
intervalRemoved
in class ListChooserPanel
e
- the eventpublic void contentsChanged(ListDataEvent e)
contentsChanged
in interface ListDataListener
contentsChanged
in class ListChooserPanel
e
- the eventprotected void configureListModel(ComboBoxModel model)
model
- the combo box modelprotected void prepareSelectedObject()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |