|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.laf.list.editor.AbstractListCellEditor<E,T>
E
- Editor component typeT
- Editor value typepublic abstract class AbstractListCellEditor<E extends java.awt.Component,T>
An abstract list cell editor that provides basic method implementations for list cell editor creation.
Field Summary | |
---|---|
protected int |
clicksToEdit
Amount of mouse clicks required to start editing cell. |
protected int |
editedCell
Last edited cell index. |
protected E |
editor
Currently active editor. |
protected java.awt.event.ComponentAdapter |
editorPositionUpdater
List resize adapter. |
protected java.awt.event.KeyAdapter |
keyAdapter
List key adapter. |
protected java.awt.event.MouseAdapter |
mouseAdapter
List mouse adapter. |
protected T |
oldValue
Old value from the edited cell. |
Constructor Summary | |
---|---|
AbstractListCellEditor()
|
Method Summary | |
---|---|
protected void |
addEditor(javax.swing.JList list)
Adds cell editor into the list. |
void |
cancelEdit(javax.swing.JList list)
Cancels list cell editing. |
protected abstract E |
createCellEditor(javax.swing.JList list,
int index,
T value)
Creates list cell editor component for the cell nder specified index. |
protected void |
createCellEditorListeners(javax.swing.JList list,
int index,
T value)
Creates listeners for list cell editor component. |
void |
editCancelled(javax.swing.JList list,
int index)
Notifies that list cell editing was cancelled. |
void |
editStarted(javax.swing.JList list,
int index)
Notifies that list cell editing has started. |
void |
editStopped(javax.swing.JList list,
int index,
T oldValue,
T newValue)
Notifies that list cell editing has finished. |
E |
getCellEditor(javax.swing.JList list,
int index,
T value)
Returns list cell editor created for the cell under specified index. |
int |
getClicksToEdit()
Returns amount of mouse clicks required to start editing cell. |
protected java.awt.Rectangle |
getEditorBounds(javax.swing.JList list,
int index,
T value)
Returns list cell editor bounds within the list. |
protected java.awt.Rectangle |
getEditorBounds(javax.swing.JList list,
int index,
T value,
java.awt.Rectangle cellBounds)
Returns list cell editor bounds within the cell. |
void |
install(javax.swing.JList list)
Installs cell editor in the list. |
protected void |
installStartEditActions(javax.swing.JList list)
Installs start edit actions in the list. |
boolean |
isCellEditable(javax.swing.JList list,
int index,
T value)
Returns whether list cell under the specified index is editable or not. |
boolean |
isEditing()
Returns whether editor is currently active or not. |
protected void |
removeEditor(javax.swing.JList list)
Removes cell editor from the list. |
void |
setClicksToEdit(int clicksToEdit)
Sets amount of mouse clicks required to start editing cell. |
void |
startEdit(javax.swing.JList list,
int index)
Starts specified list cell editing. |
boolean |
stopEdit(javax.swing.JList list)
Stops list cell editing. |
void |
uninstall(javax.swing.JList list)
Uninstalls cell editor from the list. |
protected void |
uninstallStartEditActions(javax.swing.JList list)
Uninstalls start edit actions from the list. |
boolean |
updateListModel(javax.swing.JList list,
int index,
T oldValue,
T newValue,
boolean updateSelection)
Returns whether value update operation completed successfully or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.alee.laf.list.editor.ListCellEditor |
---|
getCellEditorValue |
Field Detail |
---|
protected int editedCell
protected T oldValue
protected E extends java.awt.Component editor
protected java.awt.event.ComponentAdapter editorPositionUpdater
protected java.awt.event.MouseAdapter mouseAdapter
protected int clicksToEdit
protected java.awt.event.KeyAdapter keyAdapter
Constructor Detail |
---|
public AbstractListCellEditor()
Method Detail |
---|
public void install(javax.swing.JList list)
install
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processprotected void installStartEditActions(javax.swing.JList list)
list
- list to processpublic void uninstall(javax.swing.JList list)
uninstall
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processprotected void uninstallStartEditActions(javax.swing.JList list)
list
- list to processpublic boolean isCellEditable(javax.swing.JList list, int index, T value)
isCellEditable
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- cell indexvalue
- cell value
public E getCellEditor(javax.swing.JList list, int index, T value)
getCellEditor
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- cell indexvalue
- cell value
protected abstract E createCellEditor(javax.swing.JList list, int index, T value)
list
- list to processindex
- cell indexvalue
- cell value
protected void createCellEditorListeners(javax.swing.JList list, int index, T value)
list
- list to processindex
- cell indexvalue
- cell valuepublic void startEdit(javax.swing.JList list, int index)
startEdit
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- cell indexpublic void cancelEdit(javax.swing.JList list)
cancelEdit
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processpublic boolean stopEdit(javax.swing.JList list)
stopEdit
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to process
protected void addEditor(javax.swing.JList list)
list
- list to processprotected void removeEditor(javax.swing.JList list)
list
- list to processprotected java.awt.Rectangle getEditorBounds(javax.swing.JList list, int index, T value, java.awt.Rectangle cellBounds)
list
- list to processindex
- cell indexvalue
- cell valuecellBounds
- cell bounds
protected java.awt.Rectangle getEditorBounds(javax.swing.JList list, int index, T value)
list
- list to processindex
- cell indexvalue
- cell value
public boolean updateListModel(javax.swing.JList list, int index, T oldValue, T newValue, boolean updateSelection)
updateListModel
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- cell indexoldValue
- old cell valuenewValue
- new cell valueupdateSelection
- whether update list selection or not
public void editStarted(javax.swing.JList list, int index)
editStarted
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- edited cell indexpublic void editStopped(javax.swing.JList list, int index, T oldValue, T newValue)
editStopped
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- edited cell indexoldValue
- old cell valuenewValue
- new cell valuepublic void editCancelled(javax.swing.JList list, int index)
editCancelled
in interface ListCellEditor<E extends java.awt.Component,T>
list
- list to processindex
- edited cell indexpublic boolean isEditing()
isEditing
in interface ListCellEditor<E extends java.awt.Component,T>
public int getClicksToEdit()
public void setClicksToEdit(int clicksToEdit)
clicksToEdit
- amount of mouse clicks required to start editing cell
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |