How do I customize the table in the property sheet?
You will need to:
IlvDiagrammerPropertySheet class and override the
setTarget method. In this method, you will construct the table model and JTable based on the properties of the target object.
Then, return the custom IlvDiagrammerPropertySheet from step 1 in a call to
You can also subclass the
AbstractTableModel classes depending on your criteria.
JTable class can be extended to create a custom JTable taking a custom AbstractTableModel as a parameter.
The custom AbstractTableModel can be customized to do many things, such as (among others):
returning the number of columns
changing the value of table cells
making certain cells uneditable
change the value of the actual table cell
the attachment for a sample made based on the
This sample creates a custom table and shows some properties in one column along with check boxes in another column and also shows some other custom code that can be useful. The sample contains the customization at the bottom of the file.