Class AbstractBeanBoundTableModel
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractTableModel
-
- com.github.bordertech.wcomponents.AbstractBeanBoundTableModel
-
- All Implemented Interfaces:
BeanAware,BeanProviderBound,WTable.BeanBoundTableModel,WTable.TableModel,Serializable
- Direct Known Subclasses:
SimpleBeanBoundTableModel
public abstract class AbstractBeanBoundTableModel extends AbstractTableModel implements WTable.BeanBoundTableModel
A default implementation of theWTable.BeanBoundTableModelinterface.This implementation does not support editing, row selection, etc.
- Since:
- 1.0.0
- Author:
- Jonathan Austin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractBeanBoundTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetBean()Retrieves the bean for the given context.ObjectgetBeanId()Retrieves the bean id.StringgetBeanProperty()ObjectgetBeanValue()Retrieves the value this component is interested in from the bean.voidsetBeanId(Object beanId)Sets the bean id.voidsetBeanProperty(String propertyName)Sets the bean property that this component is interested in.voidsetBeanProvider(BeanProvider beanProvider)Sets the bean provider.-
Methods inherited from class com.github.bordertech.wcomponents.AbstractTableModel
getRendererClass, getRowKey, hasChildren, isCellEditable, isDisabled, isExpandable, isSelectable, isSortable, setValueAt, sort, sort
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.WTable.TableModel
getChildCount, getRendererClass, getRowCount, getRowKey, getValueAt, hasChildren, isCellEditable, isDisabled, isExpandable, isSelectable, isSortable, setValueAt, sort
-
-
-
-
Method Detail
-
setBeanProvider
public void setBeanProvider(BeanProvider beanProvider)
Sets the bean provider.- Specified by:
setBeanProviderin interfaceBeanProviderBound- Parameters:
beanProvider- the bean provider to set
-
setBeanId
public void setBeanId(Object beanId)
Sets the bean id.- Specified by:
setBeanIdin interfaceBeanProviderBound- Parameters:
beanId- the bean id to set
-
getBeanId
public Object getBeanId()
Retrieves the bean id.- Specified by:
getBeanIdin interfaceBeanProviderBound- Returns:
- the bean id.
-
setBeanProperty
public void setBeanProperty(String propertyName)
Sets the bean property that this component is interested in.- Specified by:
setBeanPropertyin interfaceBeanAware- Parameters:
propertyName- the bean property name
-
getBeanProperty
public String getBeanProperty()
- Specified by:
getBeanPropertyin interfaceBeanAware- Returns:
- the bean property name this component is interested in
-
getBean
public Object getBean()
Retrieves the bean for the given context.
-
getBeanValue
public Object getBeanValue()
Retrieves the value this component is interested in from the bean. This is derived from theBeanAware.getBeanProperty()andBeanAware.getBean().- Specified by:
getBeanValuein interfaceBeanAware- Returns:
- the bean value, or null if no bean value is available.
-
-