|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractCellEditor
org.tbee.swing.jpa.JpaEntityTableCellEditor<T>
public abstract class JpaEntityTableCellEditor<T>
The class edits a boolean value using a checkbox (improves visualisation)
,
Serialized Form| Field Summary | |
|---|---|
protected JTextField |
iDescriptionTextfield
|
protected JPanel |
iJPanel
|
protected JTextField |
iKeyTextfield
|
protected ImageButton |
iLinkbutton
|
protected ImageButton |
iSearchButton
|
static org.apache.log4j.Logger |
log4j
|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Fields inherited from class javax.swing.AbstractCellEditor |
|---|
changeEvent, listenerList |
| Constructor Summary | |
|---|---|
JpaEntityTableCellEditor()
Initialize the editor |
|
JpaEntityTableCellEditor(boolean showDescription)
Initialize the editor |
|
JpaEntityTableCellEditor(boolean showDescription,
int keyfieldLength)
Initialize the editor |
|
| Method Summary | |
|---|---|
protected List<T> |
findAllPossibleEntities()
|
protected abstract T |
findEntity()
|
Object |
getCellEditorValue()
Return the value after the editor is done |
boolean |
getEditable()
disable the contents |
protected abstract Class |
getEntityClass()
|
protected abstract String |
getEntityName()
|
boolean |
getErrorWhenNothingFound()
ErrorWhenNothingFound |
ListCellRenderer |
getListCellRenderer()
ListCellRenderer |
boolean |
getShowLink()
ShowLink |
boolean |
getShowSearch()
ShowSearch |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
Return the component that is shown in the cell in the table. |
protected void |
search()
|
void |
setEditable(boolean value)
|
void |
setErrorWhenNothingFound(boolean value)
|
void |
setListCellRenderer(ListCellRenderer value)
|
void |
setShowLink(boolean value)
|
void |
setShowSearch(boolean value)
|
boolean |
stopCellEditing()
validate and return false if it failed |
protected abstract void |
updateFields(T entity)
optionally |
JpaEntityTableCellEditor |
useAsRenderer()
Makes the textfields transparent so the alternating coloring of the rows becomes visible (when used as renderer by UseTableCellEditorAsTableCellRenderer) |
JpaEntityTableCellEditor<T> |
withEditable(boolean value)
|
JpaEntityTableCellEditor<T> |
withErrorWhenNothingFound(boolean value)
|
JpaEntityTableCellEditor<T> |
withListCellRenderer(ListCellRenderer value)
|
JpaEntityTableCellEditor<T> |
withShowLink(boolean value)
|
JpaEntityTableCellEditor<T> |
withShowSearch(boolean value)
|
| Methods inherited from class javax.swing.AbstractCellEditor |
|---|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.CellEditor |
|---|
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
public static org.apache.log4j.Logger log4j
protected JPanel iJPanel
protected JTextField iKeyTextfield
protected JTextField iDescriptionTextfield
protected ImageButton iSearchButton
protected ImageButton iLinkbutton
| Constructor Detail |
|---|
public JpaEntityTableCellEditor()
public JpaEntityTableCellEditor(boolean showDescription)
public JpaEntityTableCellEditor(boolean showDescription,
int keyfieldLength)
| Method Detail |
|---|
public boolean stopCellEditing()
stopCellEditing in interface CellEditorstopCellEditing in class AbstractCellEditorpublic Object getCellEditorValue()
getCellEditorValue in interface CellEditor
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
getTableCellEditorComponent in interface TableCellEditorpublic JpaEntityTableCellEditor useAsRenderer()
useAsRenderer in interface UseTableCellEditorAsTableCellRenderer.UseAsRendererprotected void search()
public ListCellRenderer getListCellRenderer()
public void setListCellRenderer(ListCellRenderer value)
public JpaEntityTableCellEditor<T> withListCellRenderer(ListCellRenderer value)
public boolean getShowLink()
public void setShowLink(boolean value)
public JpaEntityTableCellEditor<T> withShowLink(boolean value)
public boolean getShowSearch()
public void setShowSearch(boolean value)
public JpaEntityTableCellEditor<T> withShowSearch(boolean value)
public boolean getErrorWhenNothingFound()
public void setErrorWhenNothingFound(boolean value)
public JpaEntityTableCellEditor<T> withErrorWhenNothingFound(boolean value)
public boolean getEditable()
public void setEditable(boolean value)
public JpaEntityTableCellEditor<T> withEditable(boolean value)
protected abstract String getEntityName()
protected abstract Class getEntityClass()
protected abstract T findEntity()
protected List<T> findAllPossibleEntities()
protected abstract void updateFields(T entity)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||