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.StringgetColumnId()default java.awt.CursorgetCursor(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)Get the mouse cursor to display for a cell.java.lang.StringgetName()Get the name to be displayed in the table column header.java.lang.StringgetResource(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 voidhandleClick(java.awt.event.MouseEvent event, javax.swing.JTable table, Bean row)Handle a mouse click on a cell.booleanisEditable(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. Returnnullto 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
-
-