|
JIDE 3.5.15 | ||||||||
| 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.JComboBox
com.jidesoft.combobox.ExComboBox
com.jidesoft.combobox.ListExComboBox
public class ListExComboBox
ListComboBox is just like a normal JComboBox which you can choose a value from a drop-down list box.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jidesoft.combobox.ExComboBox |
|---|
ExComboBox.LazyDelegateAction |
| Nested classes/interfaces inherited from class javax.swing.JComboBox |
|---|
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager |
| 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 | |
|---|---|
static Object[] |
BOOLEAN_ARRAY
An array of boolean true and false. |
| Fields inherited from class com.jidesoft.combobox.ExComboBox |
|---|
CLIENT_PROPERTY_HIDE_POPUP_ON_LIST_DATA_CHANGED, CLIENT_PROPERTY_POPUP_PANEL, CLIENT_PROPERTY_TABLE_CELL_EDITOR, CLIENT_PROPERTY_TABLE_CELL_RENDERER, COMMIT, COMMIT_OR_RESET, COMMIT_OR_REVERT, DIALOG, DOWN_KEY_BEHAVIOR_SELECT_NEXT, DOWN_KEY_BEHAVIOR_SHOW_POPUP, DROPDOWN, PERSIST, PROPERTY_BUTTON_VISIBLE, PROPERTY_SELECTED_ITEM, RESET, REVERT |
| Fields inherited from class javax.swing.JComboBox |
|---|
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder |
| 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 | |
|---|---|
ListExComboBox()
|
|
ListExComboBox(ComboBoxModel model)
Creates a new ListComboBox. |
|
ListExComboBox(ComboBoxModel model,
Class<?> clazz)
Creates a new ListComboBox. |
|
ListExComboBox(Object[] objects)
Creates a new ListComboBox. |
|
ListExComboBox(Object[] objects,
Class<?> clazz)
Creates a new ListComboBox. |
|
ListExComboBox(Vector<?> objects)
Creates a new ListComboBox. |
|
ListExComboBox(Vector<?> objects,
Class<?> clazz)
Creates a new ListComboBox. |
|
| Method Summary | |
|---|---|
protected JList |
createList(ComboBoxModel model)
Creates the list. |
protected ListChooserPanel |
createListChooserPanel(ComboBoxModel dataModel,
Class<?> clazz,
ObjectConverter converter,
ConverterContext converterContext)
Creates the ListChooserPanel. |
PopupPanel |
createPopupComponent()
Subclass should implement this method to create the actual popup component. |
List<KeyStroke> |
getDelegateKeyStrokes()
Gets the list of KeyStrokes that will be delegated to the popup panel. |
protected JComponent |
getDelegateTarget(PopupPanel panel)
|
JList |
getList()
|
boolean |
isToggleValueOnDoubleClick()
Checks if double click on the editor part will toggle the value. |
boolean |
selectWithKeyChar(char keyChar)
|
void |
setToggleValueOnDoubleClick(boolean toggleValueOnDoubleClick)
Sets the flag whether the value will be toggled when double clicking on the editor part. |
protected void |
setupList(JList list)
Setups the JList for the tree used in the popup panel. |
void |
toggleValue(Component editorComponent,
int direction)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Object[] BOOLEAN_ARRAY
| Constructor Detail |
|---|
public ListExComboBox()
public ListExComboBox(Object[] objects)
ListComboBox.
objects - an array of objects to insert into the combo boxpublic ListExComboBox(Vector<?> objects)
ListComboBox.
objects - a vector of objects to insert into the combo boxpublic ListExComboBox(ComboBoxModel model)
ListComboBox.
model - a combobox model
public ListExComboBox(Object[] objects,
Class<?> clazz)
ListComboBox.
objects - an array of objects to insert into the combo boxclazz - the type of the objects in the array.
public ListExComboBox(Vector<?> objects,
Class<?> clazz)
ListComboBox.
objects - a vector of objects to insert into the combo box.clazz - the type of the objects in the vector.
public ListExComboBox(ComboBoxModel model,
Class<?> clazz)
ListComboBox.
model - a combobox model.clazz - the type of the objects in the model.| Method Detail |
|---|
public PopupPanel createPopupComponent()
ExComboBox
createPopupComponent in class ExComboBox
protected ListChooserPanel createListChooserPanel(ComboBoxModel dataModel,
Class<?> clazz,
ObjectConverter converter,
ConverterContext converterContext)
ListChooserPanel listChooserPanel = new ListChooserPanel(dataModel, clazz, converter, converterContext) {
protected JList createList(ComboBoxModel model) {
// * JList list = ListExComboBox.this.createList(model);
if (list == null) {
return super.createList(model);
}
return list;
}
protected void setupList(final JList list) {
setHorizontalAlignment(ListExComboBox.this.getHorizontalAlignment());
setVerticalAlignment(ListExComboBox.this.getVerticalAlignment());
super.setupList(list);
list.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting() && !Boolean.TRUE.equals(list.getClientProperty(SELECTED_BY_MOUSE_ROLLOVER)))
{
int index = list.getSelectedIndex();
if (index != -1) {
Object item = dataModel.getElementAt(index);
if (getEditor().getItem() != item) {
setSelectedObject(item, false);
getEditor().setItem(item);
getEditor().selectAll();
}
}
}
}
});
ListExComboBox.this.setupList(list);
}
};
dataModel - the combobox modelclazz - the type of the elementconverter - the converterconverterContext - the converter context. Used only when converter is null.
protected JList createList(ComboBoxModel model)
model - the list model.
public JList getList()
public boolean selectWithKeyChar(char keyChar)
selectWithKeyChar in class ExComboBoxprotected void setupList(JList list)
list - the list used by ListChooserPanel.public List<KeyStroke> getDelegateKeyStrokes()
ExComboBox
getDelegateKeyStrokes in class ExComboBoxprotected JComponent getDelegateTarget(PopupPanel panel)
getDelegateTarget in class ExComboBoxpublic boolean isToggleValueOnDoubleClick()
public void setToggleValueOnDoubleClick(boolean toggleValueOnDoubleClick)
toggleValueOnDoubleClick - the flag
public void toggleValue(Component editorComponent,
int direction)
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||