public class TableEditor<T> extends AbstractView<T> implements TableModelListener
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ADD_ICON |
static String |
DEFAULT_ICON |
static String |
DEFAULT_REFRESH_ICON |
static String |
DEFAULT_REMOVE_ICON |
static String |
DEFAULT_SAVE_ICON |
DEFAULT_BINDER_FACTORY_NAME, errors, height, width| Constructor and Description |
|---|
TableEditor()
Creates new TableEditor
|
TableEditor(Class<T> clazz)
Creates new TableEditor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add()
Add a new model to the table
|
protected JComponent |
buildPanel()
Build the JComponent that hold controls.
|
protected Container |
createHeader() |
protected Container |
createTablePanel()
Creates a new Box with table and actions buttons
|
void |
delete()
Delete selected table rows using persistent service
|
void |
doRefresh() |
Icon |
getAddIcon() |
Icon |
getIcon() |
org.springframework.context.MessageSource |
getMessageSource() |
String |
getName() |
Icon |
getRefreshIcon() |
Icon |
getRemoveIcon() |
Icon |
getSaveIcon() |
Dao<T,Serializable> |
getService() |
JTable |
getTable() |
ListTableModel |
getTableModel() |
void |
init()
Initiaze, usally called by container
|
protected void |
loadIcons() |
void |
setAddIcon(Icon addIcon) |
void |
setIcon(Icon icon) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
void |
setName(String name) |
void |
setRefreshIcon(Icon refreshIcon) |
void |
setRemoveIcon(Icon removeIcon) |
void |
setSaveIcon(Icon saveIcon) |
void |
setService(Dao<T,Serializable> service) |
void |
setTable(JTable table) |
void |
setTableModel(ListTableModel tableModel) |
void |
tableChanged(TableModelEvent e) |
String |
toString() |
checkFactories, getPaneladdControlChangeListener, addError, addView, afterRefresh, afterUpdate, autobind, bind, bind, clear, controlChange, doUpdate, enableView, fireControlChange, getBinder, getBinderFactory, getBindingResult, getControlAccessorFactory, getControlInitializer, getErrorMessage, getErrorProcessors, getHeight, getIgnoredProperties, getMessage, getMessage, getMessage, getModel, getValidator, getWidth, ignoreProperties, ignoreProperty, isDirty, isInitializeControls, listen, onSetModel, refresh, removeControlChangeListener, setBinderFactory, setControlAccessorFactory, setControlInitializer, setDirty, setErrorProcessors, setHeight, setIgnoredProperties, setInitializeControls, setModel, setValidator, setWidth, update, validateViewclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddControlChangeListener, clear, enableView, getErrorMessage, isDirty, removeControlChangeListener, validateViewgetBindingResult, refresh, updategetModel, setModelpublic static String DEFAULT_ICON
public static String DEFAULT_ADD_ICON
public static String DEFAULT_REMOVE_ICON
public static String DEFAULT_SAVE_ICON
public static String DEFAULT_REFRESH_ICON
public void init()
protected JComponent buildPanel()
buildPanel in class AbstractView<T>protected Container createTablePanel()
public void doRefresh()
doRefresh in class ViewSupport<T>protected Container createHeader()
public void add()
public void delete()
public JTable getTable()
public void setTable(JTable table)
public ListTableModel getTableModel()
public void setTableModel(ListTableModel tableModel)
public Icon getAddIcon()
public void setAddIcon(Icon addIcon)
public Dao<T,Serializable> getService()
public void setService(Dao<T,Serializable> service)
public Icon getSaveIcon()
public void setSaveIcon(Icon saveIcon)
public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenerpublic String getName()
public void setName(String name)
setName in class ViewSupport<T>public Icon getIcon()
public void setIcon(Icon icon)
icon - the icon to setprotected void loadIcons()
public Icon getRemoveIcon()
public void setRemoveIcon(Icon removeIcon)
removeIcon - the removeIcon to setpublic Icon getRefreshIcon()
public void setRefreshIcon(Icon refreshIcon)
refreshIcon - the refreshIcon to setpublic org.springframework.context.MessageSource getMessageSource()
getMessageSource in class ViewSupport<T>@Autowired public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in class ViewSupport<T>messageSource - the messageSource to setCopyright © 2014 JDAL. All Rights Reserved.