Interface ColumnAdapter<Bean,Value>
-
- All Superinterfaces:
ReadAccessor<Bean,Value>
,ReadWriteAccessor<Bean,Value>
,WriteAccessor<Bean,Value>
- All Known Subinterfaces:
ValidatedColumnAdapter<Bean,Value>
- All Known Implementing Classes:
AbstractColumnAdapter
,ConstantColumnAdapter
,EmptyColumnAdapter
,FunctionColumnAdapter
,ReadOnlyColumnAdapter
public interface ColumnAdapter<Bean,Value> extends ReadWriteAccessor<Bean,Value>
Interface for mapping a bean property to a table column.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getColumnId()
default java.awt.Cursor
getCursor(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)
Get the mouse cursor to display for a cell.java.lang.String
getName()
Get the name to be displayed in the table column header.java.lang.String
getResource(java.lang.String name, java.lang.String defaultValue)
Get a resource value for the table column.java.lang.Class<? super Value>
getType()
Get the property value type.default void
handleClick(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)
Handle a mouse click on a cell.boolean
isEditable(Bean row)
-
Methods inherited from interface io.github.jonestimd.beans.ReadAccessor
getValue
-
Methods inherited from interface io.github.jonestimd.beans.WriteAccessor
setValue
-
-
-
-
Method Detail
-
getColumnId
java.lang.String getColumnId()
- Returns:
- the table column ID
-
getResource
java.lang.String getResource(java.lang.String name, java.lang.String defaultValue)
Get a resource value for the table column.
-
getName
java.lang.String getName()
Get the name to be displayed in the table column header.
-
getType
java.lang.Class<? super Value> getType()
Get the property value type.
-
isEditable
boolean isEditable(Bean row)
- Returns:
- true if the property is editable for the specified bean.
-
getCursor
default java.awt.Cursor getCursor(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)
Get the mouse cursor to display for a cell. Returnnull
to use the default cursor. The default implementation returnsnull
.- Parameters:
event
- the mouse eventtable
- the table that received the eventrow
- the row containing the cell
-
handleClick
default void handleClick(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)
Handle a mouse click on a cell.- Parameters:
event
- the click eventtable
- the table that received the eventrow
- the row containing the cell
-
-