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.BeanBoundTableModel
interface.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 Object
getBean()
Retrieves the bean for the given context.Object
getBeanId()
Retrieves the bean id.String
getBeanProperty()
Object
getBeanValue()
Retrieves the value this component is interested in from the bean.void
setBeanId(Object beanId)
Sets the bean id.void
setBeanProperty(String propertyName)
Sets the bean property that this component is interested in.void
setBeanProvider(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:
setBeanProvider
in interfaceBeanProviderBound
- Parameters:
beanProvider
- the bean provider to set
-
setBeanId
public void setBeanId(Object beanId)
Sets the bean id.- Specified by:
setBeanId
in interfaceBeanProviderBound
- Parameters:
beanId
- the bean id to set
-
getBeanId
public Object getBeanId()
Retrieves the bean id.- Specified by:
getBeanId
in interfaceBeanProviderBound
- Returns:
- the bean id.
-
setBeanProperty
public void setBeanProperty(String propertyName)
Sets the bean property that this component is interested in.- Specified by:
setBeanProperty
in interfaceBeanAware
- Parameters:
propertyName
- the bean property name
-
getBeanProperty
public String getBeanProperty()
- Specified by:
getBeanProperty
in 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:
getBeanValue
in interfaceBeanAware
- Returns:
- the bean value, or null if no bean value is available.
-
-