nl.coderight.jazz.form.field
Class ListField<V>
java.lang.Object
nl.coderight.jazz.form.FormField<V>
nl.coderight.jazz.form.FormControl<V>
nl.coderight.jazz.form.field.scrollable.ScrollableField<V>
nl.coderight.jazz.form.field.selectable.SelectableField<V>
nl.coderight.jazz.form.field.selectable.ListSelectableField<V>
nl.coderight.jazz.form.field.ListField<V>
- All Implemented Interfaces:
- DataBindable<V>, DataSelectable<V>, Selection<V>
- Direct Known Subclasses:
- CheckListField
public class ListField<V>
- extends ListSelectableField<V>
- implements Selection<V>
Implementation of a JList.
- See Also:
JList
Methods inherited from class nl.coderight.jazz.form.field.selectable.ListSelectableField |
createSortComparator, delete, delete, getData, getIndex, getValue, getValueAt, getValueCount, insert, insert, onFilterChanged, onRebuildFinished, onRebuildProgress, onRebuildStart, setData, setValueAt, sort, update |
Methods inherited from class nl.coderight.jazz.form.field.selectable.SelectableField |
addFilter, dispose, filter, getBindID, getFilters, getRelationID, getSelectID, getSelectionBackground, getSelectionForeground, getSortComparator, getSortID, getSortOrder, getValue, isSortingEnabled, onChange, onFocusGained, onPopup, onSearchFinished, onSearchProgress, onSearchStart, search, search, searchAll, setOnChangeEvent, setOnSelectAction, setOnSelectCondition, setOnSelectEvent, setOnSelectGroup, setRelationID, setSelectID, setSortComparator, setSortID, setSortingEnabled, setSortOrder, setValue |
Methods inherited from class nl.coderight.jazz.form.field.scrollable.ScrollableField |
getComponent, getFocusComponent, getPreferredSize, getViewportSize, isOpaque, isScrollable, onViewportChanged, setBackground, setBackgroundImage, setBorder, setColumnHeader, setComponent, setCorner, setEnabled, setForeground, setOpaque, setPreferredSize, setRowHeader, setScrollable, setScrollBarPolicy, setTitle |
Methods inherited from class nl.coderight.jazz.form.FormControl |
addField, addField, focus, focusField, focusNextField, focusPreviousField, getFields, hasFocus, registerKeyboardAction, setComponent, setLayout |
Methods inherited from class nl.coderight.jazz.form.FormField |
dispatchEvent, focusNextField, focusPreviousField, getBackground, getBorder, getCursor, getDataBinding, getForeground, getForm, getLabel, getParent, getToolTip, isBindable, isChanged, isEnabled, isFocusable, isReadonly, isShowing, isValueChanged, isVisible, onClick, onFocusLost, onMouseEnter, onMouseLeave, setBindID, setChanged, setCursor, setDataBinding, setFocusable, setOnFocusGainedEvent, setOnFocusLostEvent, setPopupMenu, setReadonly, setToolTip, setVisible, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListField
public ListField(String bindID,
String selectID)
createField
protected JList createField()
getField
protected JList getField()
getDisplayID
public String getDisplayID()
setDisplayID
public void setDisplayID(String displayID)
setRenderer
public void setRenderer(ListCellRenderer renderer)
setSelectionBackground
public void setSelectionBackground(Color selectionBackground)
- Overrides:
setSelectionBackground
in class SelectableField<V>
setSelectionForeground
public void setSelectionForeground(Color selectionForeground)
- Overrides:
setSelectionForeground
in class SelectableField<V>
getPreferredViewportSize
protected Dimension getPreferredViewportSize()
isAlternatingColorsEnabled
public boolean isAlternatingColorsEnabled()
setAlternatingColorsEnabled
public void setAlternatingColorsEnabled(boolean enabled)
getSelectedIndex
public int getSelectedIndex()
- Specified by:
getSelectedIndex
in class SelectableField<V>
setSelectedIndex
public void setSelectedIndex(int index)
- Specified by:
setSelectedIndex
in class SelectableField<V>
isSelectedIndex
public boolean isSelectedIndex(int index)
isSelectionEnabled
public boolean isSelectionEnabled()
setSelectionEnabled
public void setSelectionEnabled(boolean enabled)
getSelectionMode
public Selection.SelectionMode getSelectionMode()
- Specified by:
getSelectionMode
in interface Selection<V>
setSelectionMode
public void setSelectionMode(Selection.SelectionMode selectionMode)
- Specified by:
setSelectionMode
in interface Selection<V>
getSelectionCount
public int getSelectionCount()
- Specified by:
getSelectionCount
in interface Selection<V>
- Overrides:
getSelectionCount
in class SelectableField<V>
getSelectionIndices
public int[] getSelectionIndices()
- Specified by:
getSelectionIndices
in interface Selection<V>
select
public void select(int index)
- Specified by:
select
in interface Selection<V>
deselect
public void deselect(int index)
- Specified by:
deselect
in interface Selection<V>
select
public void select(int startIndex,
int endIndex)
- Specified by:
select
in interface Selection<V>
deselect
public void deselect(int startIndex,
int endIndex)
- Specified by:
deselect
in interface Selection<V>
select
public void select(int[] indices)
- Specified by:
select
in interface Selection<V>
deselect
public void deselect(int[] indices)
- Specified by:
deselect
in interface Selection<V>
selectAll
public void selectAll()
- Specified by:
selectAll
in interface Selection<V>
deselectAll
public void deselectAll()
- Specified by:
deselectAll
in interface Selection<V>
locationToIndex
public int locationToIndex(Point point)
- Specified by:
locationToIndex
in class SelectableField<V>
getSelectionValues
public List<V> getSelectionValues()
- Returns selected values or empty list if none are selected.
- Specified by:
getSelectionValues
in interface Selection<V>
setSelectionValues
public void setSelectionValues(List<V> values)
- Select values.
- Specified by:
setSelectionValues
in interface Selection<V>
setVisibleRowCount
public void setVisibleRowCount(int rows)
getLayoutOrientation
public ListField.ListOrientation getLayoutOrientation()
setLayoutOrientation
public void setLayoutOrientation(ListField.ListOrientation layoutOrientation)
getRowHeight
public int getRowHeight()
setRowHeight
public void setRowHeight(int rowHeight)
setOnEditEvent
public void setOnEditEvent(Event onEditEvent)
setOnEditAction
public void setOnEditAction(Action onEditAction)
setOnEditCondition
public void setOnEditCondition(EditCondition<V> condition)
onDoubleClick
protected void onDoubleClick()
- Overrides:
onDoubleClick
in class FormField<V>
onEdit
protected void onEdit()
onSelect
protected void onSelect()
- Overrides:
onSelect
in class SelectableField<V>
setDefaults
protected void setDefaults()
backupSelection
protected void backupSelection()
- Overrides:
backupSelection
in class ListSelectableField<V>
restoreSelection
protected void restoreSelection()
- Overrides:
restoreSelection
in class ListSelectableField<V>
notifyDataChanged
protected void notifyDataChanged()
- Specified by:
notifyDataChanged
in class ListSelectableField<V>
Copyright 2010 CodeRight, All rights reserved.